I decided to create an ESP32 unicore board definition so that I could run MicroPython on the ESP32-MINI-1 board I just built, since there are none to be found. So I forked micropython/micropython on GitHub, then wrote up a GENERIC_UNICORE definition in ports/esp32/boards. I then installed the ESP-IDF (Ubuntu 20.04 x86_64) and ran `make board=GENERIC_UNICORE`, which gave several errors related to compilation. What should I do to go about fixing these?
Here is the board definition I made: https://github.com/AwesomeCronk/micropy ... IC_UNICORE
Here is the make output: https://pastebin.com/LiRd2dec
Make error while compiling for ESP32 with unicore support
-
- Posts: 33
- Joined: Fri Oct 11, 2019 1:24 am
-
- Posts: 33
- Joined: Fri Oct 11, 2019 1:24 am
Re: Make error while compiling for ESP32 with unicore support
Quick update, I have ESP-IDF 4.2, all submodules are updated and initialized as of 22-2-21. I tried `make BOARD=GENERIC` and it ran fine, though I didn't test the binary it produced. It only seems to be in my GENERIC_UNICORE board definition that enables FreeRTOS/ESP-IDF unicore support where extmod/modtree.c tries to reference a db.h and can't find it.
-
- Posts: 33
- Joined: Fri Oct 11, 2019 1:24 am
Re: Make error while compiling for ESP32 with unicore support
After updating submodules, it seems `make clean` was not enough. I deleted `build-GENERIC_UNICORE`, and ran `make BOARD=GENERIC_UNICORE`, then `python3 -m esptool --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 build-GENERIC_UNICORE/bootloader/bootloader.bin 0x8000 build-GENERIC_UNICORE/partition_table/partition-table.bin 0x10000 build-GENERIC_UNICORE/micropython.bin`. Firmware flashes, I reboot the ESP32 in SPI flash mode and voila! A different error appears! The ESP32 boot-loops, printing:
Seems to be trying to initialize a task in Core 1, based on everything I've seen online that triggers this error. Fun part is the ESP32 this is for doesn't have a Core 1! =/
I don't know if it's now more appropriate to move to a new thread now, or something else entirely. The original issue this thread was for was fixed - it now compiles - but It still doesn't boot properly...
Code: Select all
ets Jul 29 2019 12:21:46
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, 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:0x3fff0030,len:4540
ho 0 tail 12 room 4
load:0x40078000,len:12364
load:0x40080400,len:4140
entry 0x40080680
/usr/local/bin/esp-idf/components/freertos/tasks.c:1070 (prvAddNewTaskToReadyList)- assert failed!
abort() was called at PC 0x40094482 on core 0
Backtrace:0x4009357e:0x3ffb71d0 0x40093c21:0x3ffb71f0 0x400975fa:0x3ffb7210 0x40094482:0x3ffb7280 0x40094621:0x3ffb72a0 0x400d4bc2:0x3ffb72e0 0x400d350f:0x3ffb7310
ELF file SHA256: 33ea2d6c4c0ba2c3
Rebooting...
I don't know if it's now more appropriate to move to a new thread now, or something else entirely. The original issue this thread was for was fixed - it now compiles - but It still doesn't boot properly...
-
- Posts: 33
- Joined: Fri Oct 11, 2019 1:24 am
Re: Make error while compiling for ESP32 with unicore support
It should be noted that up to this point, the board definition linked in the first post of this thread has not changed.