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.
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.
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.