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: What is the maximum size of the application?

Part Number: AM2634

Hi there,

I read this thread but still not clear of the maximum size of the code.

AM2634: Maximum application size - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

In SDK examples, it always located code to OCRAM which is 2MB, which means the code size was limited to 2MB.

But in the above thread, it replied that the code size can be more than 2MB, how is that work?

Thanks

  • Hi Phoenix,

    There are several factors which can affect the maximum application image size:

    1. The boot device, if you boot from CAN, UART and SD card, then the file buffer size: BOOTLOADER_APPIMAGE_MAX_FILE_SIZE 0x80000) defined in the main.c limits the maximum size of the application image. It means the application boot image has to be less 512KB.

    2. If you boot from QSPI flash, there is no maximum size limit for the application boot image size, since the SBL_QSPI can read the file in sections. In this case, the MSRAM + TCMs will be the limit for the application image. There are 2MB MSRAM + 128KB per cluster TCM, so the total available on chip memory will be the limit. 2MB + 256KB is the maximum limit for the application image.

    Best regards,

    Ming

  • Hi Ming, 

    Thanks for your replay. There are still questions around this answer:

    2. If you boot from QSPI flash, there is no maximum size limit for the application boot image size, since the SBL_QSPI can read the file in sections. In this case, the MSRAM + TCMs will be the limit for the application image. There are 2MB MSRAM + 128KB per cluster TCM, so the total available on chip memory will be the limit. 2MB + 256KB is the maximum limit for the application image.

    Questions:

    1. when boot from QSPI, why "no maximum size limit"? As you said, the 2MB + 256KB is the maximum size limit at the end. If the MCU can only run the code in MSRAM + TCMs, which means if you put a large app image in external flash, it cannot be loaded into memory to run. So the app image alwasy be limited by MSRAM + TCMs (2MB + 256KB).

    2. In SDK example, I cannot find any program to use TCMs. The linker always target to MSRAM and with the limitation 2MB. If my app image is 2MB + 1KB, how could make it work? Can you give an example of using TCMs to run app image?

    3. Following the question 2, if my application image is less then 64KB, can I only use R5FSS0_CORE0_TCMA (64KB) to run applicaiton without MSRAM?

    Thanks a lot.

  • Hi Phoenix,

    1. What I meant is that there is no limitation from the SBL_QSPI like SBL_UART. Of course, the 2MB+256KB is the ultimate memory size limitation.

    2. In empty_am263x-cc_r5fss0-0_nortos_ti-arm-clang example, the linker.cmd file actually uses the TCMA:

      .vectors:{} palign(8) > R5F_VECS

    If you use R5F_TCMA or R5F_TCMB to replace the OCRAM in linker.cmd, then you can use the TCM instead of OCRAM.

    3. See the answer for item 2.

    Best regards,

    Ming