esp32-elfloader
esp32-elfloader copied to clipboard
Example payload cannot run new compile ELF
Hi. I was able to run the test payload defined as a C array in the payload.h: unsigned char example_payload_payload_elf[].
However when I try to compile the example main.c code to new ELF and put the new ELF into the C array for loading & running, the board crashed.
The command line to compile:
d:\PlatformIO\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-gcc -fno-common -Wl,-r -nostartfiles -nodefaultlibs -nostdlib -g -o payload.elf -Wl,-e,local_main -Wl,-Tesp32.ld main/main.c
d:\PlatformIO\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-strip --strip-unneeded payload.elf
My board is an ESP32-S3.
Please advise. Thanks.