Micropython on ESP32-C3

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
etolocka
Posts: 13
Joined: Mon Dec 28, 2020 7:07 pm

Micropython on ESP32-C3

Post by etolocka » Sat Mar 20, 2021 1:33 pm

Hello

I have received my ESP32-C3 engineering samples (ESP32-C3-DevKitM-1) and wanted to know if I can program them in Micropython using the firmware available for ESP32.

Thanks!

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Micropython on ESP32-C3

Post by pythoncoder » Sun Mar 21, 2021 10:25 am

Given that it's based on RISC-V it will need a new specific MicroPython port. There is work going on to port the S3, but that uses the Xtensa arch.
Peter Hinch
Index to my micropython libraries.

etolocka
Posts: 13
Joined: Mon Dec 28, 2020 7:07 pm

Re: Micropython on ESP32-C3

Post by etolocka » Sun Mar 21, 2021 12:36 pm

Thank you Peter!

Regards,
Ernesto.

jd3096
Posts: 13
Joined: Mon Jul 05, 2021 1:22 pm

Re: Micropython on ESP32-C3

Post by jd3096 » Mon Jul 05, 2021 1:27 pm

pythoncoder wrote:
Sun Mar 21, 2021 10:25 am
Given that it's based on RISC-V it will need a new specific MicroPython port. There is work going on to port the S3, but that uses the Xtensa arch.
May I ask a question,when dose the micropython firmware for c3 can be published? thank you.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Micropython on ESP32-C3

Post by Roberthh » Mon Jul 05, 2021 1:34 pm

The build for ESP32-C3 is under construction. See https://github.com/micropython/micropython/pull/7438
From that PR it is possible to build a trial version.

jd3096
Posts: 13
Joined: Mon Jul 05, 2021 1:22 pm

Re: Micropython on ESP32-C3

Post by jd3096 » Tue Jul 13, 2021 8:04 am

i try to build firmware bin file for the micropython 1.16 for esp32c3,but there are some errors ,esp32 firmware is successed,so how to build firmware for esp32c3, i see the file ports/esp32/boards/GENERIC_C3,but i don't know how to build it correctly

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Micropython on ESP32-C3

Post by Roberthh » Tue Jul 13, 2021 9:09 am

Did you try:

make BOARD=GENERIC_C3

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: Micropython on ESP32-C3

Post by mattyt » Tue Jul 13, 2021 11:43 am

I've just pushed a container to the docker hub that can help build that. You should be able to use:

Code: Select all

> docker run -ti --rm -v ~/my_micropython:/micropython micropython/build-micropython-esp32 bash -c -l "cd micropython && make -C mpy-cross && make -C ports/esp32 submodules && make -C ports/esp32 BOARD=GENERIC_C3"
Assuming you have a clone of MicroPython (checked out to the ESP32-C3 #7438 PR) on your host at ~/my_micropython.

jd3096
Posts: 13
Joined: Mon Jul 05, 2021 1:22 pm

Re: Micropython on ESP32-C3

Post by jd3096 » Thu Jul 15, 2021 2:58 am

Roberthh wrote:
Tue Jul 13, 2021 9:09 am
Did you try:

make BOARD=GENERIC_C3
yes i tryed but there is still errors:
[84/84] cd /home/jd3096/esp32c3/ports/esp32/build-GENERIC_C3/bootloader/esp-idf/esptool_py && /home/jd3096/.espressif/python_env/idf4.4_py3.8_env/bin/python /home/jd3096/esp/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0 /home/jd3096/esp32c3/ports/esp32/build-GENERIC_C3/bootloader/bootloader.bin
Bootloader binary size 0x3f10 bytes. 0x40f0 bytes (103%) free.
[1042/1267] Generating ../../genhdr/mpversion.h
GEN /home/jd3096/esp32c3/ports/esp32/build-GENERIC_C3/genhdr/mpversion.h
[1047/1267] Generating ../../genhdr/qstr.i.last
FAILED: genhdr/qstr.i.last

jd3096
Posts: 13
Joined: Mon Jul 05, 2021 1:22 pm

Re: Micropython on ESP32-C3

Post by jd3096 » Thu Jul 15, 2021 4:59 am

mattyt wrote:
Tue Jul 13, 2021 11:43 am
I've just pushed a container to the docker hub that can help build that. You should be able to use:

Code: Select all

> docker run -ti --rm -v ~/my_micropython:/micropython micropython/build-micropython-esp32 bash -c -l "cd micropython && make -C mpy-cross && make -C ports/esp32 submodules && make -C ports/esp32 BOARD=GENERIC_C3"
Assuming you have a clone of MicroPython (checked out to the ESP32-C3 #7438 PR) on your host at ~/my_micropython.
i tryed but something worng,
make: Entering directory '/micropython/mpy-cross'
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
make: Leaving directory '/micropython/mpy-cross'
make: Entering directory '/micropython/ports/esp32'
git submodule update --init ../../lib/berkeley-db-1.xx
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
make: *** [Makefile:53: submodules] Error 128
make: Leaving directory '/micropython/ports/esp32'

Post Reply