Compilation des sources autoquads
Pre-requis et environnement
Il faut d'abord installer tout un environnement de développement.
Pour plus de détail cliquer ICI.
Configuration du Makefile
Suivant le type de carte autoquad utilisée il est nécessaire de
personnaliser les options de compilations
Pour cella il faut creer un fichier Makefile.user
dans le répertoire: ~/autoquad/source/autoquad/onboard/Makefile
Ci dessous configuration pour une carte m4 v2.
root@ubuntu:~/autoquad/source/autoquad/onboard#
more Makefile.user
# Board version to build for (6=AQv6, 7=AQv7, 8=AQ M4)
BOARD_VER ?= 8
#
# Board revision to build for
# For AQv6: 0=initial release, 1=Oct. 2012 revision)
# For AQ M4: 1-3=early prototypes, 4-5=beta boards, 6=Dec 2014
production (aka M4v2)
BOARD_REV ?= 6
# Increment build number? (0|1) This is automatically disabled
for debug builds.
INCR_BUILDNUM ?= 0
root@ubuntu:~/autoquad/source/autoquad/onboard#
Compilation :
Se placer dans le répertoire ~/autoquad/source/autoquad/onboard/ et
lancer la commande make
root@ubuntu:~/autoquad/source/autoquad/onboard#
make
Attempting to create build
folders...
mkdir -p ../build/Release/obj
mkdir -p
../build/Release/obj/STM32SYS
mkdir -p
../build/Release/obj/STM32DSPLIB
## Compiling 1wire.c ->
../build/Release/obj/1wire.o ##
/usr/share/crossworks_for_arm_2.3/gcc/arm-unknown-eabi/bin/cc1
-mcpu=cortex-m4 -mthumb -mlittle-endian -mfpu=fpv4-sp-d16
-mfloat-abi=hard -nostdinc -fsingle-precision-constant -Wall
-finline-functions -Wdouble-promotion -std=c99 -fno-dwarf2-cfi-asm
-fno-builtin -ffunction-sections -fdata-sections -fno-common
-fmessage-length=0 -quiet -I. -I../STM32/include
-I../STM32F4xx_DSP_StdPeriph_Lib_V1.3.0/Libraries/STM32F4xx_StdPeriph_Driver/inc
-I../STM32F4xx_DSP_StdPeriph_Lib_V1.3.0/Libraries/CMSIS/Include
-I../mavlink/include/autoquad
-I/usr/share/crossworks_for_arm_2.3/include -D__SIZEOF_WCHAR_T=4
-D__ARM_ARCH_7EM__ -D__CROSSWORKS_ARM -D__ARM_ARCH_FPV4_SP_D16__
-D__TARGET_PROCESSOR=STM32F407VG -D__CROSSWORKS_MAJOR_VERSION=2
-D__CROSSWORKS_MINOR_VERSION=3 -D__CROSSWORKS_REVISION=2
-D__TARGET_PROCESSOR_STM32F407VG -DSTM32F4XX -DSTM32F40_41xxx
-D__FPU_PRESENT=1 -DARM_MATH_CM4 -D__THUMB -DNESTED_INTERRUPTS
-DCTL_TASKING -DUSE_STDPERIPH_DRIVER -DBOARD_VERSION=8
-DBOARD_REVISION=6 -DNDEBUG -DSTARTUP_FROM_RESET -O2 -g2 -MD
../build/Release/obj/1wire.d -MQ ../build/Release/obj/1wire.o 1wire.c
-o ../build/Release/obj/1wire.lst
......
Le résultats de la compilation sont dans le répertoire :
~/autoquad/source/autoquad/build/Release
root@ubuntu:~/autoquad/source/autoquad/build/Release#
ls -lrt
total 2568
-rwxr-xr-x 1
root root 1750068 avril 26 21:38 aqv7.1.1864-hwv8.6.elf
-rw-r--r-- 1
root root 642331 avril 26 21:38 aqv7.1.1864-hwv8.6.hex
-rwxr-xr-x 1
root root 228340 avril 26 21:38 aqv7.1.1864-hwv8.6.bin
drwxr-xr-x 4
root root 4096 avril 26 21:40 obj
root@ubuntu:~/autoquad/source/autoquad/build/Release#