This repository builds the default firmware for the badges handed out at Fri3d camp. The firmware is a fork of MicroPython and adds its own libraries.
You can find the original README.md of the MicroPython project here.
The following branches are available in this repository:
- develop: bleeding edge development, do not use unless you know what you are doing
- stable: safe for general use
The firmware is built on top of and tested with specific upstream versions:
- MicroPython: v1.23
- ESP-IDF: v5.2.2
Building should work by following the manual of MicroPython.
As a quick reference, here is a short summary:
- Install build dependencies
- Install the version of ESP-IDF above and source the
export.shscript - Check out this repository locally and
cdinto it make -C mpy-crosscd ports/esp32export PORT=<device>but replace<device>with the actual device- Default is
/dev/ttyUSB0which works for the 2022 badge in which case you can skip this step - The 2024 badge uses another driver and will be
/dev/ttyACM0 - If you have multiple badges attached the number will be increase, ie
/dev/ttyUSB1,/dev/ttyACM6, ...
- Default is
export BOARD=FRI3D_BADGE_2024- Use
FRI3D_BADGE_2024for the 2024 Badge - Use
FRI3D_BADGE_2022for the 2022 Badge
- Use
make submodulesmakemake eraseif there was no MicroPython on the badge previouslymake deployto flash the badge
Congratulations, you should now be able to connect to the Python prompt
There are multiple options:
-
ESP-IDF monitor
BAUD=115200 make monitorto connect to the serial interface (which adds automatic backtrace decoding) -
screen
Replace/dev/ttyACM0with the correct device
screen /dev/ttyACM0 115200
- picocom
picocom -b 115200 /dev/ttyACM0
- terminal with buildin decoding:
BAUD=115200 make monitor function esp32-backtrace() { xtensa-esp32-elf-addr2line -pfiaC -e build-${BOARD}/micropython.elf "$@"; }
creates a command function for backtrace decoding
can be used like thisesp32-backtrace <paste the backtrace here>
you can put it in your~/.bashrcfile