User Tools

Site Tools


rc:sw:fc:px4:build_from_source

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rc:sw:fc:px4:build_from_source [2016/01/07 16:13] – [Debug] redoxrc:sw:fc:px4:build_from_source [2023/11/24 21:55] (current) – external edit 127.0.0.1
Line 12: Line 12:
 ## Build ## Build
  
-* `make help` +### Using CMake, manual
-    Useful to know the available targets+
  
-* `make BOARDS=yourtarget menuconfig` +    mkdir build/ 
-    Requires kconfig-mconf, but useful to config NuttX+    cd build/ 
 +    cmake .. -DCONFIG=nuttx_sparky2_default 
 +    make -j2 -l2 
 +    make upload
  
-* `make BOARDS=yourtarget archives` 
-    Build the NuttX OS archive for _yourtarget_ 
  
-* `make BOARDS=yourtarget yourtarget_default` 
-    Build PX4 for _yourtarget_ 
  
-* `make BOARDS=yourtarget yourtarget_default upload` +### Using the Makefile, auto mode
-    Build PX4 and upload using PX4 Bootloader (USB)+
  
-### Combo+You need a "recent" CMake (>= 3.3 ). On debian stable, you need to rebuild the package using the sources from testing. Uninstall sdcc before building the package, otherwise one of the tests fails :/ 
  
-    make BOARDS=yourtarget archives yourtarget_default upload+* `make yourboard_default`  
 +  Update the submodules and build the config for _yourboard_. The available configs are located in cmake/configs/ and your need to check the makefile in / to list the available build targets (which then make calls to the cmake configs)
  
-If you make any change in the NuttX/, you need to delete everything and start over...+The "binary" is then available in `build_yourboard_default/src/firmware/_os_/
 + 
 +* `make yourboard_default upload`  
 +  Build and upload to the board using the PX4 bootloader
  
-    rm -R Archives/ Build/ 
-    make BOARDS=yourtarget archives yourtarget_default upload 
  
  
 ## Flash ## Flash
  
-### DFU 
- 
-* https://pixhawk.org/dev/bootloader_update#updating_the_onboard_bootloader 
  
 ### PX4 Bootloader ### PX4 Bootloader
  
-* https://pixhawk.org/dev/nuttx/building_and_flashing_console+    make -j2 -l2 sparky2_bl 
 +    dfu-util -a 0 -d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D sparky2_bl.bin 
 + 
 + 
 +* https://pixhawk.org/dev/bootloader_update#updating_the_onboard_bootloader
  
  
 ## Debug ## Debug
  
-    openocd -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg+    #openocd -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg 
 +    openocd -f Debug/sparky2-board.cfg 
 + 
 +    # Start GDB 
 +    arm-none-eabi-gdb -x Debug/openocd.gdbinit ./build/src/firmware/nuttx/firmware_nuttx 
 + 
 +    #In GDB: 
 +    #tar ext :3333 
 + 
 +And debug as usual...
  
-  
-    In GDB: 
-    tar ext :3333 
-    # 'n debug... 
-     
 ## Links ## Links
  
 * http://www.megapirateng.com/2014/02/f4by-entering-32bit-world/ * http://www.megapirateng.com/2014/02/f4by-entering-32bit-world/
  
/home/share/www/redox.ws/wiki/data/attic/rc/sw/fc/px4/build_from_source.1452183193.txt.gz · Last modified: 2023/11/24 21:55 (external edit)