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 execute code from RAM on nRF51 using GCC Environment

How to execute code from RAM on nRF51 using GCC Environment

Parents
  • Hi,

    You can place a function in RAM in GCC like this:

    __attribute__((used, long_call, section(".data"))) void some_func(void)
    {
      do_something();
    }
    

    Then you should check the .map file to see that it's located somewhere in RAM (0x2000XYZZ)

    Cheers, Håkon

  • Hi Håkon,

    To give you a more information. Please find below versions of the software and hardware I am using.

    Soft device :s110_nrf51822_7.0.0_softdevice SDK : 6.1 Hardware : N51822 QFACA1 1442AB (version 3.1 -32 KB RAM variant).

    Can you suggest me which files and what changes are needed to come out of the above error.

    Regards, Anand

Reply
  • Hi Håkon,

    To give you a more information. Please find below versions of the software and hardware I am using.

    Soft device :s110_nrf51822_7.0.0_softdevice SDK : 6.1 Hardware : N51822 QFACA1 1442AB (version 3.1 -32 KB RAM variant).

    Can you suggest me which files and what changes are needed to come out of the above error.

    Regards, Anand

Children
No Data
Related