Hey there!
While trying to make a native build on my Pi3B+ for navio2 I get an error like that:
This happens with different versions. I tried 1.9, 1.10 and 1.10.1. This happens after executing: ‘‘make emlid_navio2_native’’. I want to stick with the native build.
Have no idea how to fix it.
I will be glad to hear any solutions.
Can you try with master? This looks like a bug but the code is not there in master anymore, so it might have been replaced.
Hey. Thanks for reply.
As I understood it is just a warning not an error actually. But is stops the procedure. Is it possible to turn off the warning check?
I also tried master, but there was a Problem before that. After „cd Firmware“. It said to me that there is no option like „emlid_navio2_native“. I checked list of possible commands, there was only „emlid_navio2“ for cross build.
Yes, because that is the only supported and recommended way at this point, I believe.
Correct so you can make it compile without -Werror
but it will be a bug later because the strncpy is probably incorrect.
Oh. It means that with Master release possible is only cross build?
Also I don’t get it why there is a bug in a code?
Yes, looks like it.
https://github.com/PX4/Firmware/blob/v1.10.2/boards/emlid/navio2/navio_adc/navio_adc.cpp#L167
We copy sizeof(ADC_SYSFS_PATH)
bytes from ADC_SYSFS_PATH
to channel_path
.
However, sizeof(ADC_SYSFS_PATH)
is the size of the pointer so for a 32bit system 4 bytes.
Unfortunately cross build is undesirable solution. Is it any possibility that this bug will be fixed in near future?
The core devs are mostly not focused on RPi+Navio setups. THis means it’s up to you or anyone else using this. Feel free to make a pull request to fix it.
How to make a pull request?
Thank you!
Last try, I want to see what will be if I disable warnings. But in the file which calls a warning I can not see any lines with -Werror. How can I disable warnings?
Thank you!
I deleted that line and upload was finished.
But trying executing:
sudo ./build/emlid_navio2_native/px4 -s ./posix-configs/rpi/px4.config’
leads to:
sudo: ./build/emlid_navio2_native/px4: command not found
The path of where the px4 binary is has probably changed. Have a look around in the folders to see where it is.
Uff. Thank you very much! Finally I did it by using:
sudo ./build/emlid_navio2_native/bin/px4 -s ./posix-configs/rpi/px4.config
but what confuses me is autostart. I did exactly as said added this line:
cd /home/pi && ./bin/px4 -d -s px4.config > px4.log
exit 0
But once I turn my Pi off and turn it on it is not in px4 mode. I need again to run:
cd Firmware
sudo ./build/emlid_navio2_native/bin/px4 -s ./posix-configs/rpi/px4.config
Is there any option to make it available on boot so I don’t need to make this procedure each time?
Ah nice. I would start it from the system, just google how to start a process at startup. Often it’s done with systemd.
I don’t want to screw this up and accidentally send my Pi to do some infinite loop while booting, so, I would ask. Because this way was suggested in the manual. What this line actually does:
cd /home/pi && ./bin/px4 -d -s px4.config > px4.log
and why is it doing nothing in my case, I mean, maybe I need to slightly change something here, like in previous cases.
I don’t think that’s the risk. If it fails it just won’t run.
hello when i executed sudo ./build/emlid_navio2_default/bin/px4 -s ./posix-configs/rpi/px4.config
px4 no file/directory showing…