SPE btcm Region Overflow: Code Fitting & Debugging Issues

Hi all, I’m developing with the SPE R5 core on the Jetson AGX Orin and have encountered two issues: compilation overflow and runtime freezing.

The compilation error message is as follows:

/home/jhy/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /home/jhy/Jetson/spe-freertos-bsp/spe-freertos-bsp/rt-aux-cpu-demo-fsp/out/t23x/spe.elf section .text' will not fit in region btcm’
/home/jhy/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: region `btcm’ overflowed by 57200 bytes

  1. Can the btcm region be expanded?
    The linker reports that the .text section doesn’t fit in btcm. Is code trimming the only solution, or are there ways to increase the size/capacity of the btcm region itself?

  2. Alternative online debugging methods (beyond serial port)?
    Even after trimming code or using compile optimizations, the program freezes at runtime. Serial port debugging works, but are there other online debugging tools/techniques (e.g., debuggers, runtime monitors) that can help diagnose the freeze?

Hello,

  1. For code side, the limitation comes from hardware. All SPE code/data are stored in TCM. Your solution is correct. Trim code/data and compile options are good. Considering the limited perf of SPE R5 core, it’s not a good idea to keep that firmware too large.
  2. ARM debugger may help little. SPE firmware runs at very beginning stage, and it may hang the system is there’s something wrong. A suggestion is to utilize the IVC channel to activate the SPE code after kernel’s up, together with some debug/print code. Such firmware development may still need deep understanding of the low level of system.

Just a few suggestions.

br

ChenJian

Hello

Thank you very much for your reply.

Secondly, I would like to ask whether, apart from the SPE R5 core, there are other R5 cores available for development?

Best regards

Jhy

No other core. SPE R5 is the only publicly available core in L4T BSP for TX2/Xavier/Orin series.

br

Chenjian