Setting the development environment on Linux is really simple, you just need to install the Miosix's compiler, stlink-tools and other packages needed by Skyward's build system.
To install the required components you only need to run the following commands:
wget https://miosix.org/toolchain/MiosixToolchainInstaller.run
sh MiosixToolchainInstaller.run
sudo apt install make cmake ninja-build ccache cppcheck clang-format clang-tidy stlink-tools -y
If you are on an old distribution and the stlink-tools package isn't available, here you can find the latest release.
After all the packages are installed, you are ready to compile and flash your code on your board!
GTKTerm
To view the output from your development board, a serial monitor is requiered. A really simple program is GTKTerm which can be installed by simply running sudo apt install gtkterm -y
.
When you first start GTKTerm you could receive a warning warning you don't have permissions.
You should be able to solve the issue by running:
sudo usermod -a -G dialout $USER
sudo usermod -a -G tty $USER
and then rebooting.
After this you need to go to Configuration
> Port
and choose the serial port of you device (usually the last one) and the baudrate (usually 19200). You can also save the current configuration as the default one by clicking Configuration
> Save configuration
and then save by overriding.
An useful tip to use GTKTerm is the ctrl + shift + L
shortcut which clears the screen.
Screen
If you are more into the command line, a useful tool is the screen
command. You can simply install it with sudo apt install screen -y
and then running it with screen /dev/tty<your device> <baudrate>
.
To exit the serial terminal you need to first press ctrl + A
, then K
and finally Y
. An useful feature of screen is that it can record the output on a file, you just need to add the -L
option.