Zubax GNSS2 firmware building issue

While i am building the firmware for zubax GNSS2 module. i am facing the following issue.

ERROR:
gengatharan@gengatharan-MS-7D98:~/embedded_codes/zubax_gnss/firmware$ make binaries RELEASE=1
Traceback (most recent call last):
File “/home/gengatharan/embedded_codes/zubax_gnss/firmware/libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdlc”, line 59, in
from libuavcan_dsdl_compiler import run as dsdlc_run
File “/home/gengatharan/embedded_codes/zubax_gnss/firmware/libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/init.py”, line 17, in
from uavcan import dsdl
File “/home/gengatharan/embedded_codes/zubax_gnss/firmware/libuavcan/libuavcan/dsdl_compiler/pyuavcan/uavcan/init.py”, line 15, in
import uavcan.transport as transport
File “/home/gengatharan/embedded_codes/zubax_gnss/firmware/libuavcan/libuavcan/dsdl_compiler/pyuavcan/uavcan/transport.py”, line 203, in
class ArrayValue(BaseValue, collections.MutableSequence):
AttributeError: module ‘collections’ has no attribute ‘MutableSequence’

Compiling nmea.cpp
In file included from libuavcan/libuavcan/include/uavcan/uavcan.hpp:11,
from src/nmea/nmea.cpp:24:
libuavcan/libuavcan/include/uavcan/time.hpp:12:10: fatal error: uavcan/Timestamp.hpp: No such file or directory
12 | #include <uavcan/Timestamp.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [zubax_chibios///chibios/os/common/ports/ARMCMx/compilers/GCC/rules.mk:199: build/obj/nmea.o] Error 1

How i can resolve the issue?
Thanks i advance.

so far, i done to kill the error by changing my python version to 2.7.9. it worked.
But i got another error by saying

Some, GCC compiler version error it seems.
my GCC compiler version is:

So. can someone please help me how to solve this issue?
Thanks in advance.

The first issue is probably related to the compiler not finding the DSDL files (these define the types used for Cyphal communication).

Looking at zubax_gnss, it seems that it is added as a submodule:

Can you make sure you executed this command:

(Make sure the folder is there in zubax_gnss/firmware)

The Python version should probably be the one you used first, I doubt Python 2.7.9 is supported.

The documentation specifies ARM GCC 7.3.1, you’re currently on a more recent version, this could still work, but if it doesn’t, I would suggest installing this specific version in parallel to the one you already have by using the following method:

This is pretty useful when dealing with different Compiler/CMake version:

update-alternatives(1) - Linux manual page

My usecase:
I have to re-compile some older firmware, which relied on CMake 3.22 (while I’m currently on 3.27).
I downloaded/unpacked both version to /opt then created symlinks to both in /usr/bin:

ln -s /opt/cmake-3.22.1/bin/cmake /usr/bin/cmake-3.22

Now you should be able to call cmake-3.22 and cmake-3.27 (but not cmake, this is important, won’t work otherwise; if you have something installed in PATH remove that binary).

Now using update-alternatives:

sudo update-alternatives --install /usr/bin/cmake cmake /usr/bin/cmake-3.27 100
sudo update-alternatives --install /usr/bin/cmake cmake /usr/bin/cmake-3.22 50

Last number is priority, higher = more priority.
Good thing is you can actually switch between the 2 versions.

(In your case you will need to install GCC, but you get the picture)

To download and unpack the Arm compiler you will use the following commands:

wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2
tar -xjf gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2

Source of different ARM compilers

After you have downloaded and unpacked the correct compiler you can follow the instructions above (just replace CMake with arm-none-eabi-gcc).

THANKS… CHANGED THE ARM-GCC-COMPILER TO 7.2.1 AND NOW IT IS WORKING!!


AND LET ME FLAST THE FIRMWARE IN ZUBAX GNSS2.

THANKS FOR POINTING IT TO ME.

1 Like

can please state me the procedure for safely load the firmware in ZUBAX GNSS2 without bricking the system?.
While going to the CUI using putty, i faced some issue like ERROR -20002. and i plugged out the modules which was connected to system through microUSB.
THANKS IN ADVANCE.

Did you try this?

Thank you for suggestion!!!
yes i did,

but showing some warning.
Is that mean, i have to be in bootloader mode before running those command in terminal?

No, it means it’s not finding the Black Magic probe, have you connected the probe to your computer?

It should appear like this:

Thanks you.
problem fixed and uploaded.

But in my case,i am not using black-magic-probe since i dont have it. i am not using UART or CAN, but i am using USB interface for uploading the firmware. So, i run the flash_via_serial_bootloader.sh bash script by specifically for uploading com.zubax.gnss-2.2-4.1.924205f.application.bin.

Here is the command that i used to upload the firmware in ZUBAX GNSS2:

i hope that the process that i used to upload the firmware was correct.
Thanks a lot @maksim.drachov

1 Like