Hello,
our setup is a bit complex.
In short first:
We use the LTS 2.1.2-compiler and SDK 08.04.00.15 with some small modifications. E.g. we use still the older flash-driver since the new one does not work for our used Flash. We have some code-parts with different load- and run-addresses. The code is copied in via the copy_in and the table-operator is used in the linker-script. This works fine when loaded via CCS but does not work when booting from flash.
In long:
We use code-parts of two relocatable output-modules and a static-library in a UNION in the linker-script with two separate load-addresses and one common run-address:
This is what the MCU1_0_PSRAM_CODE-address looks like when loaded via CCS:
this looks fine!
The PSRAM is connected via the GPMC.
But as soon as we let this one boot from flash (and it's ensured the psram/gpmc is already correctly initialized and set up) it looks like this:
And thus we get an abort when the code will be executed.
Pls note this is the load-address and not the run-address. Since the load-address already has garbage in it this garbage is copied at the run-address -> abort happens.
But for addition: copy-in looks like this:
the map-file looks like this:
the mentioned code is located at the bottom with the 500785d0 load origin.
It also also important to mention that this does not happen once the image was loaded via CCS and a warm reset is done! We can do as many warm resets as we want (via the Sitara itself, not just a CPU Reset). Only when power is disconnected and the device is powered up again this happens. But this is the usual use case so we need to solve this problem.
How does this happen? are there additional infos needed for the rprc-image-generation? Do we need some special handling inside the bootloader for this?
I looked up the documentation and it does only mention a run-address for the sections: software-dl.ti.com/.../TOOLS_BOOT.html
Also I checked the generated rprc/appimage-file and found the part where the rprc-header is, but it only has the run-address and the size inside, no load-address anywhere:
The source-code inside the sdk also just mentions a run-address:
if this feature is missing, we need it to be implemented!
Best regards
Felix