ROSMicroPy

Creating the Development Environment container

Overview

The Development Environment is a container that has pre-installed and configured all the development tools that are needed to Compile, Flash and Monitor a ROSMicroPy device.

Requirements

How to Build

When the build is complete you will have a shell prompt in your container at the project directory inside the container

The first time you are using your Dev Env container, you need to initialize and update all the submodules of the project by running

git submodule update --init --recursive

To attach to VS Code, install VSCode along the following VS Code extensions

Open VSCode and select Remote Explorer, you should see the rosmicropy container

Opening your workspace folder

How to compile the code

Run the compile process by running the ./compile shell script

On a successful compile you should see the following message

Successfully created esp32 image.
Generated /opt/rosmicropy/devices/mbits-esp32s2-wrover/build/mbits-esp32s2-wrover.bin
[21/21] cd /opt/rosmicropy/devices/mbits-esp32s2-wrover/build/esp-idf/esptool_py && /opt/esp/python_env/idf4.4_py3.8_env/bin/python /opt/esp/idf/components/partition_table/check_sizes.p...0 partition --type app /opt/rosmicropy/devices/mbits-esp32s2-wrover/build/partition_table/partition-table.bin /opt/rosmicropy/devices/mbits-esp32s2-wrover/build/mbits-esp32s2-wrover.bin
mbits-esp32s2-wrover.bin binary size 0x18e000 bytes. Smallest app partition is 0x1f0000 bytes. 0x62000 bytes (20%) free.

Project build complete. To flash, run this command:
/opt/esp/python_env/idf4.4_py3.8_env/bin/python ../../../esp/idf/components/esptool_py/esptool/esptool.py -p (PORT) -b 460800 --before default_reset --after hard_reset --chip esp32  write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/mbits-esp32s2-wrover.bin
or run 'idf.py -p (PORT) flash'

Flashing your device

Attach your ESP32 device to a serial port and run

./flash

This should load code into your device.

Follow the instructions to set up your Python dev Env to start running code

A note about different Operating Systems

This should work out of the box for Mac or Linux and Windows with WSL2 installed Your milage may vary with non-WSL2 Windows and is out of scope for this project