esp32-hello
esp32-hello copied to clipboard
Example when flashed just boot loops the esp32
When compiling and flashing the code in this repo, the esp32 just enters a bootloop, with the following console output:
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3f400020,len:30732
Any idea where we can start debugging this?
Actually yes!
This package does not flash the bootloader or partition table to the esp32.
I fixed it by flashing a standard esp-idf C++ project and inspecting build/flasher_args.json
Mine looked similar to:
{
"write_flash_args" : [ "--flash_mode", "dio",
"--flash_size", "detect",
"--flash_freq", "40m" ],
"flash_settings" : {
"flash_mode": "dio",
"flash_size": "detect",
"flash_freq": "40m"
},
"flash_files" : {
"0x8000" : "partition_table/partition-table.bin",
"0x1000" : "bootloader/bootloader.bin",
"0x10000" : "esp32.bin"
},
"partition_table" : { "offset" : "0x8000", "file" : "partition_table/partition-table.bin" },
"bootloader" : { "offset" : "0x1000", "file" : "bootloader/bootloader.bin" },
"app" : { "offset" : "0x10000", "file" : "esp32.bin" },
"extra_esptool_args" : {
"after" : "hard_reset",
"before" : "default_reset",
"stub" : "TRUE",
"chip" : "esp32"
}
}
pay special attention to the offsets. The typical esptool.py flash command looks similar to:
esptool.py \
--chip esp32 \
elf2image \
--flash_mode "dio" \
--flash_freq "40m" \
--flash_size "2MB" \
-o $TARGET_DIR/esp32-hello.bin \
0x10000 $TARGET_DIR/esp32-hello
Make sure that the offset there matches the flasher_args
There's a command on esptool.py image_info
which can reveal info about an image (docs):
esptool.py --chip esp32 image_info target/xtensa-esp32-none-elf/release/esp32-hello.bin
which might provide additional information.
Doesn't esp-tool embed the bootloader into the image to be flashed tho? Anyway thanks for this, I will play with this project again shortly!
On Wed, 13 May 2020, 20:05 Vincent Khougaz, [email protected] wrote:
Actually yes!
This package does not flash the bootloader or partition table to the esp32.
I fixed it by flashing a standard esp-idf C++ project and inspecting build/flasher_args.json
Mine looked similar to:
{ "write_flash_args" : [ "--flash_mode", "dio", "--flash_size", "detect", "--flash_freq", "40m" ], "flash_settings" : { "flash_mode": "dio", "flash_size": "detect", "flash_freq": "40m" }, "flash_files" : { "0x8000" : "partition_table/partition-table.bin", "0x1000" : "bootloader/bootloader.bin", "0x10000" : "esp32.bin" }, "partition_table" : { "offset" : "0x8000", "file" : "partition_table/partition-table.bin" }, "bootloader" : { "offset" : "0x1000", "file" : "bootloader/bootloader.bin" }, "app" : { "offset" : "0x10000", "file" : "esp32.bin" }, "extra_esptool_args" : { "after" : "hard_reset", "before" : "default_reset", "stub" : "TRUE", "chip" : "esp32" } }
pay special attention to the offsets. The typical esptool.py flash command looks similar to:
esptool.py
--chip esp32
elf2image
--flash_mode "dio"
--flash_freq "40m"
--flash_size "2MB"
-o $TARGET_DIR/esp32-hello.bin
0x10000 $TARGET_DIR/esp32-helloMake sure that the offset there matches the flasher_args
There's a command on esptool.py image_info which can reveal info about an image (docs https://github.com/espressif/esptool#output-bin-image-details-image_info ):
esptool.py --chip esp32 image_info target/xtensa-esp32-none-elf/release/esp32-hello.bin
which might provide additional information.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lexxvir/esp32-hello/issues/4#issuecomment-628186560, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE577PRT2LGPA7MZQTGJC7DRRLVPTANCNFSM4MT2ZGLA .