Hey folks, I just tried to find the documentation of how to setup an RIOT development environment to send it to colleagues, but failed. The best documentation I found is currently hosted on a third-party page:The documentation in the Wiki and doc.riot-os.org seems to be outdated and incomplete (https://github.com/RIOT-OS/RIOT/wiki/Family:-ARM is linking the deprecated launchpad toolchain and not listing the required packages). Am I just blind?
I am working a bit on this (more for me to have a reproducible setup).
It is based on ansible but I would like to use to to deploy developer environments.
There is always https://github.com/RIOT-OS/RIOT/tree/master/dist/tools/packer/scripts but I don’t know how up to date things are.
The other thing that I have not considered is different OSes.
That seems overly complicated. For the common case
sudo apt install gcc-arm-none-eabi python3-serial
For debugging installing
sudo apt install gdb-multiarch openocd
should suffice - although
openocd would best be compiled from source as the last release is pretty old.
Another way to get the toolchain is to use the Docker image:
sudo apt install docker
BUILD_IN_DOCKER=1 for each build command.
You still have to use your system package manager or build by hand to get the other tools (serial, debugger and programmer).
For Python packages, I think it would make sense to include a requirements.txt file at the root of RIOTBASE. Then installing the Python package would be as simple as
pip install -r requirements.txt.
This file will not only contain the python3-serial package but also all packages used for SUIT for example.
The https://github.com/RIOT-OS/Tutorials “setup” section is an OK starting point, Jose had this install script https://github.com/jia200x/RIOT-scripts that I used a bunch of times in the past. I have also been wanting to add flashing in docker support for a while now https://github.com/RIOT-OS/RIOT/pull/12419.
But I agree that ATM how to setup RIOT is not clear at all, and a big problem IMO. I think we should add a setup that would cover:
- recommended setup for OSX, LINUX, Windows.
- setting up with a VM/Vagrant
- docker build environment + flashing/debug tools
- native development environment and split by arch.
- experimental (using docker for everything https://github.com/fjmolinas/riotdocker/tree/flashtools_dockerfiles/flashers and https://github.com/RIOT-OS/RIOT/pull/12419)
In my experience OSX is a pain but… https://lists.riot-os.org/pipermail/users/2020-March/001522.html can be a good starting point.
As a first initial step simply using the setup in “Tutorials” could be a good idea. @MrKevinWeiss Can you point to what you have so far? Maybe there is more people in the community with some setup experience?
Unfortunately that won’t work for my use case since the GCC on the Ubuntu version I’m forced to work on isn’t compatible. Installing a custom ARM toolchain isn’t complicated, but it took me too long for my taste to figure out what to install.
For the use of RIOT on windows, I am currently developing in WSL2.
I works quite well for development and ease of use. However you would still need to program using windows or another device, as WSL2 cannot access the USB devices.
I used msys2 to setup RIOT!