uploaded 8 months ago
Espressif ELF(Executable and Linkable Format) Loader


## Description

[![Component Registry](](

Espressif ELF(Executable and Linkable Format) loader is a software development kit that is developed based on the ESP-IDF, mainly used to load ELF file compiled based on ESP32 series SoCs to the executable memory area, then link and execute it.

In this way, the application does not need compile into the whole firmware in advance. It is like running the compiled program through terminal input `./main.o` on the Ubuntu platform automatically, which realizes the separation of application and kernel.

This ELF loader supports following SoCs:

- ESP32
- ESP32-S2, support running ELF in PSRAM
- ESP32-S3, support running ELF in PSRAM

### Usage

#### Firmware

Add a dependency on this component in your component or project's idf_component.yml file.

      espressif/elf_loader: "0.*"

Enable ELF loader in the menuconfig:

Component config  --->
    ESP-ELFLoader Configuration  --->
        [*] Enable Espressif ELF Loader

Add API calls in your project as follows:

#include "esp_elf.h"

    esp_elf_t elf;

    // Your Code

    esp_elf_relocate(&elf, elf_file_data_bytes);
    esp_elf_request(&elf, 0, argc, argv);

#### ELF APP

To use this feature to compile ELF file, including the required CMake file in your project's CMakeLists.txt file after the line project(XXXX).


# Add

Build the project as an ordinary ESP-IDF project, and then the ELF file named `` is in the build directory.

### Adding the Component to Your Project

Please use the component manager command add-dependency to add the elf_loader component as a dependency in your project. During the CMake step, the component will be downloaded automatically.

``` add-dependency "espressif/elf_loader=*"

### Examples

Please use the component manager command create-project-from-example to create a project from the example template.

``` create-project-from-example "espressif/elf_loader=*:elf_loader_example"

This command will download the example elf_loader_example into the current folder. You can navigate into it to build and flash the example.

Alternatively, you can download examples from the esp-iot-solution repository:
1. [build_elf_file_example](
2. [elf_loader_example](


Supports all targets

License: Apache-2.0

To add this component to your project, run: add-dependency "espressif/elf_loader^0.1.0"

or download archive


  • Downloaded in total
    Downloaded in total 12 times
  • Downloaded this version
    This version: 12 times


espressif/elf_loader version: 0.1.0