No i didn't do a "idf.py set-target esp32c3", I was following some web page about how to run the helloworld on a C3 and don't remember seeing that, and now don't remember what web page it was to check.
Anyway I have done that now and get further but still not perfect.
With ESP-IDF the helloworld sample outputs:
Code: Select all
spi_flash: Detected size(4096k) larger than the size in the binaHello world!
This is esp32c3 chip with 1 CPU core(s), WiFi/BLE, silicon revision 3, 2MB external flash
Minimum free heap size: 329692 bytes
Restarting in 10 seconds...
Restarting in 9 seconds...
Restarting in 8 seconds...
Restarting in 7 seconds...
Restarting in 6 seconds...
Restarting in 5 seconds...
Restarting in 4 seconds...
Restarting in 3 seconds...
Restarting in 2 seconds...
Restarting in 1 seconds...
Restarting in 0 seconds...
Restarting now.
(and then does not restart)
Running similar code with esp32/arduino it outputs:
Code: Select all
Hello world!
This is esp32c3 chip with 1 CPU core(s), WiFi/BLE, silicon revision 3, 4MB external flash
Minimum free heap size: 314688 bytes
Restarting in 10 seconds...
Restarting in 9 seconds...
Restarting in 8 seconds...
Restarting in 7 seconds...
Restarting in 6 seconds...
Restarting in 5 seconds...
Restarting in 4 seconds...
Restarting in 3 seconds...
Restarting in 2 seconds...
Restarting in 1 seconds...
Restarting in 0 seconds...
Restarting now.
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
Saved PC:0x403814ee
SPIWP:0xee
mode:DOUT, clock div:1
load:0x3fcd6100,len:0x38c
load:0x403ce000,len:0x6a8
load:0x403d0000,len:0x2358
SHA-256 comparison failed:
Calculated: 81622325b5b3d82bf48506f210cd42cc4a45185255565a883ae891633570c8f5
Expected: bef5af017887fc9f8b85cdc8d157e714dd15305a39a5b8a4fc8312b760075a67
Attempting to boot anyway...
entry 0x403ce000
setup
Hello world!
...
The code line for that is
Code: Select all
printf("%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024),
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");
so is there some other config somewhere i need to update to tell the IDF its got 4MB?