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

IAR + S110 softdevice debugger hangup

Hi there. I'm currently trying to run the BLE_APP_HRS example from IAR workbench on nRF51822-Evaluation-Kit. We are very interested in using this chip in our upcomming products so I'm investigating it's possibilities.

I have used nRFgo Studio 1.17.1.3252 to flash the board with the S110_nRF51822_7.0.0 software. I opened the ble_app_hrs example from the nrf51_sdk_v6_1_0_b2ec2e6 archive from the nrf51822\Board\nrf6310\s110\ble_app_hrs\iar folder in IAR and made changes to the configuration file to reflect the bigger size of the S110 as suggested here on the forums:

` ******** Start of code*********** /###ICF### Section handled by ICF editor, don't touch! / /-Editor annotation file-/ / IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" / /-Specials-/ define symbol ICFEDIT_intvec_start = 0x00016000; / moved the interrupt vectors / /-Memory Regions-/ define symbol ICFEDIT_region_ROM_start = 0x00016000; / moved the start region / define symbol ICFEDIT_region_ROM_end = 0x0003EFFF; define symbol ICFEDIT_region_RAM_start = 0x20002000; define symbol ICFEDIT_region_RAM_end = 0x20003FFF; /-Sizes-/ define symbol ICFEDIT_size_cstack = 0x800; define symbol ICFEDIT_size_heap = 0x800; /*** End of ICF editor section. ###ICF###*/

define memory mem with size = 4G; define region ROM_region = mem:[from ICFEDIT_region_ROM_start to ICFEDIT_region_ROM_end]; define region RAM_region = mem:[from ICFEDIT_region_RAM_start to ICFEDIT_region_RAM_end];

define block CSTACK with alignment = 8, size = ICFEDIT_size_cstack { }; define block HEAP with alignment = 8, size = ICFEDIT_size_heap { };

initialize by copy { readwrite }; do not initialize { section .noinit };

keep { section .intvec }; place at address mem:ICFEDIT_intvec_start { readonly section .intvec }; place in ROM_region { readonly }; place in RAM_region { readwrite, block CSTACK, block HEAP };

I have changed the BOARD_NRF6310 Define into BOARD_PCA10001

I've added the following line to the Extra Options of the debugger tab in settings: --drv_vector_table_base=0x0

******** end of code*********** `

When i try to run the example it compiles without errors and programs the devices via Jlink. I can step through all the lines of code untill the advertising_start(); instruction after which the debugger loses track of the sourcecode and the program counter ends up at the end of the code.

I have tried running the blinky code example in the above matter (without the s110) which gave me no problems. Could you please advise me how to get this example up and running in Iar?

Parents
  • You unfortunately can't stop and resume execution when the softdevice is active. There are various questions/answers in the forum that address this issue, for example here. It sounds like your IAR debug setup is working correctly if you can load, break at main() and single-step through code prior to softdevice startup.

Reply
  • You unfortunately can't stop and resume execution when the softdevice is active. There are various questions/answers in the forum that address this issue, for example here. It sounds like your IAR debug setup is working correctly if you can load, break at main() and single-step through code prior to softdevice startup.

Children
No Data
Related