Linker giving error when building the ble_app_alert_notification_pca10028_s130

Hi,

I have installed Segger Studio for ARM v6.22a.

I have also installed the SDK5 version 12.3.0.

I imported the IAR project project  ble_app_start_notification_pca10028_s130 (.eww file) 

I also selected internal toolchain on the popup.

I also followed the directions followed for importing KEIL projects into the workspace :https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/segger-embedded-studio-a-cross-platform-ide

I was not able to "import section placement" as the option is not showing up when I right click on the project name. Is it because I am using a non commercial license?

Now when I do the build I get a whole lot of linker errors.

Can you please tell me what I am missing?

Please see error image below:

Rajkumar

Parents
  • Hi

    Glad to hear you were able to flash the device now. When the ble_stack_init() returns error code 8, which means it is in an "invalid state", that generally means that the BLE stack is already enabled, and you're trying to enable it again it seems. Are you calling it multiple times, or what?

    What kind of error are you seeing when the peer_manager_init() fails? What changes did you make between the first and second time you flash the SoftDevice and application code to your nRF51?

    Best regards,

    Simon

  • Hi Simon,

    Sorry for the delay in responding.

    I wanted to track the changes I did from the beggining:

    I started again by importing the project ble_app_proximity.

    1. I followed the importing procedures as described above.

    2. I imported the flash_placement.xml as shown.

    3. I was getting the linking errors. I realized that I had to change "flash1" to "flash" and "ram1" to ram" in the memory placement macro in the project options.

    4. In the ses_nrf51_startup.s file, I had to change, "__SRAM_segment_end__" to "__RAM_segment_end__".

     (with step 3 and step4", all the linker errors went away)

    5. I also made changes to the Section placement macros to ensure RAM_START and FLASH_START as per the s130, 2.0.1 version guidelines.

    With this I was able to compile and link the application successfully

    Now, when I flashed the softdevice and then started the debugger, the application got flashed.

    When I started stepping through the main program, at "ble_stack_init" when I stepped into this function and continued stepping inside the "ble_stack_init" function, when I did "softdevice_enable()", the return value always shows error code "0x04" and the application goes into fault.

    Can you please tell me what I could be doing wrong? Thank you very much for your help. (There were no changes made to the code)

    regards,

    Rajkumar

  • Hi

    Error code 0x04 is an NRF_ERROR_NO_MEM, pointing to there not being enough memory available. You say that you have changed the RAM_START and FLASH_START, macros, but did you also edit the RAM and FLASH_SIZE to match these values? As explained in the RAM and Flash memory adjustment blog post, the size should be set to be the device's total RAM/Flash minus the RAM_START and FLASH_START.

    Additionally, it's not generally a good idea to step through the SoftDevice functions/initialization, as some of them are time sensitive and will time out returning errors if they aren't run at run-time.

    Best regards,

    Simon

Reply
  • Hi

    Error code 0x04 is an NRF_ERROR_NO_MEM, pointing to there not being enough memory available. You say that you have changed the RAM_START and FLASH_START, macros, but did you also edit the RAM and FLASH_SIZE to match these values? As explained in the RAM and Flash memory adjustment blog post, the size should be set to be the device's total RAM/Flash minus the RAM_START and FLASH_START.

    Additionally, it's not generally a good idea to step through the SoftDevice functions/initialization, as some of them are time sensitive and will time out returning errors if they aren't run at run-time.

    Best regards,

    Simon

Children
No Data
Related