-
-
Notifications
You must be signed in to change notification settings - Fork 449
Building radio firmware in a web browser with GitHub CodeSpaces
An easy option to build EdgeTX radio firmwares without having to set up a local build environment on your own computer, is provided by GitHub CodeSpaces. The only requirement is that you have an account at GitHub.
To start building EdgeTX firmware for your radio, open the following link with the web browser of your choice:
https://codespaces.new/EdgeTX/edgetx
and you should be greeted with a screen similar to the following. If you don't want to build from the main development branch (i.e. you want to build a from a stable release), you can change to a different branch, i.e. 2.11. If you want builds to run faster, you can also change the machine type to one with more CPUs and RAM, but please note this will reduce the amount of free time you have for using GitHub Codespaces (120 hrs per month for 2 CPU machine).
After some waiting (it can take a minute or so to load), you should be greeted with a Visual Studio Code like development environment in a browser with EdgeTX source code tree preloaded from GitHub. It should also have initialised all the submodules needed to build the firmware for you. If for some reason this hasn't happened, run git submodule update --init --recursive at the terminal.
The next step is to tell the development system for which radio and with which configuration option you would like the firmware to be built. You do this by entering a cmake command in the terminal section of the Visual Studio Code window (bottom right pane; feel free to close all the popups if they come on top). Here for example:
cmake -Wno-dev -DPCB=X10 -DPCBREV=TX16S -DBLUETOOTH=YES -DCMAKE_BUILD_TYPE=Release ../
we instruct the CMake system to create makefiles for building for the RadioMaster TX16S (PCB=X10, PCBREV=TX16S), enable Bluetooth support (BLUETOOTH=YES) and selected the type as a Release build without debug symbols included (CMAKE_BUILD_TYPE=Release).
(If you are curious about the options available, enter the following command in terminal to list all options: cmake -LAH ../ )
Next, issue:
cmake --build . --target arm-none-eabi-configure --parallel 2
Note: the --parallel 2 in the command above instructs the cmake build system as to how many tasks to execute in parallel. Typically, you would set this to the number of CPU cores your machine has. So if you are using a higher CPU core count GitHub machine type, you can increase this to suite, and get a faster build.
Only a few seconds later, you should be greeted with "-- Generating done" message.
If so, enter again in terminal the following line to start the compilation and linking step and press Enter:
cmake --build arm-none-eabi --target firmware
This time it can take a minute or so until the firmware binary is successfully built. If you see "[100%] Built target firmware" then all went smoothly and you have just made yourself a custom EdgeTX firmware.
It's a good idea to rename the binary, so that it is easier later to see the target radio and which options were baked into it. For this, issue in the terminal:
cd arm-none-eabi
mv firmware.bin edgetx_main_tx16s_bt_release.bin
In the left file browser tree open the build folder and then open arm-none-eabi folder. Right click at edgetx_main_tx16s_bt_release.bin and select Download.
Put the downloaded firmware binary into your radio SD card \FIRMWARE subfolder, and flash it to your radio either using EdgeTX bootloader, EdgeTX Buddy, EdgeTX Companion or STM32CubeProgrammer.
Use EdgeTX Buddy or EdgeTX Companion to fill your SD card appropriately for your radio.
Getting started with Git
- Workflow for GitHub noobs
Building and debugging EdgeTX:
- In a webbrowser with Gitpod
- Windows
- Ubuntu 20.04
- MacOS
Compilation options (incomplete)
Modifications:
- Flysky Hall Sticks Mod
- Flysky FRM303 Mod for TX16S
- Flysky PL18 & PL18EV Hardware Mod for Complete EdgeTX Support
- Flysky NB4+ Hardware Mod for Complete EdgeTX Support
- Flashing EdgeTX to Flysky PL18 or Paladin-EV
How to unbrick your radio with STM32CubeProgrammer
DMA mappings of radios:
- RadioMaster TX16S
- FlySky NV14
Interrupt usage of radios:
- RadioMaster TX16S
Implementation notes:
- YAML Parser/Generator
- Mixer synchronisation
Various:
- External-module-protocols
- Customisable switches