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.

AM2634: CCS: Memory Configurator putting code blocks into flash?

Part Number: AM2634
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi, I am checking on AM2634 and configured an example project in CCS 20.0.1.4.

When I go into system configurator, the default configuration is that there is a memory region in FLASH with attributes "Read, Write, Execute, Initialize".

I am wondering, why can I move e.g. .text and .rodata sections to the FLASH and "Memory Allocation" view shows that the sections are only allocated in FLASH, not in OCRAM. I achieved this be selecting Run Memory of code and read-only data as FLASH (see picture below).

As far as I understood from the datasheet and TRM of AM2634, the device doesn't support code execution from flash and thus should be copied into RAM before execution and also allocate memory in OCRAM.

Shouldn't it appear in the OCRAM section of memory allocation view then too or is it possible to execute this section directly from flash without copying before?

Could you please help me out here?

  • As far as I understood from the datasheet and TRM of AM2634, the device doesn't support code execution from flash and thus should be copied into RAM before execution and also allocate memory in OCRAM.

    Correct. That requires XIP which is not available. You can only use flash for storing the SBL and Application at boot time and general mass storage of files etc.

    FLASH with attributes "Read, Write, Execute, Initialize".

    I can see why this is confusing. Memory Configurator is not checking this is sensible for your device. They are default settings for a broad range of SOCs. Linker attributes are largely ignored anyway as MPU is used to decide these permissions.

    Shouldn't it appear in the OCRAM section of memory allocation view then too or is it possible to execute this section directly from flash without copying before?

    I'm not sure I understand the question fully but I think you are wondering why it is possible to choose FLASH memory region for .text and .rodata. If so, then the answer is that the memory configurator is not checking that this is sensible decision for your device. You can choose it, but it won't work.

    Whether or not it should challenge you if your make this selection is a matter for TI.

  • Hi Thomas,

    I can confirm that your understanding is correct - the AM2634 does not support direct code execution from FLASH. The CCS memory configuration view appears to be a bug, which should be fixed in the next release.

    Here's what should be happening:

    • The FLASH "Execute" attribute in CCS likely indicates that the section contains executable code, not that it executes directly from FLASH.

    During boot:

    • Code sections (.text) are stored in FLASH

    • Boot code copies these sections to OCRAM

    • Execution occurs from OCRAM

    • The Memory Allocation view is showing the load-time allocation (where sections are stored in FLASH), not the run-time location (OCRAM).

    Thinking about the CCS behavior:

    • Tool might be abstracting the copy process

    • Could be showing logical rather than physical mapping
    • This appears to be a tool visualization issue rather than an actual execution-from-FLASH configuration. The hardware should still ensure code runs from OCRAM regardless of how CCS displays the allocation.

    Looking deeper at memory attributes:

    • "Read, Write, Execute, Initialize" on FLASH is concerning

    • Should only have Read and Initialize

    • Execute should be reserved for OCRAM

    Could you elaborate your use-case here, also the output that you get when you run your program? I would like to confirm if it is just a visual and sysconfig issue, or if a functional issue is also present.

    Thanks and regards,
    Akshit