Skip to main content

Building Your Firmware

Once your commands have been defined, compiled, and put in place, you can load and run the embedded code that will receive commands and send responses on your board.

Editing firmware

You want to go to the root directory of your project, then go to firmware\esp32-my-qroma-project\src and find the directory qroma-proto. This is where the nanopb compiled protocol buffer outputs for the C programming language have been placed. The nanopb compiler was chosen because it generates tight code suitable for low-memory environments. You can see that there are files in place corresponding to the .proto files we had started with.

Qroma can help you quickly look at your firmware files with the firmware edit command. The full command below opens your configured editor to access your board's PlatformIO project in edit mode.

qroma firmware edit :my-qroma-project

Qroma library dependency

To support the main goal of Qroma to eliminate boilerplate code (and promote good software development practices) for device and platform communication, the project template includes the Qroma firmware library automatically included with the PlatformIO project.

The platformio.ini file in the root of the firmware project includes a line like the one below, which pulls in the Qroma library.

lib_deps = https://github.com/qromatech/lib-esp32-qroma.git

Compile and Load Your Firmware

Once all the software is in place, use your development platform to compile and load the software onto your connected device. You have two options to use PlatformIO to load your firmware onto your board:

  • Use PlatformIO tooling to compile and upload with your preferred methods (refer to PlatformIO documentation as necessary)
  • Use qroma commands, which will use your platform's configuration to compile/install your project
    • Run the command qroma firmware build
    • Then, load it onto your board via webpage as will be described in the next steps