Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IAR exporter: extended debugger settings template with modifiable options needed for Nordic targets #3911

Merged
merged 1 commit into from
Apr 6, 2017

Conversation

anangl
Copy link
Contributor

@anangl anangl commented Mar 8, 2017

Description

The default CMSIS-DAP interface speed (Auto) is causing troubles in debug communication (at least on Nordic's DKs). It was changed to 2 MHz for Nordic targets. An extra option "--drv_vector_table_base=0x0" was also added for these, so the debug session is not started with a jump to the application's reset handler, but to the SoftDevice's one instead.

Status

READY

Migrations

NO

TODO

  • /morph export-bulid

@anangl
Copy link
Contributor Author

anangl commented Mar 8, 2017

@theotherjimmy Could you have a look?
cc @nvlsianpu @pan-

@pan-
Copy link
Member

pan- commented Mar 8, 2017

@anangl does it work with the existing CMSIS DAP firmware from Nordic ?

@anangl
Copy link
Contributor Author

anangl commented Mar 8, 2017

Yes. I've tested it with version 0221 on both, NRF51_DK and NRF52_DK.

@pan-
Copy link
Member

pan- commented Mar 8, 2017

@anangl I'm able to start a debug session now but I still can't flash the flash the application from IAR.
What version of IAR do you use ?

@anangl
Copy link
Contributor Author

anangl commented Mar 8, 2017

7.60.2

@theotherjimmy
Copy link
Contributor

/morph export-build

@mbed-bot
Copy link

mbed-bot commented Mar 9, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph export-build

Output

mbed Build Number: 133

All exports and builds passed!

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2017

@anangl Please can you update to 7.8 and verify that it works?

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 14, 2017

@anangl Any update with IAR 7.8 ?

@anangl
Copy link
Contributor Author

anangl commented Mar 14, 2017

@0xc0170 Not yet. I'm in the process of upgrading IAR to 7.8. Unfortunately, my current license does not allow to use version newer than 7.6, so it takes a bit more time (I need license renewal), but it should be finished soon, hopefully.

@anangl
Copy link
Contributor Author

anangl commented Mar 31, 2017

I finally checked it with 7.80.4. The behavior is the same (to be exact, almost the same, 7.60.2 reported an unknown option CADI_ID used in the project). The only problem I encounter is that when I plug the board to a USB 3.0 port I get some (probably) communication errors - IAR reports either a memory verification error:

Fri Mar 31, 2017 09:29:11: CPU status - IN RESET 
Fri Mar 31, 2017 09:29:11: CPU status OK 
Fri Mar 31, 2017 09:29:11: Downloading nrf52xxx flash loader 
Fri Mar 31, 2017 09:29:11: Loaded debugee: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\config\flashloader\NordicSemi\nrf52xxx.out 
Fri Mar 31, 2017 09:29:12: Target reset 
Fri Mar 31, 2017 09:29:17: Unloaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\config\flashloader\NordicSemi\nrf52xxx.mac 
Fri Mar 31, 2017 09:29:17: Flash memory checksum verification failed for range 0x1C000-0x2493A. 
Fri Mar 31, 2017 09:29:58: IAR Embedded Workbench 7.80.4 (armproc.dll) 
Fri Mar 31, 2017 09:29:58: Loading the CMSIS-DAP driver 

or a problem with loading the flash loader:

Fri Mar 31, 2017 09:30:42: CPU status - IN RESET 
Fri Mar 31, 2017 09:30:43: CPU status OK 
Fri Mar 31, 2017 09:30:43: Downloading nrf52xxx flash loader 
Fri Mar 31, 2017 09:30:43: Failed to load flash loader: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\config\flashloader\NordicSemi\nrf52xxx.out 
Fri Mar 31, 2017 09:30:43: Unloaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\config\flashloader\NordicSemi\nrf52xxx.mac 
Fri Mar 31, 2017 09:30:43: Failed to load flash loader: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\config\flashloader\NordicSemi\nrf52xxx_xxaa.flash 
Fri Mar 31, 2017 09:31:09: IAR Embedded Workbench 7.80.4 (armproc.dll) 
Fri Mar 31, 2017 09:31:10: Loading the CMSIS-DAP driver 

When I use a USB 2.0 port instead, the flashing and debugging goes without any problems. Maybe @pan- is encountering a similar problem? But I think it's not related to the exporter, rather to the USB driver used by IAR - when I try to debug with Keil uVision or pyOCD (via plug-in in eclipse), everything works well no matter if I use USB 2.0 or 3.0.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 31, 2017

@anangl Thanks

@sg- sg- merged commit 9c141b6 into ARMmbed:master Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants