This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

S310 and IAR I-jet load/run

I've been successfully using IAR and I-jet with the 51822 and S110. I can build, download and run under the debugger with no problems.

I recently switched to the 51422 and S310, starting with a port of the S110 application template project to the S310. I can build and download, but instead of hitting a breakpoint at main(), the debug session crashes and the last message from the debug log window is "Stopped by a vector catch..." with PC at address 0x00019416 in 0-filled memory.

The loaded application verifies correctly against the IAR-produced hex file using nRFgo Studio. If I exit the debugger and power cycle the prototype, the application appears to be running normally. I can connect to it with the Master Control Panel app on my Galaxy S3.

Using the 51422 with the device set to 51422-QFAA in IAR, I can build, load and run the S110 led/button demo app using the I-jet, no problems running under the debugger.

I'm using IAR EWARM 7.20.2.7431, S310 v1.0.0, and SDK v6.0.0. I've updated the IAR .icf to reflect the application flash ROM base address at 0x00020000 and RAM base address at 0x20002400, and am using "--drv_vector_table_base=0x0" in the debugger extra options config. I've also #ifdef'd the "sd_ble_enable()" code block in ble_stack_init(), and removed the S110 definition from the preprocessor directives.

There doesn't appear to be an S310 demo app using the IAR flow in the 6.0.0 SDK. The IAR flash loader file names are all 15822 specific, although they seem to work with the 51422 and an application based on the S110. Is there some inherent problem running under the debugger using the IAR flash loader and I-jet with the S310 soft device?

Thanks and Best Regards, Matt Barr

Parents
  • It appears that, unlike the S110, the S310 is read-protected after erase/program with nRFgo Studio. I can read region 0 in the S110, but debugger reads in region 0 return 0 for the S310. After starting the debugger, for the S110 I have UICR.RBCONF[15:0]=0xFFFF and for the S310 I have UICR.RBCONF[15:0]=0xFF00. This would explain why the nRFgo Verify option is disabled after programming the S310 SoftDevice, and why the --drv_vector_table_base=0x0 options doesn't function.

    I've not been able to get past read protection via IAR debugger startup .mac files. I've attempted to write the UICR from execUserFlashInit() and then read the modified value from execUserPreload() (target is reset between these two functions) but UICR values do not change.

    Is the S310 intentionally read protected, and is there any way around this? It appears to break IAR debugger start-up.

    Thanks and Best Regards, Matt

Reply
  • It appears that, unlike the S110, the S310 is read-protected after erase/program with nRFgo Studio. I can read region 0 in the S110, but debugger reads in region 0 return 0 for the S310. After starting the debugger, for the S110 I have UICR.RBCONF[15:0]=0xFFFF and for the S310 I have UICR.RBCONF[15:0]=0xFF00. This would explain why the nRFgo Verify option is disabled after programming the S310 SoftDevice, and why the --drv_vector_table_base=0x0 options doesn't function.

    I've not been able to get past read protection via IAR debugger startup .mac files. I've attempted to write the UICR from execUserFlashInit() and then read the modified value from execUserPreload() (target is reset between these two functions) but UICR values do not change.

    Is the S310 intentionally read protected, and is there any way around this? It appears to break IAR debugger start-up.

    Thanks and Best Regards, Matt

Children
No Data
Related