Facing Issue with SatNOGS-COMMS Board Firmware Building

Hi friends!
I am trying to learn SatNOGS-COMMS Board to use it on a CubeSat project I am currently working on.
I was following the Gitlab repo to understand how to customize the firmware for my project.
As of Now, I don’t have the board with me.
I am following the reference from SatNOGS-COMMS: Building and flashing the firmware
While trying to build the firmware from my Zephyr RTOS virtual environment on my Ubuntu, I am facing the following issue:

(.venv) username@hostname:~/Path/to/Parent/Directory/satnogs-comms-software-mcu$ west build --board=satnogs_comms@0.3.1 -d build --pristine -o=-j$(nproc) -DBOARD_ROOT=$PWD
ERROR: source directory -DBOARD_ROOT=/home/username/Path/to/Parent/Directory/satnogs-comms-software-mcu does not exist
FATAL ERROR: refusing to proceed without --force due to above error

I am litarally inside the directory this command is telling me doesn’t exist
I tried appending --force at the end of the command (just trying random command) but it still gave the same error

Then I tried below command (again trying stuff randomly) and got the following response:

(.venv) username@hostname:~/Path/to/Parent/Directory/satnogs-comms-software-mcu$ west build --force
[1/363] Preparing syscall dependency handling

[3/363] Generating include/generated/zephyr/version.h
– Zephyr version: 4.1.99 (/home/username/Path/to/Parent/Directory/satnogs-comms-software-mcu/zephyr), build: v4.1.0-2346-g781011b91173
[17/363] Building CXX object CMakeFiles/app.dir/src/io.cpp.obj
/home/username/Path/to/Parent/Directory/satnogs-comms-software-mcu/src/io.cpp:122:27: warning: ‘satnogs::comms::can2_msg’ defined but not used [-Wunused-variable]
122 | static msg_arbiter::msg can2_msg;
| ^~~~~~~~
[21/363] Building CXX object CMakeFiles/app.dir/src/tests/test.cpp.obj
/home/username/Path/to/Parent/Directory/satnogs-comms-software-mcu/src/tests/test.cpp:40:16: warning: ‘satnogs::comms::buffer’ defined but not used [-Wunused-variable]
40 | static uint8_t buffer[512];
| ^~~~~~
[363/363] Linking CXX executable zephyr/satnogs-comms.elf
Memory region Used Size Region Size %age Used
FLASH: 192336 B 2 MB 9.17%
RAM: 147312 B 512 KB 28.10%
BACKUP_SRAM: 0 GB 4 KB 0.00%
EXTMEM: 0 GB 256 MB 0.00%
SRAM1: 0 GB 128 KB 0.00%
SRAM2: 0 GB 128 KB 0.00%
SRAM3: 0 GB 32 KB 0.00%
SRAM4: 0 GB 64 KB 0.00%
DTCM: 0 GB 128 KB 0.00%
ITCM: 0 GB 64 KB 0.00%
RetainedMem: 0 GB 4 KB 0.00%
IDT_LIST: 0 GB 32 KB 0.00%
Generating files from /home/username/Path/to/Parent/Directory/satnogs-comms-software-mcu/build/zephyr/satnogs-comms.elf for board: satnogs_comms

As I mentioned earlier, I don’t have the board with me, so wasn’t able to flash and test this.
So is this a proper way of building the firmware?
Also how can I solve the problem I am facing with instructions provided at SatNOGS-COMMS: Building and flashing the firmware
Any help is very much appreciated!
Thanks in advance

Hello Naigam!

Recently I was building the firmware in a fresh Ubuntu environment, so I can share the firmware build instructions with you:

First of all, make sure you have cloned the repository with the --recurse-submodules flag:
git clone --recurse-submodules https://gitlab.com/librespacefoundation/satnogs-comms/satnogs-comms-software-mcu.git
The above is already described at SatNOGS-COMMS: Building and flashing the firmware so I assume you don’t really need to do this. Just make sure you did this right.
Next make sure you have installed all of the required dependencies. For ubuntu you can run:
sudo apt install --no-install-recommends git cmake ninja-build gperf ccache dfu-util device-tree-compiler wget python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1
After that, cd into satnogs-comms-software-mcu directory and activate the virtual environment as you already did.
Then run these commands:

  • west init --mf west.yml (Since you have already done this previously you may skip this step)
  • west update
  • west zephyr-export
  • west packages pip --install
  • west sdk install

After that, try to run west build --board=satnogs_comms@0.3.2 -d build --pristine -o=-j$(nproc) -- -DEXTRA_CONF_FILE=boards/lsf/satnogs_comms/debug.conf -DBOARD_ROOT=$PWD and you should be fine.

2 Likes

Thanks Giannis
This was very much helpful
I will let you know how my project turns out to be

1 Like

Glad to help!

1 Like