Installation and setup
Installing the toolchain
Please read the whole section before following any links.
Getting necessary software
To get started, follow the instructions in the README file of the sage-com-satnogs-sw GitLab.
In the Zephyr Getting Started Guide, you will be prompted to create a virtual environment to install west in. This can also be done without a virtual environment by installing west directly onto the computer by executing pip install west --user. Be sure to install openOCD as well: pip install openocd.
Be sure to install STM Cube Programmer as well if you don't already have it installed.
Potential issues
There is a possibility that installing west does not work, which might be of the following reasons:
- In the YOUR_PYTHON_VERSION/lib/site-packages, there might be a ~ip-SOMETHING folder that contains artifacts of pip update. Simply remove the folder manually.
- Run
pip install west --userand do not forget the--userflag, since this prevents a curiouscould not find exe [...].deletemeerror. If you have already tried installing west without the--userflag, you need topip uninstall westbefore attempting again with the correct command.
DO NOT USE ADMIN CONSOLE TO BUILD, since this creates admin only files that cannot be overwritten by a new build and creates an error of dubious ownership.
When trying to flash SatNOGS code, west flash may not work just like that. To fix this, add a --runner argument such as west flash --runner stm32cubeprogrammer as noted in the official documentation.
Desired outcome and debugging
Any builds that are created should now work on non-admin consoles as well.
west flash should also work now and use STM Cube Programmer with hardware reset, which works great. Be sure to have STM Cube Programmer installed as well.
west debugserver sets up a debugging server, which is required to start a debug session on vscode with the zephyr-gdb "run and debug" setting. Always run west debugserver first and then run the vscode debugging. Turn off the debugserver after changes or when done with ctrl+C in the cmd.
Using the toolchain
handling the virtual environment
If you have installed west locally, you don't have to follow this.
To enable the virtual environment where west is installed, navigate to C:\users\YOUR_USER and run:
zephyrproject\.venv\Scripts\activate.bat
Do deactivate it, run:
deactivate
Example: Building, flashing and debugging the Blinky sample from Zephyr
- In a command window, navigate to
C:\PATH\TO\YOUR\WORKSPACE\sage-com-satnogs-sw-workspace\sage-com-satnogs-sw - Build the Blinky sample with
west build -p always -b [BOARD NAME] ..\zephyr\samples\basic\blinky- For the NUCLEO H723 directly, run
west build -p always -b nucleo_h723zg ..\zephyr\samples\basic\blinky
- For the NUCLEO H723 directly, run
- To flash the board, run
west flashor to debug, consult the "Desired outcome and debugging" chapter.