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

HRM Example on Sparkfun nRF52 board

Hi

I have this board: www.sparkfun.com/.../13990 connected to a PCA10040 Nordic board. I am able to write and debug the Sparkfun board (the blinky LED example). I am now trying to get the ANT+ HRM example to work.

I am using SDK v11.

My understanding is I need to first flash the SoftDevice to the Sparkfun board. I did so using the nRFgo Studio application. The SoftDevice I used was the ANT_s332_nrf52_2.0.1. Here is a screenshot after I flashed the softdevice:

image description

I am using Eclipse on OSX, with armgcc. I believe I need to change the Linker script to change the memory configurations. What I don't know is to what..

I started with the blinky example and my Linker script is as such:

    /* Linker script to configure memory regions. */

SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)

MEMORY
{
  FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x80000
  RAM (rwx) :  ORIGIN = 0x20000000, LENGTH = 0x10000
}

SECTIONS
{
  .fs_data :
  {
    PROVIDE(__start_fs_data = .);
    KEEP(*(.fs_data))
    PROVIDE(__stop_fs_data = .);
  } > RAM
} INSERT AFTER .data;

INCLUDE "nrf5x_common.ld"

But I am quite sure this will not work. I believe this will overwrite the SoftDevice..

Can anyone tell me what my linker script should be so that when I flash the HRM binary it does not overwrite the SoftDevice ? (I assume that's what I am trying to avoid). Please keep in mind that I am not using the exact HRM example but one that is slightly modified.

If there is anything else I have missed, please let me know.

Thanks

J

Parents
  • You can just use the same Memory configuration as the linker script for the gcc toolchain in our SDK, ble_ant_app_hrm_gcc_nrf52.ld. You'll find it in \examples\multiprotocol\ble_ant_app_hrm\pca10040\s332\armgcc. You may also have to add the pwr_mgmt_data section if you're using that in your modified example.

       /* Linker script to configure memory regions. */
    
    SEARCH_DIR(.)
    GROUP(-lgcc -lc -lnosys)
    
    MEMORY
    {
      FLASH (rx) : ORIGIN = 0x27000, LENGTH = 0x59000
      RAM (rwx) :  ORIGIN = 0x20003800, LENGTH = 0xc800
    }
    
    SECTIONS
    {
      .fs_data :
      {
        PROVIDE(__start_fs_data = .);
        KEEP(*(.fs_data))
        PROVIDE(__stop_fs_data = .);
      } > RAM
    } INSERT AFTER .data;
    
    INCLUDE "nrf5x_common.ld"
    
  • Hi,

    Sorry for the delay in replying and thanks so much for taking the time. I have changed the linker script for exactly as is in the example you outlined. My debugger is no longer stopping on the first line of my application. It does when using the original linker script. Any ideas what might cause this ?

    I am using Eclipse as an IDE and debugger.

    Thanks.

    J

Reply Children
No Data
Related