dchristl / macless-haystack

Create your own AirTag with OpenHaystack, but without the need to own an Apple device
GNU General Public License v3.0
414 stars 66 forks source link

How to build firmware for esp32 #139

Closed Philip2809 closed 4 weeks ago

Philip2809 commented 4 weeks ago

Hey!

I cant figure out how to build the esp32 firmware. I get this error:

FAILED: openhaystack.elf
cmd.exe /C "cd . && C:\Espressif\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address  -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32=0 -Wl,--Map=C:/Philip/GitHub/macless-haystack/firmware/ESP32/build/openhaystack.map -Wl,--no-warn-rwx-segments -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32.peripherals.ld -T esp32.rom.ld -T esp32.rom.api.ld -T esp32.rom.libgcc.ld -T esp32.rom.newlib-data.ld -T esp32.rom.syscalls.ld -T esp32.rom.newlib-funcs.ld -T memory.ld -T sections.ld @CMakeFiles\openhaystack.elf.rsp -o openhaystack.elf  && cd ."
C:/Espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf/freertos/libfreertos.a(app_startup.c.obj):(.literal.main_task+0x24): undefined reference to `app_main'
C:/Espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf/freertos/libfreertos.a(app_startup.c.obj): in function `main_task':
C:/Philip/esp-idf-v5.3.1/esp-idf-v5.3.1/components/freertos/app_startup.c:199:(.text.main_task+0x99): undefined reference to `app_main'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the C:\Philip\GitHub\macless-haystack\firmware\ESP32\build\log\idf_py_stderr_output_66672 and C:\Philip\GitHub\macless-haystack\firmware\ESP32\build\log\idf_py_stdout_output_66672

It creates the bootloader and partitions but not the main .bin, any advice?

Philip2809 commented 4 weeks ago

nvm just realized i need platformio stuff, sorry