This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Flash and debug using eclipse and GNU

Hi,

I used the code ble_app_uart_c on board 10028 as a base for my custom board.

My board is nrf51822 QFAA based so I changed all occurances of nrf51422 to nrf51822 and xxac to xxaa on the makefile. I also changed the linker file to the toolchain default "nrf51_xxaa.ld" file. and changed the board definition to my custom board.

The program compiles fine. When I load the .hex file (before loading the softdevie) using NRFStudio the LEDs blink one or two times very fast and then stay ON. If I load the softdevice after that the LEDs never turn ON. And if I load the softdevice before the application I get a message when loading the application telling than I am trying to write a softdevice region.

I made sure to load the s130 softdevice found in "D:\nrf_SDK_12.2.0\components\softdevice\s130\hex\s130_nrf51_2.0.1_softdevice.hex

Trying to debug on eclipse never worked, I have no idea why or how to solve that issue.

If you can please help solve any issue it would be great.

Here is a folder containing documents about all the issues I described:Issue_docs.zip

Thanks

Parents
  • Are you not able to flash the softdevice? It sounds like your application is placed in the softdevice region. From your original question you wrote "I also changed the linker file to the toolchain default "nrf51_xxaa.ld" file." Did you change the linker file RAM and FLASH settings to make room for the softdevice? You should rather use the linker file in the project directory, and adjust the size depending on your chip. AA chip have 16kB RAM and 256kB FLASH. Your settings should then be (ble_app_uart_c example in SDK 12.2 for S130 v2.0.1):

    FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
    RAM (rwx) :  ORIGIN = 0x20001eb0, LENGTH = 0x2150
    

    See this tutorial about RAM and ROM management (it's a bit outdated, but the basics still apply).

Reply
  • Are you not able to flash the softdevice? It sounds like your application is placed in the softdevice region. From your original question you wrote "I also changed the linker file to the toolchain default "nrf51_xxaa.ld" file." Did you change the linker file RAM and FLASH settings to make room for the softdevice? You should rather use the linker file in the project directory, and adjust the size depending on your chip. AA chip have 16kB RAM and 256kB FLASH. Your settings should then be (ble_app_uart_c example in SDK 12.2 for S130 v2.0.1):

    FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
    RAM (rwx) :  ORIGIN = 0x20001eb0, LENGTH = 0x2150
    

    See this tutorial about RAM and ROM management (it's a bit outdated, but the basics still apply).

Children
Related