dchristl / macless-haystack

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

esp firmware error FAILED: openhaystack.elf #44

Closed ju5t3nc4s3 closed 4 months ago

ju5t3nc4s3 commented 6 months ago

i like to compile my own firmware for a newer board ESP32-C2 .were to start cant find that this board is compatable with IDE. i have these nano boards from aliexspress esp8684 wroom 07 . im gona itergrate them into usb cables log output error
[817/819] Linking CXX executable openhaystack.elf

FAILED: openhaystack.elf

cmd.exe /C "cd . && C:\Espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin\riscv32-esp-elf-g++.exe -march=rv32imc_zicsr_zifencei -nostartfiles -march=rv32imc_zicsr_zifencei --specs=nosys.specs -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32C2=0 -Wl,--Map=C:/Users/Ju5t3nc4s3/Documents/macless-haystack-main/firmware/ESP32/build/openhaystack.map -Wl,--no-warn-rwx-segments -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32c2.peripherals.ld -T esp32c2.rom.ld -T esp32c2.rom.api.ld -T esp32c2.rom.rvfp.ld -T esp32c2.rom.newlib.ld -T esp32c2.rom.version.ld -T esp32c2.rom.mbedtls.ld -T esp32c2.rom.newlib-nano.ld -T esp32c2.rom.heap.ld -T memory.ld -T sections.ld @CMakeFiles\openhaystack.elf.rsp -o openhaystack.elf && cd ."

c:/espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld.exe: esp-idf/freertos/libfreertos.a(app_startup.c.obj): in function `main_task':

C:/Espressif/frameworks/esp-idf-v5.1.2/components/freertos/app_startup.c:206: undefined reference to `app_main'

collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed.

dchristl commented 6 months ago

Hello,

I don't understand everything what you are trying to achieve, but your error seems, that the folder structure ist not correct. This is because the project is in "platformio"-style and not the default for the esp32 toolchain. You can have a look at my other project the instructions are working here, too. You just have to add your board to platform.ini to compile for ESP32 C2. You can find an example how this is will be done here

Regards, Danny

ju5t3nc4s3 commented 6 months ago

i cant get the board manager to show up for this esp32-c2/esp8684 in platformio or in arduino ide. this is why i tryed to buils the firmware with exspressif ide.py it shows up with 5.1 esp32-c3 board adds but no esp32-c2

dchristl commented 6 months ago

I'm sorry; I don't understand you. If the device is not recognized, it has nothing to do with the IDE (Platformio also uses the Espressif framework under the hood). ArduinoIDE is a different programming language. Do you mean this by board manager: image

It seems that this board is currently supported, but released yet. But you can find a workaround for that.

Can't really help or test it, because I don't have such a board.

ju5t3nc4s3 commented 6 months ago

is it posable to get this into 2mb flash its showing i need (.1mb)

dchristl commented 6 months ago

Sorry, I don't understand what you are trying to say. The firmware is below 1 MB.

ju5t3nc4s3 commented 6 months ago

finaly got it running, when im done this will be the worlds smallest gps tracker, it will be imbeded into a usb charge cable and very undetectable IMG_20240123_205641__01 IMG_20240211_215209

supaeasy commented 5 months ago

Interesting but I don't understand your use case.