mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-17 10:33:49 +01:00
19078: cpu/esp32: define FLASHFILE_POS r=benpicco a=gschorcht ### Contribution description Instead of using a fixed position of the image file in the flash, the variable `FLASHFILE_POS` is used which allows to override the default position of the image in the flash at 0x10000. This PR is a prerequisite for the `periph_flashpage` implementation PR #19079. ### Testing procedure Flashing a ESP32x SoC should work with `FLASHFILE_POS=0x20000`, for example: ``` USEMODULE=esp_log_startup FLASHFILE_POS=0x20000 BOARD=esp32-wroom-32 make -j8 -C tests/shell flash ``` The bootloader output should give `00020000` as offset for the `factory` partition ``` I (75) boot: Partition Table: I (78) boot: ## Label Usage Type ST Offset Length I (84) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (91) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (97) boot: 2 factory factory app 00 00 00020000 000199b0 I (104) boot: End of partition table ``` and ``` I (125) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=02140h ( 8512) map ``` during the load of the image. ### Issues/PRs references Prerequisite for PR #19079 Co-authored-by: Gunar Schorcht <gunar@schorcht.net>