Page 1 of 4

Micropython on ESP32-C3

Posted: Sat Mar 20, 2021 1:33 pm
by etolocka
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!

Re: Micropython on ESP32-C3

Posted: Sun Mar 21, 2021 10:25 am
by pythoncoder
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.

Re: Micropython on ESP32-C3

Posted: Sun Mar 21, 2021 12:36 pm
by etolocka
Thank you Peter!

Regards,
Ernesto.

Re: Micropython on ESP32-C3

Posted: Mon Jul 05, 2021 1:27 pm
by jd3096
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.

Re: Micropython on ESP32-C3

Posted: Mon Jul 05, 2021 1:34 pm
by Roberthh
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.

Re: Micropython on ESP32-C3

Posted: Tue Jul 13, 2021 8:04 am
by jd3096
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

Re: Micropython on ESP32-C3

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

make BOARD=GENERIC_C3

Re: Micropython on ESP32-C3

Posted: Tue Jul 13, 2021 11:43 am
by mattyt
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.

Re: Micropython on ESP32-C3

Posted: Thu Jul 15, 2021 2:58 am
by jd3096
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

Re: Micropython on ESP32-C3

Posted: Thu Jul 15, 2021 4:59 am
by jd3096
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'