You can easily edit or create your custom firmware for TOWER Core Module on every major operating system.
Getting your first TOWER firmware
If you are returning to the project use the Open folder option in VSCode. Go to the
File -> Open Folder... or use
Ctrl + K then
Ctrl + O.
- Open VSCode and click the HARDWARIO Icon on the left sidebar
- In the section TOWER: Start select From Skeleton Project...
- Select Folder where the new firmware project folder should be created
- You will be prompted to name the folder, default twr-skeleton is just fine for now
- Wait for the firmware to finish downloading
- Visual Studio Code will reopen with the new firmware opened
You can also download the firmware with the git command.
git clone --recursive https://github.com/hardwario/twr-skeleton.git
You can select From Existing Project... instead of From Skeleton Project... to clone any other project from GitHub.
This is the file structure of the twr-skeleton project that you just cloned. It is a Git-initialized repository ready to be used out of the box.
│ └── ...skipped
│ └── CI files, you can put some workflow for GitHub Actions here
│ └── ...skipped
│ └── a lot of files (mostly not important for normal user)
│ └── application.c
| └── application.h
| └── CMakeLists.txt
The place where you should edit your code is in the
Usually, you will not need to modify other files than those.
Therefore your first step most likely will be to open the src/application.c file.
If you are using HARDWARIO Code Visual Studio Code extension the
src/application.c will be opened automatically.
Normally, the development cycle is the repetition of the following 4 steps.
- Edit the
src/application.cand save changes Ctrl + S
- Click on Build + Flash (Console) to compile, flash and open the serial console for logging.
- You can also work with the CLI Tools
- Test your firmware
- If you need to debug your application, please follow the Debugging chapter.
Firmware is implemented in pure C language, which is an industrially accepted language for embedded and low-power devices.
There are the main reasons for choosing this technology.
- Efficient use of hardware resources
- Stability and long-time available development environment
- Simple and understandable syntax
You can use all known C language structures and also our SDK that is implemented so you can quickly and easily, without any problems with compatibility, create your custom firmware.
If you can't detect or flash the Radio Dongle or Core Module it can be a driver or OS issue. You can try some fixes based on your system
- On Windows and macOS please install the FTDI VCP drivers
- On Ubuntu, you need to be in
dialoutuser group. Please use the command
sudo usermod -a -G dialout $USERand restart the computer
From now you should be able to create firmware and update existing ones.