The micropython codebase to support the Fri3dcamp 2024 badge
Clone this repo and update all submodules recursively:
git submodule update --init --recursive
Then add a symlink from the esp32 port modules to our Fri3dCamp specific modules.
ln -s ./fri3d_modules ./micropython/ports/esp32/modules/fri3d_modules
Then run the build script:
./build.sh
Flash it with:
sudo ~/.espressif/python_env/idf4.4_py3.11_env/bin/python ./esp-idf/components/esptool_py/esptool/esptool.py -b 460800 --before default_reset --after no_reset --chip esp32s3 write_flash --flash_mode dio --flash_size detect --flash_freq 80m 0x0 ./build-FRI3D_BADGE_2024/bootloader/bootloader.bin 0x8000 ./build-FRI3D_BADGE_2024/partition_table/partition-table.bin 0x10000 ./build-FRI3D_BADGE_2024/micropython.bin
# this handles port detection automatically, but you can also set it with the -p option
Connect to the micropython with something like:
sudo picocom /dev/ttyACM0 -b115200
If you get an error like "A fatal error occurred: Failed to connect to ESP32-S3: No serial data received.", then 1. press-hold 'start', 2. short-press 'reset' and 3. release 'start'.
If you don't get a terminal then press reset, and reconnect your terminal emulator.
todo: make a Makefile instead and make the board configurable, and create flash targets
- Currently we have a N32R8, but we'll target a ESP32-S3-WROOM-1-N16R8 16 MB (Quad SPI) 8 MB (Octal SPI)
- Following the instructions at https://docs.micropython.org/en/latest/esp32/quickref.html
- esptool : https://github.com/espressif/esptool
- using the esp-idf v4.4.4 release and micropython v1.20.0
- https://badge.team/docs/esp32-platform-firmware/esp32-firmware-development/
- we're using the BOARD_DIR env variable, added in front of the make file: ''' make BOARD_DIR=../../../boards/FRI3D_BADGE_2024 BOARD=FRI3D_BADGE_2024 '''