Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example payload cannot run new compile ELF #3

Open
tomphan opened this issue Sep 2, 2024 · 1 comment
Open

Example payload cannot run new compile ELF #3

tomphan opened this issue Sep 2, 2024 · 1 comment

Comments

@tomphan
Copy link

tomphan commented Sep 2, 2024

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.

@tomphan
Copy link
Author

tomphan commented Sep 4, 2024

I was able to compile the payload, by downloading the archived ESP-IDF v3.3 (using makefile instead of CMake) and run it in Ubuntu instead of Windows.

The issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant