BIN_PATH = /opt/crossworks_for_arm_2.2/gcc/arm-unknown-eabi/bin
LIBPATH = /opt/crossworks_for_arm_2.2/lib
STM32_DIR = ../targets/STM32
## cp -a /home/USAERNAME/.rowley_associates_limited/CrossWorks\ for\ ARM/packages/targets/ ../targets/ ##
CC = $(BIN_PATH)/cc1
AS = $(BIN_PATH)/as
LD = $(BIN_PATH)/ld
OBJCP = $(BIN_PATH)/objcopy
INCLUDES = -I$(STM32_DIR)/include -I../mavlink/include/common -I.
LIBS = -isystem/opt/crossworks_for_arm_2.2/include
COMPILE_OPTS = -mcpu=cortex-m4 -mthumb -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=hard -nostdinc -fsingle-precision-constant -fno-gcse -Wall -gdwarf-2 -g2 -std=c99 -O2 -fno-dwarf2-cfi-asm -fno-builtin -ffunction-sections -fdata-sections -fno-common
AS_OPTS = --traditional-format -mcpu=cortex-m4 -mthumb -EL -mfpu=fpv4-sp-d16 -mfloat-abi=hard -gdwarf-2
LINKER_OPTS = -ereset_handler --omagic -defsym=__do_debug_operation=__do_debug_operation_mempoll -u__do_debug_operation_mempoll -defsym=__vfprintf=__vfprintf_double_long_long -u__vfprintf_double_long_long -defsym=__vfscanf=__vfscanf_double_long_long -u__vfscanf_double_long_long --fatal-warnings -EL --gc-sections -Taqv6.6.ld -Map aqv6.6.map -u_vectors
VARS = -D__ARM_ARCH_7EM__ -D__CROSSWORKS_ARM -D__ARM_ARCH_FPV4_SP_D16__ -D__CROSSWORKS_MAJOR_VERSION=2 -D__CROSSWORKS_MINOR_VERSION=2 -D__CROSSWORKS_REVISION=0 -D__TARGET_PROCESSOR=STM32F407VG -D__TARGET_F4XX= -DSTM32F4XX= -DSTARTUP_FROM_RESET -D__FPU_PRESENT -DARM_MATH_CM4 -D__THUMB -DNDEBUG -DNESTED_INTERRUPTS -DCTL_TASKING -DUSE_STDPERIPH_DRIVER
LIBSTM32_OBJS = stm32f4xx_adc.o stm32f4xx_dma.o stm32f4xx_exti.o stm32f4xx_flash.o stm32f4xx_gpio.o stm32f4xx_pwr.o stm32f4xx_rcc.o stm32f4xx_rtc.o stm32f4xx_sdio.o stm32f4xx_spi.o stm32f4xx_syscfg.o stm32f4xx_tim.o stm32f4xx_usart.o STM32_Startup.o
AQV6_OBJS = 1wire.o adc.o algebra.o aq_init.o aq_mavlink.o aq_timer.o arch.o arm_fill_f32.o arm_mat_init_f32.o arm_mat_inverse_f32.o arm_mat_mult_f32.o arm_mat_trans_f32.o arm_mean_f32.o arm_std_f32.o command.o compass.o config.o control.o core.o digital.o downlink.o event.o ff.o filer.o flag.o flash.o fpu.o futaba.o gimbal.o gps.o imu.o kernelHeap.o logger.o main_ctl.o mbox.o misc.o mm.o motors.o mutex.o nav.o nav_ukf.o notice.o pid.o port.o pwm.o queue.o radio.o rcc.o rtc.o run.o sdio.o sem.o serial.o serviceReq.o spektrum.o srcdkf.o supervisor.o system_stm32f4xx.o task.o telemetry.o thumb_crt0.o time.o timer.o ublox.o utility.o util.o vn100.o
EXTRA_LIBS = $(LIBPATH)/libm_v7em_fpv4_sp_d16_hard_t_le_eabi.a $(LIBPATH)/libc_v7em_fpv4_sp_d16_hard_t_le_eabi.a $(LIBPATH)/libcpp_v7em_fpv4_sp_d16_hard_t_le_eabi.a $(LIBPATH)/libdebugio_v7em_fpv4_sp_d16_hard_t_le_eabi.a $(LIBPATH)/libc_targetio_impl_v7em_fpv4_sp_d16_hard_t_le_eabi.a $(LIBPATH)/libc_user_libc_v7em_fpv4_sp_d16_hard_t_le_eabi.a
all: aqv6.6.elf aqv6.6.bin aqv6.6.hex
clean:
rm -rf *.o
rm -rf *.d
rm -rf *.elf
rm -rf *.bin
rm -rf *.hex
rm -rf Test/*
%.o: %.c
@echo " $< -> $@"
$(eval TEMP := $(shell mkdir -p Test ; mktemp tmp_XXXXX))
$(CC) -fmessage-length=0 $(COMPILE_OPTS) $(LIBS) $(INCLUDES) $(VARS) -MD $(basename $@).d -MQ $@ -quiet $< -o $(TEMP)
$(AS) $(AS_OPTS) $(TEMP) -o $@
@rm -rf $(TEMP)
STM32_Startup.o: $(STM32_DIR)/STM32_Startup.s
$(eval TEMP := $(shell mkdir -p Test ; mktemp tmp_XXXXX))
$(CC) -E $(COMPILE_OPTS) $(LIBS) $(INCLUDES) $(VARS) -MD $(basename $@).d -MQ $@ -quiet -lang-asm $< -o $(TEMP)
$(AS) $(AS_OPTS) $(TEMP) -o $@
@rm -rf $(TEMP)
thumb_crt0.o: thumb_crt0.s
$(eval TEMP := $(shell mkdir -p Test ; mktemp tmp_XXXXX))
$(CC) -E $(COMPILE_OPTS) $(LIBS) $(INCLUDES) $(VARS) -MD $(basename $@).d -MQ $@ -quiet -lang-asm $< -o $(TEMP)
$(AS) $(AS_OPTS) $(TEMP) -o $@
@rm -rf $(TEMP)
aqv6.6.elf: $(AQV6_OBJS) $(LIBSTM32_OBJS)
$(LD) -X $(LINKER_OPTS) -o $@ --start-group $(AQV6_OBJS) $(LIBSTM32_OBJS) $(EXTRA_LIBS) --end-group
aqv6.6.bin: aqv6.6.elf
$(OBJCP) -O binary $< $@
aqv6.6.hex: aqv6.6.elf
$(OBJCP) -O ihex $< $@
root@odippel1:/usr/src/MultiCopter/autoquad/6.6/onboard# make clean all
rm -rf *.o
rm -rf *.d
rm -rf *.elf
rm -rf *.bin
rm -rf *.hex
rm -rf Test/*
1wire.c -> 1wire.o
/opt/crossworks_for_arm_2.2/gcc/arm-unknown-eabi/bin/cc1 -fmessage-length=0 -mcpu=cortex-m4 -mthumb -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=hard -nostdinc -fsingle-precision-constant -fno-gcse -Wall -gdwarf-2 -g2 -std=c99 -O2 -fno-dwarf2-cfi-asm -fno-builtin -ffunction-sections -fdata-sections -fno-common -isystem/opt/crossworks_for_arm_2.2/include -I../targets/STM32/include -I../mavlink/include/common -I. -D__ARM_ARCH_7EM__ -D__CROSSWORKS_ARM -D__ARM_ARCH_FPV4_SP_D16__ -D__CROSSWORKS_MAJOR_VERSION=2 -D__CROSSWORKS_MINOR_VERSION=2 -D__CROSSWORKS_REVISION=0 -D__TARGET_PROCESSOR=STM32F407VG -D__TARGET_F4XX= -DSTM32F4XX= -DSTARTUP_FROM_RESET -D__FPU_PRESENT -DARM_MATH_CM4 -D__THUMB -DNDEBUG -DNESTED_INTERRUPTS -DCTL_TASKING -DUSE_STDPERIPH_DRIVER -MD 1wire.d -MQ 1wire.o -quiet 1wire.c -o tmp_GDLbA
/opt/crossworks_for_arm_2.2/gcc/arm-unknown-eabi/bin/as --traditional-format -mcpu=cortex-m4 -mthumb -EL -mfpu=fpv4-sp-d16 -mfloat-abi=hard -gdwarf-2 tmp_GDLbA -o 1wire.o
adc.c -> adc.o
/opt/crossworks_for_arm_2.2/gcc/arm-unknown-eabi/bin/cc1 -fmessage-length=0 -mcpu=cortex-m4 -mthumb -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=hard -nostdinc -fsingle-precision-constant -fno-gcse -Wall -gdwarf-2 -g2 -std=c99 -O2 -fno-dwarf2-cfi-asm -fno-builtin -ffunction-sections -fdata-sections -fno-common -isystem/opt/crossworks_for_arm_2.2/include -I../targets/STM32/include -I../mavlink/include/common -I. -D__ARM_ARCH_7EM__ -D__CROSSWORKS_ARM -D__ARM_ARCH_FPV4_SP_D16__ -D__CROSSWORKS_MAJOR_VERSION=2 -D__CROSSWORKS_MINOR_VERSION=2 -D__CROSSWORKS_REVISION=0 -D__TARGET_PROCESSOR=STM32F407VG -D__TARGET_F4XX= -DSTM32F4XX= -DSTARTUP_FROM_RESET -D__FPU_PRESENT -DARM_MATH_CM4 -D__THUMB -DNDEBUG -DNESTED_INTERRUPTS -DCTL_TASKING -DUSE_STDPERIPH_DRIVER -MD adc.d -MQ adc.o -quiet adc.c -o tmp_86Cab
/opt/crossworks_for_arm_2.2/gcc/arm-unknown-eabi/bin/as --traditional-format -mcpu=cortex-m4 -mthumb -EL -mfpu=fpv4-sp-d16 -mfloat-abi=hard -gdwarf-2 tmp_86Cab -o adc.o
algebra.c -> algebra.o
.....
.....
.....
.....
/opt/crossworks_for_arm_2.2/gcc/arm-unknown-eabi/bin/as --traditional-format -mcpu=cortex-m4 -mthumb -EL -mfpu=fpv4-sp-d16 -mfloat-abi=hard -gdwarf-2 tmp_mppz6 -o STM32_Startup.o
/opt/crossworks_for_arm_2.2/gcc/arm-unknown-eabi/bin/ld -X -ereset_handler --omagic -defsym=__do_debug_operation=__do_debug_operation_mempoll -u__do_debug_operation_mempoll -defsym=__vfprintf=__vfprintf_double_long_long -u__vfprintf_double_long_long -defsym=__vfscanf=__vfscanf_double_long_long -u__vfscanf_double_long_long --fatal-warnings -EL --gc-sections -Taqv6.6.ld -Map aqv6.6.map -u_vectors -o aqv6.6.elf --start-group 1wire.o adc.o algebra.o aq_init.o aq_mavlink.o aq_timer.o arch.o arm_fill_f32.o arm_mat_init_f32.o arm_mat_inverse_f32.o arm_mat_mult_f32.o arm_mat_trans_f32.o arm_mean_f32.o arm_std_f32.o command.o compass.o config.o control.o core.o digital.o downlink.o event.o ff.o filer.o flag.o flash.o fpu.o futaba.o gimbal.o gps.o imu.o kernelHeap.o logger.o main_ctl.o mbox.o misc.o mm.o motors.o mutex.o nav.o nav_ukf.o notice.o pid.o port.o pwm.o queue.o radio.o rcc.o rtc.o run.o sdio.o sem.o serial.o serviceReq.o spektrum.o srcdkf.o supervisor.o system_stm32f4xx.o task.o telemetry.o thumb_crt0.o time.o timer.o ublox.o utility.o util.o vn100.o stm32f4xx_adc.o stm32f4xx_dma.o stm32f4xx_exti.o stm32f4xx_flash.o stm32f4xx_gpio.o stm32f4xx_pwr.o stm32f4xx_rcc.o stm32f4xx_rtc.o stm32f4xx_sdio.o stm32f4xx_spi.o stm32f4xx_syscfg.o stm32f4xx_tim.o stm32f4xx_usart.o STM32_Startup.o /opt/crossworks_for_arm_2.2/lib/libm_v7em_fpv4_sp_d16_hard_t_le_eabi.a /opt/crossworks_for_arm_2.2/lib/libc_v7em_fpv4_sp_d16_hard_t_le_eabi.a /opt/crossworks_for_arm_2.2/lib/libcpp_v7em_fpv4_sp_d16_hard_t_le_eabi.a /opt/crossworks_for_arm_2.2/lib/libdebugio_v7em_fpv4_sp_d16_hard_t_le_eabi.a /opt/crossworks_for_arm_2.2/lib/libc_targetio_impl_v7em_fpv4_sp_d16_hard_t_le_eabi.a /opt/crossworks_for_arm_2.2/lib/libc_user_libc_v7em_fpv4_sp_d16_hard_t_le_eabi.a --end-group
/opt/crossworks_for_arm_2.2/gcc/arm-unknown-eabi/bin/objcopy -O binary aqv6.6.elf aqv6.6.bin
/opt/crossworks_for_arm_2.2/gcc/arm-unknown-eabi/bin/objcopy -O ihex aqv6.6.elf aqv6.6.hex
BIN_PATH = /opt/crossworks_for_arm_2.2/gcc/arm-unknown-eabi/bin
LIBPATH = /opt/crossworks_for_arm_2.2/lib
STM32_DIR = ../targets/STM32