This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x starter kit - linker memory settings

Other Parts Discussed in Thread: AM3358

Hi, when linking my project I got the message:  CortxA8 Loader: One or more sections of your program falls into a memory region that is not writable..............."

I selected O3 as optimization compiler option, to exclude unused library functions from linking. Am I right?

I  include here the 3312.map file.doc .map file for reference.

thanks in advance

Stefano 

  • Stefano,

    According to the map file you sent, the linker successfully allocated all the code and data to the designated memory regions (specified by the linker CMD file). I see that all your program and variables are properly allocated to P_MEM and D_MEM at addresses 0x00000000 and 0x30000000 respectively. By looking at section 2.1 of the AM335x TRM (SPRUH73) you can see these addresses are mapped to the GPMC memory.

    The error message, however, happens when you launch the debugger (not while the linker is running) and try to load the code to the target. CCS is reporting it can't write to some or all portions of this address range (usually the error message is followed by the address that showed the failure). 

    Therefore, in order to do that you will either have to be sure of a two things:

    - is there valid physical memory at these address ranges? This would be required to be present in your hardware board. Be aware that some portions of this address range are allocated to the Boot ROM (thus un-writeable).

    - is the GPMC properly configured to access this external memory? This requires configuring this peripheral via software to properly enable this and access the specific memory region. This configuration can also be done via a script that runs when the debugger launches (in TI lingo this is called a GEL script).

    CCSv5.4 ships with linker CMD files (located under the directory (<CCS_INSTALL_DIR>/ccsv5/ccs_base/arm/include) and GEL script files designed to be used in several development boards such as BeagleBone, AM3358 Starter Kit, etc. (these are properly configured when you create a target configuration for the development board you are using).

    If you need to modify the linker CMD files, please refer to the section "Usage" of this page. If you need to modify the GEL files to properly configure a specific detail of your hardware, I strongly suggest checking with the experts in the AM335x device forum (they know a lot more about hardware than us here).

    BTW, the optimization does not affect this particular scenario and outcome.

    Hope this helps,

    Rafael

  • Thanks Rafael! Now it's working!  The problem was the wrong .cmd linker file. I've just made some correction to the new one downloaded from your URL ( that is, changing .bss setting from RAM to DDR to make them fit and adding libraries paths)

    Thank you very much!

    Ste