Hi there, I try to make basic steps for developing of PX4.
At first I done steps, described there https://dev.px4.io/en/setup/dev_env_linux_ubuntu.html
I launched ubuntu_sim_nuttx.sh and got src/Firmware directory, that is OK
Then next step is https://dev.px4.io/en/setup/building_px4.html
That says to clone Firmware repository from git.
First question - What difference between Firmware cloned using -git, and Firmware, generated from *.sh script??
Second question - What my next basic steps for generating some example code (*.bin) for stm32f4discovery?
I found some solutions for ArduPilot, but I hope to use clearly PX4
One time I worked with Nuttx directly. But I confused what I need to do for building code for stm32 using PX4
I suggest you use a Pixhawk or Pixracer or something like that because it will be much easier and most things should work out of the box. If you use the discovery board you need to add support for that board on a much lower level and define the pins and timer that you want to use, etc. Additionally, you will probably the sensors that you need for a drone.
Thanks, i build the pixracer code using command line. (that uses stm32f4 as core) but i have another unsolved thing. Building Nuttx target with QT
I found the same question in :
But this still unsolved for me.
So, how built Nuttx target using QT? I see that QT built
-posix oriented target by default.
Sorry, it seems I solved question for building nuttx target in QT
adding path to Build directory like - “Firmware/build_px4fmu-v4_default”
Now it clearly builts as needed target (Nuttx)
So… generated *.bin is large, but now I try modify project for stm-discovery board and launch test code.
Hi,
i first built px4_fmu-v3 then i did,
cmake …/Firmware -G “CodeBlocks - Unix Makefiles”
Then load the CMakeLists.txt in the root firmware folder via File > Open File or Project (Select the CMakeLists.txt file).
I followed this and imported my project in Qt. I build it. It was successful. When I click on the “play” button as mentioned,
i face the below error:
Starting /home/niran/Firmware/bin/px4… INFO [px4] assuming working directory is rootfs, no symlinks needed. ERROR [px4] Error opening startup file, does not exist: etc/init.d/rcS /home/niran/Firmware/bin/px4 exited with code 255
Hm… It seems that building folder is invalid, and compiler cannot find rcS, according to your target. I had something similar, but with “clear” Nuttx. Not with PX4. I never tried to compile PX4 with CodeBlocks. But it a good idea.
In QT you need to set valid building folder for target. That will check valid rcS. Dont use cmake …/Firmware… command in terminal. You can do this (cmake) through QT directly. If you still need help, I try it.
To start SITL you require more than just running the px4 executable. You need to setup some symlinks, command line arguments, etc…
Usually this is done using make px4_sitl gazebo and this then starts various scripts.