Skip to content

Example of working environment in docker for usage with vscode remote development, for cicd with github actions, and compilation of both native and esp32 environments. Demonstrates how to use an raspberry pi as pio remote server for using your esp32 anywhere

Notifications You must be signed in to change notification settings

italocjs/esp32_italoenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

This is a sample of how to integrate CICD with esp32 development. This repository can be started as a docker container containing the required tools, or it can be used as a VSCode devcontainer (open VSCode in the folder, click on reopen as container) to automatically load the environment and install useful extensions for task buttons.

Features:

  • ESPIDF + Arduino frameworks
  • Easy menuconfig access
  • Example of how to use custom board (ex simovatrack130)
  • Task buttons for easy access to common tasks (defined in .vscode/settings.json)
    • Build, run, and test native code
    • Build, flash, and test esp32dev code
    • Monitor serial port with decoding tools
    • Update documentation using Doxygen

Currently working:

  • Arduino framework functions
  • esp-idf framework functions
  • Build, run, and test native code
  • Build, flash, and test esp32dev code
  • Build doxygen documentation with prettyfied css layer

Not working:

  • Under docker, C++ extension for VSCode is unable to locate arduino.h but compiles just fine. Help wanted here! i've been unable to setup this yet and is very useful
  • Under docker + Windows, USB ports are hard to access. You might want to install PlatformIO on the host and run VSCode directly on Windows to access the COM PORT for local build and testing. to run PIO under the host, you can open the folder locally instead of as an container, install the extension platformio and let it automatically download all dependencies. You shall then have access to the PIO tools directly under windows host.

Setup

Remote Testing

To set up remote testing, check:

Don't forget to set the PLATFORMIO_AUTH_TOKEN on GitHub Actions with your actual pio account token! Otherwise, the actions will not be able to log in to the remote device. When running remote build on local pc, you must either login to you account or use a token too

Updating the Base Image

If you need to update the base image (italocjs/track_env:latest), you can use the build_image.py script. This script automates the process of building and pushing Docker images, which is particularly useful for GitHub Actions as it allows for the creation of pre-built environments, significantly reducing setup times by pre-downloading all necessary requisites.

Final notes:

This base repository has been created to help me setup my development environment. Feel free to use it as a base for your own projects. There is absolutely NO WARRANTY, use at your own risk. if you end up burning your computer, don't blame me, blame yourself.

This environment introduces a few new concepts for the new "arduino programmer" which is used to program in Arduino IDE:

  • using vscode as editor and platformio as IDE
  • using github to keep track of changes
  • using github actions for CI/CD
  • using docker to isolate the environment
  • using unitary tests in both "fake" (native) and "real" (esp32) environments.

Author: Italo C J Soares (italocjs@live.com)

About

Example of working environment in docker for usage with vscode remote development, for cicd with github actions, and compilation of both native and esp32 environments. Demonstrates how to use an raspberry pi as pio remote server for using your esp32 anywhere

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published