Compiler optimization not working on SPE for TX2 module

Hello,

When I compile my SPE program with the gcc optimization option “-O”,
the program does not seem to run after I flash it to the TX2?
What is the code size limit for the SPE?
And why am I not able to use compiler optimizations?

Thanks,
Karthik

Hello, retrnace:
As to SPE firmware size limitation, please refer to “doc/known_issues.md”:

# Flashing Failure

When the SPE binary size is greater than 128-kilobytes, flashing fails.
The binary size includes the binary and NVIDIA-specific headers. To workaround
this issue follow below steps.

# For Jetson TX2

Open file flash_l4t_t186.xml, this file can be found under Linux_for_Tegra directory
Look for SPENAME and SPENAME_b partitions and change their size subsections from 131072 to 262144


# For Jetson AGX

Open file flash_t194_sdmmc.xml, this file can be found under Linux_for_Tegra directory
Look for spe-fw and spe-fw_b partitions and change their size subsections from 131072 to 262144



br
Chenjian