RAM and Flash start adresses

Hello,

I was reading this post on the forum: "Adjustment of RAM and Flash memory - Getting Started - nRF5 SDK guides - Nordic DevZone (nordicsemi.com)"

At point 4. "Change start addresses in Segger Embedded Studio" I wondered if you change the start adress of RAM to an adress that is further then the original adress. What happens to the RAM that is not defined?

Does the linker not put code there anymore? If that is true, is there any way you can put your own specific code there?

I want to achieve a data block where I can put specific arrays in and where the linker does not put anything else in.

  • My concern is that I do not want the linker to put the, wanted to be retained data, in section 14 of RAM while section 1 is the only one is being retained. 

    The sensor came with a library, and that library and its data needs to be retained in anyway possible. I thought this was the best way but now I am questioning it.

    a not initialized RAM section would be perfect too, it will be basically the same thing in the project. The problem is how is this done?

    -

    Is it not just easier to offload the desired data to Flash and then disable all RAM sections?

    Also I am taking over the project from someone else so there has been done quite a few things already. I don't think it is a good idea to switch to nRF connect.

  • Chriis said:
    a not initialized RAM section would be perfect too, it will be basically the same thing in the project. The problem is how is this done?

    This is discussed in one of the links from my first reply.  RE: Some questions about RAM non_init .

    Chriis said:
    Is it not just easier to offload the desired data to Flash and then disable all RAM sections?

    As I mentioned, storing the sensor data to flash is a perfectly fine option. Please just take care to let the flash write completes before putting the device to sleep; it is far less instantaneous than a RAM write.

    Disabling RAM sections is only for lowering power consumption, since your device's sleep time (two hours) is so much more than its wake time (likely seconds just to read the sensor and save it). What are you planning to do with disabling RAM sections?

    Chriis said:
    Also I am taking over the project from someone else so there has been done quite a few things already. I don't think it is a good idea to switch to nRF connect.

    I see. If the project is in maintenance, then that is a fine reason not to change SDK.

    Please be informed that it is the Easter holiday here, and responses on DevZone can be delayed. I will also be out of office from tomorrow and will return to support you from Tuesday next week. My apology for the inconvenience.

    Hieu

  • Ok, I had a hard time understanding that link, I will try and look at it again this week with some other colleagues. 

    Thanks, I will keep in mind that Flash writing is not as fast. Also, my goal with disabling RAM is like you said. The device will be in sleep more often than not, so to reduce power consumption. 

    The thing with Flash is that the program will be more error sensitive. So I don't really want to do that to be honest.

    Happy Holidays, I will try and look at it myself and I will let you know when I am still stuck.

  • Hey Hieu

    First of all, hope you had a good easter!

    Now to the code, I think I almost figured it out.

    I am working with a renesas sensor which has a library that needs to be stored. 
    I want to put this library directly in the linker script so I can know where it is placed and which RAM sections need to be powered.
    However, Nordic uses a custom Linker script that is translated to a normal script when compiled.

    The problem here is, I have no idea how to use or edit this script. So can you tell me and show me how I edit the existing linker script (flash_placement.xml) so I can put the object file directly in the linker?

    So I want to connect this file to the linker. It is 6048 Bytes.

  • Hi Chriis,

    I had a good time. Thank you Smiley

    If you want to integrate a library into your project, shouldn't it be on Flash memory and not on RAM? Or perhaps there are some special functionalities that you need on RAM?

Related