I’m trying to make firmware but I got a error message:
collect2: error: ld terminated with signal 11 [Segmentation fault], core dumped
zubax_chibios///chibios/os/common/ports/ARMCMx/compilers/GCC/rules.mk:243: ‘build/io.px4.sapog.elf’ command not found
I think it’s caused by an GNU version. Which version should I use?
Or please let me know if anyone know of any other reason.
As per readme, you should use GCC 4.9. Some newer versions work as well.
I used GCC 4.3.9 and also used GCC 6.3.1. But I still get error.
I do not know what’s wrong if the version is not a problem.
You should use GCC 4.9, not 4.3. Also, what operating system you’re on?
Sorry. I wrote a mistake. I use 4.9, not 4.3. and ubuntu 16.04.9.
As written on the ‘Zubax Knowledge Base’, I installed the following components:
- Full-featured Ubuntu-based OS with KDE desktop.
- ARM GCC Embedded toolchain.
- Core development tools (git, make, cmake, etc.).
- Full LaTeX distribution (texlive-full).
- Eclipse IDE.
Okay, this looks right and it should work. Are you using an AMD64 system? Is the OS installed on your hardware natively, or are you using a virtualized environment? Can you try GCC 7? Please also post the output of
I’ve seen a similar report in the past, but I was never able to reproduce it. It just works on all machines that I have access to.
I am using on AMD64 system. OS is installed on my hardware natively.
At first, I used GCC 7. But I faced bug that is reported GNU web site. So I changed it to GCC 6.3.1.
The following is the output of uname -a.
Linux spacl4-To-be-filled-by-O-E-M 4.13.0-36-generic #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
I just re-checked everything. The code compiles perfectly well on my Mint 18 (based on Ubuntu 16.04), both on my PC and on a virtual machine (this one: Bistromathic virtual machine - Knowledge Base - Zubax Knowledge Base), using GCC 6.3 and GCC 4.9. Note that other versions of GCC may only work if the compiler version check at the end of
main.cpp is removed: sapog/main.cpp at 790ed7881dd40e43b09501d7a9ffb6e7020d0668 · PX4/sapog · GitHub
To be honest I have no clue what is going on. Perhaps you should send a bug report to GCC maintainers? For now, consider using the virtual machine I linked above.
I re-install OS and other components. Also I removed the compiler version check at the end of main.cpp. Then the code compiles well using GCC 6.3.1.
Thank you for checking everythig.
I’m having trouble uploading. I got a result as below.
~/software/new/sapog/tools$ ./blackmagic_flash.sh /dev/ttyACM0
text data bss dec hex filename
139832 11078 43580 194490 2f7ba compound.elf
fwupload.tempfile:1: Error in sourced command file:
/dev/ttyACM0: permission denied.
(Or) /dev/ttyACM0: no such file or directory.
I tried several things to solve it and it failed. Now, I have no idea. How can I fix it?
I already see that. I have another question. Do I apply power to Orel 20 before powering the blackmagic probe? Is the order of power supply important? Because I got this:
~/software/origin/sapog/tools$ ./blackmagic_flash.sh /dev/ttyACM0
text data bss dec hex filename
139816 11078 43572 194466 2f7a2 compound.elf
Target voltage: 0.0V
SW-DP scan failed!
fwupload.tempfile:3: Error in sourced command file:
Attaching to Remote target failed
Normally you should power the debugger first. The error could be caused by a faulty connector.
I have to wait until new debugger arrives. So I want to change the method if it is certain that it is due to a failure. you said that
If you don’t have any of the above, you could use the embedded UAVCAN bootloader via the UAVCAN GUI Tool 4.
Can I upload ‘compound.elf’ via the UAVCAN GUI Tool ?
Nope, you need a flat binary for that. It is named
I have a flat binary named
*.application.bin. Then how can I upload that via UAVCAN GUI Tool? Please let me know or leave a reference page.
We don’t have a ref page for that, but it’s easy: just double-click on the node in the GUI Tool, and you’ll see a new window pop up. In the window, click “Update Firmware”.
I solved the problem. At last, I want to operate ESC Management Pannnel on UAVCAN GUI Tool. Unlike in Windows, I can’t open it in Ubuntu. Do I have to run another command in the terminal window?
It should work in Ubuntu equally well. Could you please clarify what exactly is not working?
There’s no ESC management panel. Am I missing something?