You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some test applications are small enough to be loaded into RAM of the target chip, and don't have to be flashed. Loading into RAM is typically faster than flashing.
The task is to support running tests with loadable ELF files for idf, jtag and qemu plugins.
For the ESP chips, ELF files can be loaded into the chip RAM in two ways:
Using esptool.py. In this case, the ELF file first needs to be converted into a .bin file (using esptool.py elf2image). Then the resulting .bin file can be loaded into chip RAM using esptool.py load_ram. The program is loaded and immediately starts to execute.
Over JTAG. In this case, the program can be loaded into RAM using GDB load command. (This approach works for all chips which have OpenOCD support, not necessarily ESPs.)
Note 1: we need to be careful not to reset the chip after loading the program and before running the test. Unlike the case when the program is flashed to the chip, the program loaded into RAM will be lost after reset. Then the chip will execute whichever program is stored in flash (if any).
Note 2: not every ELF file can be loaded into ESP chip RAM using the options above. When building an app using ESP-IDF, the option CONFIG_APP_BUILD_TYPE_ELF_RAM should be enabled. If it is not enabled, the resulting ELF file can't be loaded into RAM.
It is also possible to build loadable ELF files without IDF using the latest esp-2022r1-rc1 GCC based toolchain. (For the ESP32 only, so far.) For instructions, see internal merge request idf/newlib-cygwin!44.
github-actionsbot
changed the title
[idf,jtag,qemu] Support running tests built as loadable ELF files
[idf,jtag,qemu] Support running tests built as loadable ELF files (RDT-236)
Jul 14, 2022
Some test applications are small enough to be loaded into RAM of the target chip, and don't have to be flashed. Loading into RAM is typically faster than flashing.
The task is to support running tests with loadable ELF files for
idf
,jtag
andqemu
plugins.For the ESP chips, ELF files can be loaded into the chip RAM in two ways:
esptool.py
. In this case, the ELF file first needs to be converted into a .bin file (using esptool.py elf2image). Then the resulting .bin file can be loaded into chip RAM usingesptool.py load_ram
. The program is loaded and immediately starts to execute.load
command. (This approach works for all chips which have OpenOCD support, not necessarily ESPs.)Note 1: we need to be careful not to reset the chip after loading the program and before running the test. Unlike the case when the program is flashed to the chip, the program loaded into RAM will be lost after reset. Then the chip will execute whichever program is stored in flash (if any).
Note 2: not every ELF file can be loaded into ESP chip RAM using the options above. When building an app using ESP-IDF, the option
CONFIG_APP_BUILD_TYPE_ELF_RAM
should be enabled. If it is not enabled, the resulting ELF file can't be loaded into RAM.It is also possible to build loadable ELF files without IDF using the latest esp-2022r1-rc1 GCC based toolchain. (For the ESP32 only, so far.) For instructions, see internal merge request idf/newlib-cygwin!44.
For the old TTFW based implementation, see https://github.com/espressif/esp-idf/blob/master/tools/test_apps/system/gdb_loadable_elf/app_test.py.
The text was updated successfully, but these errors were encountered: