idf-eclipse-plugin icon indicating copy to clipboard operation
idf-eclipse-plugin copied to clipboard

bootloader.elf: 1: Syntax error: end of file unexpected (IDFGH-14705) (IEP-1481)

Open Axa-Ru opened this issue 10 months ago • 3 comments

Answers checklist.

  • [x] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • [x] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • [x] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v 5.4

Operating System used.

Linux

How did you build your project?

Eclipse IDE

If you are using Windows, please specify command line type.

None

What is the expected behavior?

Expected flash to esp32 MCU

What is the actual behavior?

In Esp-IDF the project is built without errors and is successfully flashed. In Eclipse the project is built without errors.

esp32-ttg0-display.bin binary size 0x331d0 bytes. Smallest app partition is 0x100000 bytes. 0xcce30 bytes (80%) free. [100%] Built target app_check_size [100%] Built target app Build complete (0 errors, 0 warnings): /home/axa/eclipse-wrkspace/esp32-ttgo-display/build/default

At the flashing stage it gives an error

/home/axa/eclipse-wrkspace/esp32-ttgo-display/build/default/bootloader/bootloader.elf: 1: Syntax error: end of file unexpected

Steps to reproduce.

  1. In Eclipse IDE Run->Run

Build or installation Logs.


More Information.

Operating system Linux Mint. IDF-Esp 5.4 Eclipse 4.34.0

Axa-Ru avatar Feb 21 '25 21:02 Axa-Ru

project on Github: https://github.com/rdorbolo/esp32-ttgo-display/tree/main

Axa-Ru avatar Feb 21 '25 22:02 Axa-Ru

Hi @Axa-Ru! This is an automated response. If you don’t find the answer helpful, please check the ESP32 IDE forum (https://www.esp32.com/viewforum.php?f=40) or GitHub issues (https://github.com/espressif/idf-eclipse-plugin/issues) to see if the issue has already been discussed.


Based on the information provided in the knowledge sources, I can offer the following response to the user's issue:

The error you're encountering seems to be related to the bootloader.elf file during the flashing process in Espressif-IDE. This could be due to a compatibility issue between your ESP-IDF version and the Espressif-IDE version you're using. Here are some suggestions to troubleshoot the issue:

  1. Check your Espressif-IDE version: Espressif-IDE version 3.0 and later supports ESP-IDF version 5.x and above. Since you're using ESP-IDF v5.4, make sure you have the latest version of Espressif-IDE installed. You can find the latest version in the Downloads section.

  2. Verify your Java version: Ensure you have Java 11 or later installed, as this is required for the latest versions of Espressif-IDE. You can check your Java version using the command java -version in the terminal.

  3. Check the error log: Open the Error Log view in Eclipse by going to Window > Show View > Error Log. This may provide more detailed information about the error you're encountering.

  4. Examine the Console View Log: Access the Console View by selecting Window > Show View > Console. This might show additional warnings or errors related to the flashing process.

  5. Enable CDT Global Build Logging: Go to Preferences > C/C++ > Build > Logging and enable global build logging. This could provide more insight into the build process.

  6. Check the Espressif IDF Tools Console: This console is part of the Console view and opens during the installation of IDF tools from Eclipse. It might contain relevant error messages.

If the issue persists after trying these steps, you may want to consider reporting the issue on the ESP-IDF Eclipse Plugin GitHub repository, providing the error logs and steps to reproduce the issue.

Espressif-IDE Documentation Espressif-IDE Troubleshooting Guide

github-actions[bot] avatar Mar 11 '25 06:03 github-actions[bot]

Hello,

/home/axa/eclipse-wrkspace/esp32-ttgo-display/build/default/bootloader/bootloader.elf

Pointing to the wrong build directory: /build/default/. I believe it should be /build/bootloader/bootloader.elf instead.

Please check if you have configured a custom build directory. By default, it should be project/build, but in your case, it is showing /build/default/.

You can also set a custom build directory name in the configuration page.

Image

kolipakakondal avatar Mar 18 '25 06:03 kolipakakondal

Since there was no further response from the user - closing. If you will encounter more problems feel free to reopen this or create a new issue.

Cheers!

Indastri avatar Aug 05 '25 12:08 Indastri