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

How to run ble_app_hrs project with IAR?

Hi,

  1. I have nRF51822 DK with (s110_nrf51822_7.0.0, nRF51 SDK_v6.1.0.0) and when i try to run the project in IAR 7.20.2 i receive an error.

image description

image description

2 ) My icf file

ble_app_hrs.icf

  1. Error after i added "--drv_vector_table_base=0x0" it is not starts from main. image description
  • I haven't migrated from Keil to IAR and do not have an answer for you on that question. Maybe someone else can help you out

  • The softdevice will specify base addresses for CODE and RAM in the SoftDevice resource requirements section of the specification. These need to be reflected in the linker control file (.icf) in ICFEDIT_intvec_start__, ICFEDIT_region_ROM_start__ and ICFEDIT_region_RAM_start__.

    You'll also want to add --drv_vector_table_base=0x0 to the Extra Options tab of the project options Debugger setup, as described here.

    Hope this helps, Matt


    Hi max, I'm not sure why this isn't working for you, your .icf looks correct. I just verified for myself by going through the following steps on a PCA10004 (nRF51822):

    1. Unpack nrf51_sdk_v6_1_0_b2ec2e6.zip and s110_nrf51822_7.0.0.zip.
    2. Use nRFgo Studio to Erase All, then program s110_nrf51822_7.0.0_softdevice.hex and verify.
    3. Edit nrf51_sdk_v6_1_0_b2ec2e6/nrf51822/Board/nrf6310/s110/ble_app_hrs/iar/ble_app_hrs.icf and change intvec_start and ROM start to 0x00016000, it looks just like your .icf at this point.
    4. Open the IAR workspace in that same directory, I'm using EWARM 7.20.2.7431 w/ Windows 7 x64.
    5. Change Project Options: Debugger Setup tab: Set Diver to J-Link/J-Trace (Run to main is checked) Debugger Download tab: check Verify Download and Use flash loader(s) Debugger Extra Options tab: check Use command line options and add --drv_vector_table_base=0x0

    I left the J-Link/J-Trace settings as they were, except for enabling Log communication in the Connection tab. After doing a Rebuild All I am able to successfully Download and Debug:

    image description

    The Go (->->->) button starts application execution, I can connect using the Master Control Panel app on my android phone. Here is ble_app_hrs.zip from my nrf51_sdk_v6_1_0_b2ec2e6/nrf51822/Board/nrf6310/s110/ for your reference.

    Again, I hope this helps.

    Best Regards, Matt

  • I not migrated. There are to hrs projects(IAR,Keil). Keil project is work fine in DK but IAR has an error

  • not works.

    i added my *.icf

  • I added a screen shot (in is now not stops in "main".

Related