.cargo/config.toml file is like below but while building the first example template I see restart error after flash to ESP32-C6.
[build]
target = "riscv32imac-esp-espidf"
[target.riscv32imac-esp-espidf]
linker = "ldproxy"
runner = "espflash flash --monitor"
rustflags = [ "--cfg", "espidf_time64"]
[unstable]
build-std = ["std", "panic_abort"]
[env]
MCU="esp32c6"
# Note: this variable is not used by the pio builder (`cargo build --features pio`)
ESP_IDF_VERSION = "v5.4.1"
IDF_PATH = "C:\\Espressif\\frameworks\\esp-idf-v5.4.1"
ESP_IDF_TOOLS_INSTALL_DIR = "global"
ESP_IDF_PATH_ISSUES = 'warn'
I (26) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader
I (27) boot: compile time Jun 7 2023 08:02:08
I (29) boot: chip revision: v0.2
I (32) boot.esp32c6: SPI Speed : 40MHz
I (37) boot.esp32c6: SPI Mode : DIO
I (41) boot.esp32c6: SPI Flash Size : 4MB
I (46) boot: Enabling RNG early entropy source...
ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x10 (LP_WDT_SYS),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x4086c410,len:0xd48
load:0x4086e610,len:0x2d68
load:0x40875720,len:0x1800
entry 0x4086c410
I (24) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader
I (24) boot: compile time Jun 7 2023 08:02:08
I (25) boot: chip revision: v0.2
I (29) boot.esp32c6: SPI Speed : 40MHz
I (34) boot.esp32c6: SPI Mode : DIO
I (38) boot.esp32c6: SPI Flash Size : 4MB
I (43) boot: Enabling RNG early entropy source...
I (49) boot: Partition Table:
I (52) boot: ## Label Usage Type ST Offset Length
I (59) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (67) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (74) boot: 2 factory factory app 00 00 00010000 003f0000
I (82) boot: End of partition table
I (86) esp_image: segment 0: paddr=00010020 vaddr=42000020 size=51fb0h (335792) map
I (163) esp_image: segment 1: paddr=00061fd8 vaddr=40800000 size=06040h ( 24640) load
I (169) esp_image: segment 2: paddr=00068020 vaddr=42058020 size=2add0h (175568) map
I (206) esp_image: segment 3: paddr=00092df8 vaddr=40806040 size=039ach ( 14764) load
I (210) esp_image: segment 4: paddr=000967ac vaddr=408099f0 size=01cdch ( 7388) load
I (216) boot: Loaded app from partition at offset 0x10000
I (218) boot: Disabling RNG early entropy source...
I (235) cpu_start: Unicore app
E (243) cpu_start: Invalid app image header
abort() was called at PC 0x40800e53 on core 0
0x40800e53 - uart_ll_set_baudrate
at D:\workspace\keyes\target\riscv32imac-esp-espidf\debug\build\esp-idf-sys-a6a579df5403716b\out\build\C:/Espressif/frameworks/esp-idf-v5.4.1/components/hal/esp32c6/include/hal\uart_ll.h:409
Core 0 register dump:
MEPC : 0x4080131e RA : 0x4080495a SP : 0x4087e160 GP : 0x4080a1f4
0x4080131e - panic_abort
at D:\workspace\keyes\target\riscv32imac-esp-espidf\debug\build\esp-idf-sys-a6a579df5403716b\out\build\C:/Espressif/frameworks/esp-idf-v5.4.1/components/esp_system\panic.c:468
0x4080495a - __ubsan_include
at D:\workspace\keyes\target\riscv32imac-esp-espidf\debug\build\esp-idf-sys-a6a579df5403716b\out\build\C:/Espressif/frameworks/esp-idf-v5.4.1/components/esp_system\ubsan.c:311
0x4080a1f4 - uart_context
at ??:??
TP : 0x00000000 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x4087e19c S1 : 0x4087e19c A0 : 0x4087e19c A1 : 0x4087e17e
A2 : 0x00000000 A3 : 0x4087e1c9 A4 : 0x00000001 A5 : 0x4080c000
0x4080c000 - xIsrStack
at ??:??
A6 : 0x00000000 A7 : 0x76757473 S2 : 0x4087e180 S3 : 0x0000004d
S4 : 0x42000000 S5 : 0x42000000 S6 : 0x40800cba S7 : 0x0002add0
0x40800cba - rv_utils_dbgr_is_attached
at D:\workspace\keyes\target\riscv32imac-esp-espidf\debug\build\esp-idf-sys-a6a579df5403716b\out\build\C:/Espressif/frameworks/esp-idf-v5.4.1/components/riscv/include/riscv\rv_utils.h:325
S8 : 0x00051fb0 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00001881 MTVEC : 0x40800001 MCAUSE : 0x00000002 MTVAL : 0x00000000
0x40800001 - _vector_table
at D:\workspace\keyes\target\riscv32imac-esp-espidf\debug\build\esp-idf-sys-a6a579df5403716b\out\build\C:/Espressif/frameworks/esp-idf-v5.4.1/components/riscv\vectors_intc.S:54
MHARTID : 0x00000000
Stack memory:
4087e160: 0x00000000 0x00000000 0x4087e19c 0x408088f8 0x40800cba 0x42000000 0x42000000 0x00000030
0x408088f8 - __assert_func
at D:\workspace\keyes\target\riscv32imac-esp-espidf\debug\build\esp-idf-sys-a6a579df5403716b\out\build\C:/Espressif/frameworks/esp-idf-v5.4.1/components/newlib\assert.c:33
0x40800cba - rv_utils_dbgr_is_attached
at D:\workspace\keyes\target\riscv32imac-esp-espidf\debug\build\esp-idf-sys-a6a579df5403716b\out\build\C:/Espressif/frameworks/esp-idf-v5.4.1/components/riscv/include/riscv\rv_utils.h:325
4087e180: 0x30383034 0x33356530 0x00300000 0x4080b554 0x4087e180 0x4080b570 0x4087e17c 0x726f6261
4087e1a0: 0x20292874 0x20736177 0x6c6c6163 0x61206465 0x43502074 0x34783020 0x30303830 0x20333565
4087e1c0: 0x63206e6f 0x2065726f 0x00000030 0x00000000 0x42800000 0x00000010 0x00300000 0x40800e56
0x40800e56 - uart_ll_set_baudrate
at D:\workspace\keyes\target\riscv32imac-esp-espidf\debug\build\esp-idf-sys-a6a579df5403716b\out\build\C:/Espressif/frameworks/esp-idf-v5.4.1/components/hal/esp32c6/include/hal\uart_ll.h:411
4087e1e0: 0x000052e0 0x4004b05c 0x0000ffff 0x00700000 0x42800000 0x42051fcf 0x42082def 0x42058000
0x42082def - esp_system_init_fn_init_disable_rtc_wdt
at ??:??
4087e200: 0x42800000 0x42051fcf 0x42082def 0x4086f95c 0x58c61837 0x00030000 0x00010020 0x00068020
0x42082def - esp_system_init_fn_init_disable_rtc_wdt
at ??:??
4087e220: 0x42000020 0x42058020 0x00051fb0 0x0002add0 0x000052e0 0x000000d8 0x00000000 0x40880000
0x42000020 - std::sys::backtrace::__rust_begin_short_backtrace
at C:\Users\SEA\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\backtrace.rs:148
4087e240: 0x000052e0 0x4004b05c 0x0000ffff 0xffffffff 0xffffffff 0x4087e3a0 0xffffffff 0x4086fda2
4087e260: 0xffffffff 0x0000002e 0x00010000 0x003f0000 0x00010000 0x200205e9 0x40800cba 0x000000ee
0x40800cba - rv_utils_dbgr_is_attached
at D:\workspace\keyes\target\riscv32imac-esp-espidf\debug\build\esp-idf-sys-a6a579df5403716b\out\build\C:/Espressif/frameworks/esp-idf-v5.4.1/components/riscv/include/riscv\rv_utils.h:325
4087e280: 0x0000000d 0x00006300 0x01000000 0x42000020 0x00051fb0 0x40800000 0x00006040 0x42058020
0x42000020 - std::sys::backtrace::__rust_begin_short_backtrace
at C:\Users\SEA\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\backtrace.rs:148
0x40800000 - _vector_table
at D:\workspace\keyes\target\riscv32imac-esp-espidf\debug\build\esp-idf-sys-a6a579df5403716b\out\build\C:/Espressif/frameworks/esp-idf-v5.4.1/components/riscv\vectors_intc.S:54
4087e2a0: 0x0002add0 0x40806040 0x000039ac 0x408099f0 0x00001cdc 0x00000000 0x00000000 0x00000000
0x40806040 - xTaskGetTickCountFromISR
at D:\workspace\keyes\target\riscv32imac-esp-espidf\debug\build\esp-idf-sys-a6a579df5403716b\out\build\C:/Espressif/frameworks/esp-idf-v5.4.1/components/freertos/FreeRTOS-Kernel\tasks.c:2718
4087e2c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e2e0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e300: 0x00000000 0x00000000 0x00000000 0x00010020 0x00061fd8 0x00068020 0x00092df8 0x000967ac
4087e320: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e340: 0x00000000 0x00000000 0x00000000 0x000884b0 0xb2e0061a 0xeb8fa274 0xd32c7025 0xfded1cb9
4087e360: 0xe3632d4b 0x12fcdecc 0x7b7bc03d 0xae7ba684 0x000052e0 0x4004b05c 0x0000ffff 0x40880000
4087e380: 0x00000000 0x00000021 0x000052f0 0x4086c492 0x26ef2949 0x6366f7e1 0x00000000 0xffffffff
4087e3a0: 0x00000000 0x00000000 0x00010000 0x003f0000 0x00000000 0x00000000 0x00000000 0x00000000
4087e3c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e3e0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e400: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e420: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e440: 0x60002000 0x00000100 0x00000020 0x4001b1c0 0xda202fc7 0x59cd11cb 0xef1ff22e 0x00000000
4087e460: 0x81418cd4 0x00000000 0x00010000 0x200203e9 0x4086c410 0x40875720 0x00001800 0x000000ee
4087e480: 0x0000000d 0x00006300 0x01000000 0x420052f0 0x7533885e 0x7898f8af 0xf5bf6ca9 0x8ac3667c
0x420052f0 - gimli::read::line::LineInstruction<R,Offset>::parse
at C:\Users\SEA\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\gimli-0.31.1\src\read\line.rs:431
4087e4a0: 0x22a4d1a6 0x405078b7 0x58eaefb5 0x6cefab2b 0xc2277435 0x00000000 0x00000000 0x00000000
4087e4c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x4087e5f0 0x00000101 0x00000002
4087e4e0: 0x7898f8af 0xf5bf6ca9 0x8ac3667c 0x22a4d1a6 0x405078b7 0x58eaefb5 0x6cefab2b 0xc2277435
4087e500: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e520: 0x00000063 0x5f707365 0x5f6d6f72 0x69676572 0x775f6332 0x65746972 0x73616d5f 0x0000006b
4087e540: 0x00000000 0x00000000 0x00000000 0x21000000 0x00000080 0x00000000 0x00000000 0x80970200
ELF file SHA256:
Rebooting...
ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0xc (SW_CPU),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x4001975a
SPIWP:0xee
mode:DIO, clock div:2
load:0x4086c410,len:0xd48
load:0x4086e610,len:0x2d68
load:0x40875720,len:0x1800
entry 0x4086c410
.cargo/config.toml file is like below but while building the first example template I see restart error after flash to ESP32-C6.
Error Message