Skip to content

jmysu/ESP32C3-S2-micropython-build

Repository files navigation

ESP32C3/S2-micropython-build

building ESP32C3/S2 micropython notes

Clone esp-idf repository; For ESP32-C3/S2 need V4.3.1+

git clone -b v4.4 --recursive https://github.com/espressif/esp-idf.git


After you've cloned and checked out the IDF to the correct version, run the install.sh script:

cd esp-idf
./install.sh # (or install.bat on Windows)
source export.sh # (or export.bat on Windows)

The install.sh step only needs to be done once.
You will need to source export.sh for every new session. (For environment variables)
(Or $export ESP_IDF=~/esp_idf $source export.sh)

Clone MicroPython repository...

git clone https://www.github.com/micropython/micropython
cd micropython/
make -C mpy-cross/
cd ports/esp32
make submodules
make BOARD=GENERIC_C3/S2 -j4
cd build-GENERIC_C3/S2
(or w/ USBCDC
make BOARD=GENERIC_C3_USB -j4
cd build-GENERIC_C3_USB)


This will produce a combined firmware.bin image in the build-GENERIC_C3/ subdirectory
(this firmware image is made up of: bootloader.bin, partitions.bin and micropython.bin).

Project build complete. To flash, run this command:

esptool.py --port /dev/cu.wchusbserialfd130 write_flash -z 0x0 c3_firmware.bin

For ESP32-S2

esptool.py --port /dev/cu.wchusbserialfd130 write_flash --flash_mode dio -z 0x01000 s2_firmware.bin


Thonny connectted to micropython w/ PyDOS.


micropython display hwInfo.


w/ esp32c3_usbcdc.


Blinking LEDs



See http://docs.micropython.org/en/latest/esp32/quickref.html for a quick reference,
and http://docs.micropython.org/en/latest/esp32/tutorial/intro.html for a tutorial.

Reference

[General information about the ESP32 port] https://docs.micropython.org/en/latest/esp32/general.html
[How to build MicroPython for esp32-C3] https://www.jarutex.com/index.php/2022/01/04/9217/
[Awesome resources collections] https://github.com/mcauser/awesome-micropython
[PyDOS] https://github.com/RetiredWizard/PyDOS

About

building ESP32C3 micropython notes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages