Directories FatFS / CoOS / STM32 libs moved to thirdparty

This commit is contained in:
bsongis
2015-03-14 11:56:24 +01:00
parent 318fc79dfe
commit 2817866ad2
456 changed files with 1154 additions and 2580 deletions
+65 -59
View File
@@ -370,6 +370,10 @@ FONT2PNG = -$(PYTHON) ../util/font2png.py
TRANSLATE = -$(PYTHON) ../util/translate.py
VERSION = 2.0.99
THIRDPARTY = thirdparty
COOSDIR = $(THIRDPARTY)/CoOS
FATFSDIR = $(THIRDPARTY)/FatFs
SRC =
CPPSRC =
INCDIRS = . translations
@@ -615,7 +619,7 @@ ifeq ($(PCB), GRUVIN9X)
SDCARD = NO
BUZZER = NO
THR_TRACE = YES
INCDIRS += targets/gruvin9x targets/stock FatFs FatFs/option
INCDIRS += targets/gruvin9x targets/stock $(FATFSDIR) $(FATFSDIR)/option
BOARDSRC = main_avr.cpp targets/gruvin9x/board_gruvin9x.cpp
EXTRABOARDSRC = targets/stock/lcd_driver.cpp targets/common_avr/telemetry_driver.cpp
EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp
@@ -628,7 +632,7 @@ ifeq ($(PCB), GRUVIN9X)
CPPDEFS += -DRTCLOCK -DSDCARD
CPPSRC += rtc.cpp sdcard.cpp logs.cpp targets/gruvin9x/rtc_driver.cpp
GUIGENERALSRC += gui/$(GUIDIRECTORY)/menu_general_sdmanager.cpp
EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c targets/gruvin9x/diskio.cpp
EXTRABOARDSRC += $(FATFSDIR)/ff.c $(FATFSDIR)/fattime.c $(FATFSDIR)/option/ccsbcs.c targets/gruvin9x/diskio.cpp
endif
ifeq ($(BUZZER), YES)
@@ -660,7 +664,7 @@ ifeq ($(PCB), MEGA2560)
SDCARD = NO
BUZZER = YES
THR_TRACE = YES
INCDIRS += targets/mega2560 targets/stock FatFs FatFs/option
INCDIRS += targets/mega2560 targets/stock $(FATFSDIR) $(FATFSDIR)/option
BOARDSRC = main_avr.cpp targets/mega2560/board_mega2560.cpp
EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp
PULSESSRC = pulses/pulses_avr.cpp
@@ -675,7 +679,7 @@ ifeq ($(PCB), MEGA2560)
endif
ifeq ($(SDCARD), YES)
EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c targets/gruvin9x/diskio.cpp
EXTRABOARDSRC += $(FATFSDIR)/ff.c $(FATFSDIR)/fattime.c $(FATFSDIR)/option/ccsbcs.c targets/gruvin9x/diskio.cpp
CPPDEFS += -DSDCARD -DRTCLOCK
GUIGENERALSRC += gui/$(GUIDIRECTORY)/menu_general_sdmanager.cpp
CPPSRC += rtc.cpp sdcard.cpp logs.cpp targets/gruvin9x/rtc_driver.cpp
@@ -736,12 +740,12 @@ ifeq ($(PCB), $(filter $(PCB), SKY9X 9XRPRO))
ifeq ($(SPORT_FILE_LOG), YES)
CPPDEFS += -DSPORT_FILE_LOG
endif
INCDIRS += targets/sky9x CoOS CoOS/kernel CoOS/portable
INCDIRS += targets/sky9x $(COOSDIR) $(COOSDIR)/kernel $(COOSDIR)/portable
GUIGENERALSRC += gui/$(GUIDIRECTORY)/menu_general_hardware.cpp gui/$(GUIDIRECTORY)/menu_general_diagkeys.cpp gui/$(GUIDIRECTORY)/menu_general_diaganas.cpp
BOARDSRC = main_arm.cpp targets/sky9x/board_sky9x.cpp
EXTRABOARDSRC = targets/sky9x/lcd_driver.cpp
SRC += targets/sky9x/core_cm3.c targets/sky9x/board_lowlevel.c targets/sky9x/crt.c targets/sky9x/vectors_sam3s.c
SRC += CoOS/kernel/core.c CoOS/kernel/hook.c CoOS/kernel/task.c CoOS/kernel/event.c CoOS/kernel/time.c CoOS/kernel/timer.c CoOS/kernel/flag.c CoOS/kernel/mutex.c CoOS/kernel/serviceReq.c CoOS/portable/GCC/port.c CoOS/portable/arch.c
SRC += $(COOSDIR)/kernel/core.c $(COOSDIR)/kernel/hook.c $(COOSDIR)/kernel/task.c $(COOSDIR)/kernel/event.c $(COOSDIR)/kernel/time.c $(COOSDIR)/kernel/timer.c $(COOSDIR)/kernel/flag.c $(COOSDIR)/kernel/mutex.c $(COOSDIR)/kernel/serviceReq.c $(COOSDIR)/portable/GCC/port.c $(COOSDIR)/portable/arch.c
SRC += targets/sky9x/usb/device/core/USBD_UDP.c targets/sky9x/usb/device/core/USBDDriver.c
SRC += targets/sky9x/usb/device/massstorage/MSDDriver.c targets/sky9x/usb/device/massstorage/MSDDStateMachine.c targets/sky9x/usb/device/massstorage/MSDLun.c targets/sky9x/usb/device/massstorage/MSDDriverDescriptors.c targets/sky9x/usb/device/massstorage/SBCMethods.c
SRC += targets/sky9x/usb/common/core/USBEndpointDescriptor.c targets/sky9x/usb/common/core/USBGenericRequest.c targets/sky9x/usb/common/core/USBFeatureRequest.c targets/sky9x/usb/common/core/USBInterfaceRequest.c targets/sky9x/usb/common/core/USBGetDescriptorRequest.c targets/sky9x/usb/common/core/USBSetAddressRequest.c targets/sky9x/usb/common/core/USBSetConfigurationRequest.c targets/sky9x/usb/common/core/USBConfigurationDescriptor.c targets/sky9x/usb/common/core/USBGenericDescriptor.c
@@ -754,10 +758,10 @@ ifeq ($(PCB), $(filter $(PCB), SKY9X 9XRPRO))
BITMAPS += bitmaps/9X/splash.lbm bitmaps/9X/asterisk.lbm bitmaps/9X/about.lbm
ifeq ($(SDCARD), YES)
CPPDEFS += -DSDCARD -DVOICE
INCDIRS += FatFs FatFs/option
INCDIRS += $(FATFSDIR) $(FATFSDIR)/option
CPPSRC += sdcard.cpp logs.cpp
GUIGENERALSRC += gui/$(GUIDIRECTORY)/menu_general_sdmanager.cpp
EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c targets/sky9x/diskio.cpp
EXTRABOARDSRC += $(FATFSDIR)/ff.c $(FATFSDIR)/fattime.c $(FATFSDIR)/option/ccsbcs.c targets/sky9x/diskio.cpp
endif
ifeq ($(BUZZER), YES)
CPPDEFS += -DBUZZER
@@ -845,21 +849,24 @@ ifeq ($(PCB), TARANIS)
PPM_CENTER_ADJUSTABLE = YES
DSM2 = PPM
CPPDEFS += -DPCBTARANIS -DCPUARM -DCPUSTM32 -DVIRTUALINPUTS -DLUAINPUTS -DXCURVES -DEEPROM_VARIANT=0 -DAUDIO -DPXX
INCDIRS += targets/taranis CoOS CoOS/kernel CoOS/portable
INCDIRS += targets/taranis $(THIRDPARTY) $(COOSDIR) $(COOSDIR)/kernel $(COOSDIR)/portable
ifeq ($(PCBREV), REV9E)
STM32LIBPATH = $(THIRDPARTY)/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries
CPPDEFS += -DHSE_VALUE=16800000
CPPDEFS += -DSTM32F40_41xxx
EXTRAINCDIRS += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Include targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc
EXTRAINCDIRS += $(STM32LIBPATH)/CMSIS/Device/ST/STM32F4xx/Include $(STM32LIBPATH)/CMSIS/Include $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/inc
else
STM32LIBPATH= $(THIRDPARTY)/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries
CPPDEFS += -DHSE_VALUE=12000000
EXTRAINCDIRS += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/include
EXTRAINCDIRS += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/inc $(STM32LIBPATH)/CMSIS/Device/ST/STM32F2xx/Include $(STM32LIBPATH)/CMSIS/include
endif
EXTRAINCDIRS += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/inc
EXTRAINCDIRS += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/inc targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/hid/inc
STM32USBPATH = $(THIRDPARTY)/STM32_USB-Host-Device_Lib_V2.1.0/Libraries
EXTRAINCDIRS += $(STM32USBPATH)/STM32_USB_OTG_Driver/inc $(STM32USBPATH)/STM32_USB_Device_Library/Core/inc
EXTRAINCDIRS += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/inc $(STM32USBPATH)/STM32_USB_Device_Library/Class/hid/inc
GUIGENERALSRC += gui/$(GUIDIRECTORY)/menu_general_hardware.cpp
BOARDSRC = main_arm.cpp targets/taranis/board_taranis.cpp
EXTRABOARDSRC += targets/taranis/configure_pins.cpp targets/taranis/lcd_driver.cpp targets/taranis/flash_driver.cpp targets/taranis/aspi.c targets/taranis/i2c.c targets/taranis/delays.c
SRC += CoOS/kernel/core.c CoOS/kernel/hook.c CoOS/kernel/task.c CoOS/kernel/event.c CoOS/kernel/time.c CoOS/kernel/timer.c CoOS/kernel/flag.c CoOS/kernel/mutex.c CoOS/kernel/serviceReq.c CoOS/portable/GCC/port.c CoOS/portable/arch.c
SRC += $(COOSDIR)/kernel/core.c $(COOSDIR)/kernel/hook.c $(COOSDIR)/kernel/task.c $(COOSDIR)/kernel/event.c $(COOSDIR)/kernel/time.c $(COOSDIR)/kernel/timer.c $(COOSDIR)/kernel/flag.c $(COOSDIR)/kernel/mutex.c $(COOSDIR)/kernel/serviceReq.c $(COOSDIR)/portable/GCC/port.c $(COOSDIR)/portable/arch.c
SRC += targets/taranis/pwr_driver.c targets/taranis/usb_driver.c
EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp eeprom_conversions.cpp
PULSESSRC = pulses/pulses_arm.cpp pulses/ppm_arm.cpp pulses/pxx_arm.cpp
@@ -868,37 +875,37 @@ ifeq ($(PCB), TARANIS)
CPPSRC += bmp.cpp gui/$(GUIDIRECTORY)/view_channels.cpp gui/$(GUIDIRECTORY)/view_about.cpp gui/$(GUIDIRECTORY)/view_text.cpp loadboot.cpp debug.cpp
ifeq ($(PCBREV), REV9E)
EXTRABOARDSRC += targets/taranis/top_lcd_driver.cpp
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/misc.c
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dbgmcu.c
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rtc.c
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_pwr.c
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.c
SRC += targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f40_41xxx.s
SRC += $(STM32LIBPATH)/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/misc.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dbgmcu.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rtc.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_pwr.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.c
SRC += $(STM32LIBPATH)/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f40_41xxx.s
else
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/misc.c
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_gpio.c
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_dbgmcu.c
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rcc.c
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_spi.c
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_dma.c
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rtc.c
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_pwr.c
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_usart.c
SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s
SRC += $(STM32LIBPATH)/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/misc.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_gpio.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_dbgmcu.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rcc.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_spi.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_dma.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rtc.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_pwr.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_usart.c
SRC += $(STM32LIBPATH)/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s
endif
SRC += targets/taranis/usb_bsp.c targets/taranis/usbd_desc.c
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_core.c
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_dcd.c
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_dcd_int.c
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/src/usbd_core.c
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/src/usbd_ioreq.c
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/src/usbd_req.c
SRC += $(STM32USBPATH)/STM32_USB_OTG_Driver/src/usb_core.c
SRC += $(STM32USBPATH)/STM32_USB_OTG_Driver/src/usb_dcd.c
SRC += $(STM32USBPATH)/STM32_USB_OTG_Driver/src/usb_dcd_int.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Core/src/usbd_core.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Core/src/usbd_ioreq.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Core/src/usbd_req.c
EXTRABOARDSRC += targets/taranis/usbd_usr.cpp
SRC += targets/sky9x/syscalls.c
ifeq ($(USB), JOYSTICK)
@@ -906,10 +913,10 @@ ifeq ($(PCB), TARANIS)
SRC += targets/taranis/usbd_hid_joystick.c
else
CPPDEFS += -DUSB_MASS_STORAGE
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_data.c
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c
SRC += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/src/usbd_msc_data.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c
EXTRABOARDSRC += targets/taranis/usbd_storage_msd.cpp
endif
ifeq ($(NANO), YES)
@@ -932,17 +939,17 @@ ifeq ($(PCB), TARANIS)
lua/src/lobject.c lua/src/lopcodes.c lua/src/lparser.c lua/src/lstate.c lua/src/lstring.c lua/src/ltable.c lua/src/lrotable.c lua/src/ltm.c lua/src/lundump.c lua/src/lvm.c lua/src/lzio.c \
lua/src/lbaselib.c lua/src/linit.c lua/src/lmathlib.c lua/src/lbitlib.c lua/src/loadlib.c lua/src/lauxlib.c lua/src/ltablib.c lua/src/lcorolib.c
SRC += $(LUASRC)
LUADEP = lua_exports.cpp
LUADEP = lua_exports.inc
ifeq ($(USE_BIN_ALLOCATOR), YES)
CPPDEFS += -DUSE_BIN_ALLOCATOR
CPPSRC += bin_allocator.cpp
endif
endif
EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c targets/taranis/diskio.cpp
EXTRABOARDSRC += $(FATFSDIR)/ff.c $(FATFSDIR)/fattime.c $(FATFSDIR)/option/ccsbcs.c targets/taranis/diskio.cpp
CPPSRC += sdcard.cpp logs.cpp rtc.cpp targets/taranis/rtc_driver.cpp
GUIGENERALSRC += gui/$(GUIDIRECTORY)/menu_general_sdmanager.cpp gui/$(GUIDIRECTORY)/menu_general_diagkeys.cpp gui/$(GUIDIRECTORY)/menu_general_diaganas.cpp
CPPDEFS += -DSDCARD -DVOICE -DRTCLOCK
INCDIRS += FatFs FatFs/option
INCDIRS += $(FATFSDIR) $(FATFSDIR)/option
ifeq ($(DSM2), PPM)
CPPSRC += pulses/dsm2_arm.cpp
endif
@@ -1372,12 +1379,11 @@ endif
# build bootloader
ifeq ($(PCB), $(filter $(PCB), TARANIS))
bootloader.lbm: bootloader/bootloader_ramBoot.bin
bootloader.lbm: targets/taranis/bootloader/bootloader_ramBoot.bin
$(BIN2LBM) $^ $@
.PHONY bootloader/bootloader_ramBoot.bin:
.PHONY targets/taranis/bootloader/bootloader_ramBoot.bin:
@echo "Building bootloader..."
$(MAKE) -C bootloader PCB=$(PCB) PCBREV=$(PCBREV) NANO=$(NANO)
$(MAKE) -C targets/taranis/bootloader PCB=$(PCB) PCBREV=$(PCBREV) NANO=$(NANO)
else ifeq ($(PCB), 9XRPRO)
bootloader.lbm:
@echo "Fetching Mike's bootloader..."
@@ -1508,11 +1514,11 @@ else
PARSER = gcc -E -x c++
endif
lua_exports.cpp: myeeprom.h ../util/luaexport.py
lua_exports.inc: myeeprom.h ../util/luaexport.py
@echo "Generating a list of Lua exported constants in lua_exports.txt"
@$(PARSER) -DPCBTARANIS -DCPUARM -DCPUSTM32 -DLUA -DEXPORT myeeprom.h | grep LEXP > lua_exports.txt
@echo "Parsing and generating C Lua exports in lua_exports.cpp"
@$(PYTHON) ../util/luaexport.py $(VERSION) lua_exports.txt lua_exports.cpp lua_fields.txt
@echo "Parsing and generating C Lua exports in lua_exports.inc"
@$(PYTHON) ../util/luaexport.py $(VERSION) lua_exports.txt lua_exports.inc lua_fields.txt
@rm lua_exports.txt
# Eye candy.
@@ -1563,7 +1569,7 @@ ifeq ($(SIMU_AUDIO), YES)
endif
ifeq ($(SIMU_DISKIO), YES)
CPPSRC += FatFs/ff.c FatFs/option/ccsbcs.c
CPPSRC += $(FATFSDIR)/ff.c $(FATFSDIR)/option/ccsbcs.c
SIMUDEFS += -DSIMU_DISKIO
endif
@@ -1674,8 +1680,8 @@ clean_list :
$(REMOVE) bitmaps/*/*/*.lbm
$(REMOVE) fonts/*.lbm
$(REMOVE) fonts/*/*.lbm
$(REMOVE) lua_exports.txt lua_exports.cpp lua_fields.txt
$(MAKE) -C bootloader clean
$(REMOVE) lua_exports.txt lua_exports.inc lua_fields.txt
$(MAKE) -C targets/taranis/bootloader clean
#### Install
-392
View File
@@ -1,392 +0,0 @@
#
# !!!! Do NOT edit this makefile with an editor which replace tabs by spaces !!!!
#
##############################################################################################
#
# On command line:
#
# make all = Create project
#
# make clean = Clean project files.
#
# To rebuild project do "make clean" and "make all".
#
##############################################################################################
# Start of default section
#
TRGT = arm-none-eabi-
CC = $(TRGT)gcc
CP = $(TRGT)objcopy
CLSS = $(TRGT)objdump
AS = $(TRGT)as
#gcc -x assembler-with-cpp
BIN = $(CP) -O ihex
BINX = $(CP) -O binary
OBJDIR = .
ifeq ($(PCBREV), REV9E)
MCU = cortex-m4
else
MCU = cortex-m3
endif
# List all default C defines here, like -D_DEBUG=1
DDEFS =
# List all default ASM defines here, like -D_DEBUG=1
DADEFS =
# List all default directories to look for include files here
DINCDIR =
# List the default directory to look for the libraries here
DLIBDIR =
# List all default libraries here
DLIBS =
MEMORIES = sram
EXT = STD
#
# End of default section
##############################################################################################
##############################################################################################
# Start of user section
#
#
# Define project name and Ram/Flash mode here
PROJECT = bootloader
ifeq ($(PCB), TARANIS)
RUN_FROM_FLASH = 0
else
ifeq ($(PCB), X9D)
RUN_FROM_FLASH = 0
else
RUN_FROM_FLASH = 1
endif
endif
# PCB revision
PCBREV =
EXTRAINCDIRS =
#
# Define linker script file here
#
ifeq ($(RUN_FROM_FLASH), 1)
ifeq ($(REVX), 1)
LDSCRIPT = sam3s8c_boot.ld
FULL_PRJ = $(PROJECT)_flash8
EXTRAINCDIRS += include
# EXTRAINCDIRS += ../
else
LDSCRIPT = sam3s4c_boot.ld
FULL_PRJ = $(PROJECT)_flash4
EXTRAINCDIRS += include
# EXTRAINCDIRS += ../
endif
TRGT = arm-none-eabi-
CPPDEFS += -DPCBSKY
UDEFS = -Dat91sam3s8
# If REVX board
ifeq ($(REVX), 1)
CPPDEFS += -DREVX
endif
CPPDEFS += -DREVB
else
ifeq ($(PCB), TARANIS)
ARCH = ARM
LDSCRIPT = ../targets/taranis/stm32_ramBoot.ld
TRGT = arm-none-eabi-
CPPDEFS += -DHSE_VALUE=12000000
CPPDEFS += -DPCBTARANIS
FULL_PRJ = $(PROJECT)_ramBoot
ifeq ($(PCBREV), REV9E)
CPPDEFS += -DSTM32F40_41xxx
EXTRAINCDIRS += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc
EXTRAINCDIRS += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include
EXTRAINCDIRS += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Include
else
EXTRAINCDIRS += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc
EXTRAINCDIRS += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include
EXTRAINCDIRS += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/include
endif
EXTRAINCDIRS += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc
EXTRAINCDIRS += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/inc
EXTRAINCDIRS += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/inc
EXTRAINCDIRS += ../targets/taranis
EXTRAINCDIRS += ../fonts/std
EXTRAINCDIRS += ../
ifeq ($(PCBREV), REV4a)
CPPDEFS += -DREV4a
else ifeq ($(PCBREV), REVPLUS)
CPPDEFS += -DREVPLUS
HAPTIC = YES
else ifeq ($(PCBREV), REV9E)
CPPDEFS += -DREVPLUS -DREV9E
HAPTIC = YES
else
CPPDEFS += -DREV4
endif
endif
endif
# List all user C define here, like -D_DEBUG=1
# Define ASM defines here
UADEFS =
SRC =
ifeq ($(PCB), TARANIS)
ifeq ($(PCBREV), REV9E)
SRC += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c
SRC += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
SRC += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c
SRC += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c
SRC += ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/src/misc.c
else
SRC += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c
SRC += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rcc.c
SRC += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_gpio.c
SRC += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_spi.c
SRC += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/misc.c
endif
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_core.c
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_dcd.c
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_dcd_int.c
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/src/usbd_core.c
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/src/usbd_ioreq.c
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/src/usbd_req.c
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_data.c
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c
SRC += ../targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c
SRC += ../targets/taranis/i2c.c ../targets/taranis/delays.c
SRC += ../FatFs/ff.c ../FatFs/option/ccsbcs.c
SRC += ../targets/taranis/usbd_desc.c
SRC += ../targets/taranis/aspi.c
SRC += ../targets/taranis/usb_bsp.c
SRC += ../targets/taranis/usb_driver.c
SRC += ../targets/taranis/pwr_driver.c
SRC += init.c
CPPSRC = ../targets/taranis/lcd_driver.cpp \
../targets/taranis/configure_pins.cpp \
../targets/taranis/keys_driver.cpp \
../targets/taranis/flash_driver.cpp \
../targets/taranis/diskio.cpp \
../targets/taranis/usbd_usr.cpp \
../targets/taranis/usbd_storage_msd.cpp \
../gui/Taranis/lcd.cpp \
../keys.cpp \
../fonts.cpp \
../strhelpers.cpp \
boot.cpp
ifeq ($(PCBREV), REV9E)
CPPSRC += ../targets/taranis/rotenc_driver.cpp
endif
# List ASM source files here
ifeq ($(PCBREV), REV9E)
ASRC = ../targets/taranis/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f40_41xxx.s
else
ASRC = ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s
endif
else
# List C source files here
SRC = core_cm3.c \
board_lowlevel.c \
crt.c \
usb/device/core/USBD_UDP.c usb/device/core/USBDDriver.c usb/device/core/USBDCallbacks.c \
usb/device/massstorage/MSDDriver.c usb/device/massstorage/MSDDStateMachine.c \
usb/device/massstorage/MSDLun.c usb/device/massstorage/MSDDriverDescriptors.c usb/device/massstorage/SBCMethods.c \
usb/common/core/USBEndpointDescriptor.c usb/common/core/USBGenericRequest.c \
usb/common/core/USBFeatureRequest.c usb/common/core/USBInterfaceRequest.c usb/common/core/USBGetDescriptorRequest.c \
usb/common/core/USBSetAddressRequest.c usb/common/core/USBSetConfigurationRequest.c \
usb/common/core/USBConfigurationDescriptor.c usb/common/core/USBGenericDescriptor.c \
MEDSdcard.c \
vectors_sam3s.c
CPPSRC = lcdboot.cpp \
ff.cpp \
diskio.cpp \
driversboot.cpp \
logicioboot.cpp \
sdcard_driver.cpp \
massstorage.cpp \
bootsamEeprom.cpp \
ff_lfn.cpp \
power.cpp \
boot.cpp
# List ASM source files here
ASRC =
endif
# List all user directories here
UINCDIR = ./inc
# \
# ./cmsis/core \
# ./cmsis/device
# List the user directory to look for the libraries here
ULIBDIR =
# List all user libraries here
ULIBS =
# Define optimisation level here
OPT = -Os
#
# End of user defines
##############################################################################################
VPATH = $(DIRS)
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
ifeq ($(RUN_FROM_FLASH), 0)
DEFS = $(DDEFS) $(UDEFS) -DRUN_FROM_FLASH=0
else
DEFS = $(DDEFS) $(UDEFS) -DRUN_FROM_FLASH=1
endif
ADEFS = $(DADEFS) $(UADEFS)
AXOBJS = $(ASRC:%.s=%.o)
CXOBJS = $(SRC:%.c=%.o)
CPPXOBJS = $(CPPSRC:%.cpp=%.o)
LIBS = $(DLIBS) $(ULIBS)
MCFLAGS = -mcpu=$(MCU)
ifeq ($(NANO), YES)
# use newlib-nano for linking
# NEWLIB_NANO_FLAGS = --specs=nano.specs -u _printf_float #use this version if printf for floats is needed!
NEWLIB_NANO_FLAGS = --specs=nano.specs
endif
#ASFLAGS = $(MCFLAGS) -g -gdwarf-2 -Wa,-amhls=$(OBJDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
CPFLAGS = $(MCFLAGS) $(OPT) -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm $(DEFS)
LDFLAGS = $(MCFLAGS) -mthumb -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(FULL_PRJ).map,--cref,--no-warn-mismatch $(LIBDIR) $(NEWLIB_NANO_FLAGS)
CPPFLAGS = $(MCFLAGS) $(OPT) -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm $(DEFS)
CPPFLAGS += $(CPPDEFS)
CPFLAGS += $(CPPDEFS)
CPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
AOBJS = $(patsubst %,$(OBJDIR)/%,$(notdir $(AXOBJS) ))
COBJS = $(patsubst %,$(OBJDIR)/%,$(notdir $(CXOBJS) ))
CPPOBJS = $(patsubst %,$(OBJDIR)/%,$(notdir $(CPPXOBJS) ))
DIRS = $(sort $(dir $(AXOBJS) $(CXOBJS) $(CPPXOBJS) ) )
CPPDEFS += -DCPUARM
ifeq ($(PCB), TARANIS)
CPPDEFS += -DCPUSTM32
endif
CPPDEFS += -DTIMERS=0
# If serial Debug required
ifeq ($(DEBUG), 1)
CPPDEFS += -DDEBUG
endif
CPPDEFS += -DBOOT
# Generate dependency information
CPFLAGS += -MD -MP -MF .dep/$(@F).d
CPPFLAGS += -MD -MP -MF .dep/$(@F).d
CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
#
# makefile rules
#
all: size_before $(OBJS) $(COBJS) $(CPPOBJS) $(FULL_PRJ).elf $(FULL_PRJ).hex $(FULL_PRJ).lss $(FULL_PRJ).bin size
#begin:
# @echo $(AXOBJS) $(CXOBJS) $(CPPXOBJS)
# @echo
# @echo $(OBJS) $(COBJS) $(CPPOBJS)
# @echo
# @echo $(DIRS)
size_before:
# arm-none-eabi-size $(FULL_PRJ).elf
@if test -f $(FULL_PRJ).elf; then arm-none-eabi-size $(FULL_PRJ).elf; fi
size:
# arm-none-eabi-size $(FULL_PRJ).elf
@if test -f $(FULL_PRJ).elf; then arm-none-eabi-size $(FULL_PRJ).elf; fi
$(CPPOBJS) : $(OBJDIR)/%.o : %.cpp
$(CC) -c $(CPPFLAGS) -fno-exceptions -I . $(INCDIR) $< -o $@
$(COBJS) : $(OBJDIR)/%.o : %.c
$(CC) -c $(CPFLAGS) -I . $(INCDIR) $< -o $@
$(AOBJS) : $(OBJDIR)/%.o : %.s
$(AS) -c $(ASFLAGS) $< -o $@
%elf: $(AOBJS) $(COBJS) $(CPPOBJS)
$(CC) $(AOBJS) $(COBJS) $(CPPOBJS) $(LDFLAGS) $(LIBS) -o $@
# Create extended listing file from ELF output file.
%.lss: %.elf
$(CLSS) -h -S $< > $@
%hex: %elf
$(BIN) $< $@
%bin: %elf
$(BINX) $< $@
# $(PROJECT)_flash8
# $(PROJECT)_flash4
# $(PROJECT)_ramBootS
# $(PROJECT)_ramBootT
clean:
-rm -f *.o
-rm -f *.elf
-rm -f *.map
-rm -f *.hex
-rm -f *.bin
-rm -f *.lss
-rm -fR .dep
#
# Include the dependency files, should be the last of the makefile
#
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
# *** EOF ***
+4 -1
View File
@@ -34,9 +34,12 @@
*
*/
#include "opentx.h"
extern "C" {
#include <stdio.h>
#include <stdarg.h>
}
#include "opentx.h"
#if (defined(DEBUG) && defined(CPUARM)) || defined(SIMU)
+2 -2
View File
@@ -34,8 +34,8 @@
*
*/
#include "opentx.h"
#include "timers.h"
#include "../../opentx.h"
#include "../../timers.h"
#if defined(REVPLUS) && defined(LCD_DUAL_BUFFER)
display_t displayBuf1[DISPLAY_BUF_SIZE];
+1 -1
View File
@@ -144,7 +144,7 @@ void menuCommonCalib(uint8_t event)
for (int j=0; j<count; j++) {
for (int k=j+1; k<count; k++) {
if (reusableBuffer.calib.xpotsCalib[idx].steps[k] < reusableBuffer.calib.xpotsCalib[idx].steps[j]) {
swap(reusableBuffer.calib.xpotsCalib[idx].steps[j], reusableBuffer.calib.xpotsCalib[idx].steps[k]);
SWAP(reusableBuffer.calib.xpotsCalib[idx].steps[j], reusableBuffer.calib.xpotsCalib[idx].steps[k]);
}
}
}
+1 -1
View File
@@ -52,7 +52,7 @@ extern "C" {
}
#endif
#include "lua_exports.cpp" // this line must be after lua headers
#include "lua_exports.inc" // this line must be after lua headers
#define lua_registernumber(L, n, i) (lua_pushnumber(L, (i)), lua_setglobal(L, (n)))
#define lua_registerint(L, n, i) (lua_pushinteger(L, (i)), lua_setglobal(L, (n)))
+1 -3
View File
@@ -1010,9 +1010,7 @@ template<class t> FORCEINLINE t min(t a, t b) { return a<b?a:b; }
template<class t> FORCEINLINE t max(t a, t b) { return a>b?a:b; }
template<class t> FORCEINLINE t sgn(t a) { return a>0 ? 1 : (a < 0 ? -1 : 0); }
template<class t> FORCEINLINE t limit(t mi, t x, t ma) { return min(max(mi,x),ma); }
#if !defined(SWAP_DEFINED)
template<class t> void swap(t & a, t & b) { t tmp = b; b = a; a = tmp; }
#endif
template<class t> void SWAP(t & a, t & b) { t tmp = b; b = a; a = tmp; }
uint16_t isqrt32(uint32_t n);
+2 -3
View File
@@ -35,9 +35,8 @@
*/
#include <stdint.h>
#include "../../FatFs/diskio.h"
#include "../../FatFs/ff.h"
#include "FatFs/diskio.h"
#include "FatFs/ff.h"
#define LIST_NONE_SD_FILE 1
+5 -2
View File
@@ -337,6 +337,8 @@ extern void rxPdcUsart( void (*pChProcess)(uint8_t x) );
#define WGM10 0
#define WGM12 0
#define COM1B1 0
#define FOC1B 0
#define CS10 0
#define DOR0 0
#define UPE0 0
@@ -434,9 +436,10 @@ inline void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct) {
#define configure_pins(...)
extern "C" {
#if defined(SDCARD)
extern char simuSdDirectory[1024];
}
#endif
#define sdMountPoll()
#define sdPoll10ms()
#define sd_card_ready() (true)
+335
View File
@@ -0,0 +1,335 @@
#
# !!!! Do NOT edit this makefile with an editor which replace tabs by spaces !!!!
#
##############################################################################################
#
# On command line:
#
# make all = Create project
#
# make clean = Clean project files.
#
# To rebuild project do "make clean" and "make all".
#
##############################################################################################
# Start of default section
#
TRGT = arm-none-eabi-
CC = $(TRGT)gcc
CP = $(TRGT)objcopy
CLSS = $(TRGT)objdump
AS = $(TRGT)as
#gcc -x assembler-with-cpp
BIN = $(CP) -O ihex
BINX = $(CP) -O binary
OBJDIR = .
THIRDPARTY = ../../../thirdparty
ifeq ($(PCBREV), REV9E)
MCU = cortex-m4
STM32LIBPATH = $(THIRDPARTY)/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries
else
MCU = cortex-m3
STM32LIBPATH = $(THIRDPARTY)/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries
endif
# List all default C defines here, like -D_DEBUG=1
DDEFS =
# List all default ASM defines here, like -D_DEBUG=1
DADEFS =
# List all default directories to look for include files here
DINCDIR =
# List the default directory to look for the libraries here
DLIBDIR =
# List all default libraries here
DLIBS =
MEMORIES = sram
EXT = STD
#
# End of default section
##############################################################################################
##############################################################################################
# Start of user section
#
#
# Define project name and Ram/Flash mode here
PROJECT = bootloader
ifeq ($(PCB), TARANIS)
RUN_FROM_FLASH = 0
else
ifeq ($(PCB), X9D)
RUN_FROM_FLASH = 0
else
RUN_FROM_FLASH = 1
endif
endif
# PCB revision
PCBREV =
EXTRAINCDIRS = $(THIRDPARTY)
STM32USBPATH = ../../../thirdparty/STM32_USB-Host-Device_Lib_V2.1.0/Libraries
#
# Define linker script file here
#
ifeq ($(PCB), TARANIS)
ARCH = ARM
LDSCRIPT = ../stm32_ramBoot.ld
TRGT = arm-none-eabi-
CPPDEFS += -DHSE_VALUE=12000000
CPPDEFS += -DPCBTARANIS
FULL_PRJ = $(PROJECT)_ramBoot
ifeq ($(PCBREV), REV9E)
CPPDEFS += -DSTM32F40_41xxx
EXTRAINCDIRS += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/inc
EXTRAINCDIRS += $(STM32LIBPATH)/CMSIS/Device/ST/STM32F4xx/Include
EXTRAINCDIRS += $(STM32LIBPATH)/CMSIS/Include
else
EXTRAINCDIRS += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/inc
EXTRAINCDIRS += $(STM32LIBPATH)/CMSIS/Device/ST/STM32F2xx/Include
EXTRAINCDIRS += $(STM32LIBPATH)/CMSIS/include
endif
EXTRAINCDIRS += $(STM32USBPATH)/STM32_USB_OTG_Driver/inc
EXTRAINCDIRS += $(STM32USBPATH)/STM32_USB_Device_Library/Core/inc
EXTRAINCDIRS += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/inc
EXTRAINCDIRS += .. ../../.. ../../../fonts/std
ifeq ($(PCBREV), REV4a)
CPPDEFS += -DREV4a
else ifeq ($(PCBREV), REVPLUS)
CPPDEFS += -DREVPLUS
HAPTIC = YES
else ifeq ($(PCBREV), REV9E)
CPPDEFS += -DREVPLUS -DREV9E
HAPTIC = YES
else
CPPDEFS += -DREV4
endif
endif
# List all user C define here, like -D_DEBUG=1
# Define ASM defines here
UADEFS =
SRC =
ifeq ($(PCBREV), REV9E)
SRC += $(STM32LIBPATH)/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c
SRC += $(STM32LIBPATH)/STM32F4xx_StdPeriph_Driver/src/misc.c
else
SRC += $(STM32LIBPATH)/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rcc.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_gpio.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_spi.c
SRC += $(STM32LIBPATH)/STM32F2xx_StdPeriph_Driver/src/misc.c
endif
SRC += $(STM32USBPATH)/STM32_USB_OTG_Driver/src/usb_core.c
SRC += $(STM32USBPATH)/STM32_USB_OTG_Driver/src/usb_dcd.c
SRC += $(STM32USBPATH)/STM32_USB_OTG_Driver/src/usb_dcd_int.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Core/src/usbd_core.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Core/src/usbd_ioreq.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Core/src/usbd_req.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/src/usbd_msc_data.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c
SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c
SRC += ../i2c.c ../delays.c
SRC += $(THIRDPARTY)/FatFs/ff.c $(THIRDPARTY)/FatFs/option/ccsbcs.c
SRC += ../usbd_desc.c
SRC += ../aspi.c
SRC += ../usb_bsp.c
SRC += ../usb_driver.c
SRC += ../pwr_driver.c
SRC += init.c
CPPSRC = ../lcd_driver.cpp \
../configure_pins.cpp \
../keys_driver.cpp \
../flash_driver.cpp \
../diskio.cpp \
../usbd_usr.cpp \
../usbd_storage_msd.cpp \
../../../gui/Taranis/lcd.cpp \
../../../keys.cpp \
../../../fonts.cpp \
../../../strhelpers.cpp \
boot.cpp
ifeq ($(PCBREV), REV9E)
CPPSRC += ../rotenc_driver.cpp
endif
# List ASM source files here
ifeq ($(PCBREV), REV9E)
ASRC = $(STM32LIBPATH)/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f40_41xxx.s
else
ASRC = $(STM32LIBPATH)/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s
endif
# List all user directories here
UINCDIR = ./inc
# \
# ./cmsis/core \
# ./cmsis/device
# List the user directory to look for the libraries here
ULIBDIR =
# List all user libraries here
ULIBS =
# Define optimisation level here
OPT = -Os
#
# End of user defines
##############################################################################################
VPATH = $(DIRS)
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
ifeq ($(RUN_FROM_FLASH), 0)
DEFS = $(DDEFS) $(UDEFS) -DRUN_FROM_FLASH=0
else
DEFS = $(DDEFS) $(UDEFS) -DRUN_FROM_FLASH=1
endif
ADEFS = $(DADEFS) $(UADEFS)
AXOBJS = $(ASRC:%.s=%.o)
CXOBJS = $(SRC:%.c=%.o)
CPPXOBJS = $(CPPSRC:%.cpp=%.o)
LIBS = $(DLIBS) $(ULIBS)
MCFLAGS = -mcpu=$(MCU)
ifeq ($(NANO), YES)
# use newlib-nano for linking
# NEWLIB_NANO_FLAGS = --specs=nano.specs -u _printf_float #use this version if printf for floats is needed!
NEWLIB_NANO_FLAGS = --specs=nano.specs
endif
#ASFLAGS = $(MCFLAGS) -g -gdwarf-2 -Wa,-amhls=$(OBJDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
CPFLAGS = $(MCFLAGS) $(OPT) -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm $(DEFS)
LDFLAGS = $(MCFLAGS) -mthumb -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(FULL_PRJ).map,--cref,--no-warn-mismatch $(LIBDIR) $(NEWLIB_NANO_FLAGS)
CPPFLAGS = $(MCFLAGS) $(OPT) -gdwarf-2 -mthumb -fomit-frame-pointer -Wall -fverbose-asm $(DEFS)
CPPFLAGS += $(CPPDEFS)
CPFLAGS += $(CPPDEFS)
CPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
AOBJS = $(patsubst %,$(OBJDIR)/%,$(notdir $(AXOBJS) ))
COBJS = $(patsubst %,$(OBJDIR)/%,$(notdir $(CXOBJS) ))
CPPOBJS = $(patsubst %,$(OBJDIR)/%,$(notdir $(CPPXOBJS) ))
DIRS = $(sort $(dir $(AXOBJS) $(CXOBJS) $(CPPXOBJS) ) )
CPPDEFS += -DCPUARM
ifeq ($(PCB), TARANIS)
CPPDEFS += -DCPUSTM32
endif
CPPDEFS += -DTIMERS=0
# If serial Debug required
ifeq ($(DEBUG), 1)
CPPDEFS += -DDEBUG
endif
CPPDEFS += -DBOOT
# Generate dependency information
CPFLAGS += -MD -MP -MF .dep/$(@F).d
CPPFLAGS += -MD -MP -MF .dep/$(@F).d
CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
#
# makefile rules
#
all: size_before $(OBJS) $(COBJS) $(CPPOBJS) $(FULL_PRJ).elf $(FULL_PRJ).hex $(FULL_PRJ).lss $(FULL_PRJ).bin size
#begin:
# @echo $(AXOBJS) $(CXOBJS) $(CPPXOBJS)
# @echo
# @echo $(OBJS) $(COBJS) $(CPPOBJS)
# @echo
# @echo $(DIRS)
size_before:
# arm-none-eabi-size $(FULL_PRJ).elf
@if test -f $(FULL_PRJ).elf; then arm-none-eabi-size $(FULL_PRJ).elf; fi
size:
# arm-none-eabi-size $(FULL_PRJ).elf
@if test -f $(FULL_PRJ).elf; then arm-none-eabi-size $(FULL_PRJ).elf; fi
$(CPPOBJS) : $(OBJDIR)/%.o : %.cpp
$(CC) -c $(CPPFLAGS) -fno-exceptions -I . $(INCDIR) $< -o $@
$(COBJS) : $(OBJDIR)/%.o : %.c
$(CC) -c $(CPFLAGS) -I . $(INCDIR) $< -o $@
$(AOBJS) : $(OBJDIR)/%.o : %.s
$(AS) -c $(ASFLAGS) $< -o $@
%elf: $(AOBJS) $(COBJS) $(CPPOBJS)
$(CC) $(AOBJS) $(COBJS) $(CPPOBJS) $(LDFLAGS) $(LIBS) -o $@
# Create extended listing file from ELF output file.
%.lss: %.elf
$(CLSS) -h -S $< > $@
%hex: %elf
$(BIN) $< $@
%bin: %elf
$(BINX) $< $@
# $(PROJECT)_flash8
# $(PROJECT)_flash4
# $(PROJECT)_ramBootS
# $(PROJECT)_ramBootT
clean:
-rm -f *.o
-rm -f *.elf
-rm -f *.map
-rm -f *.hex
-rm -f *.bin
-rm -f *.lss
-rm -fR .dep
#
# Include the dependency files, should be the last of the makefile
#
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
# *** EOF ***
+9 -9
View File
@@ -54,15 +54,15 @@
#include <string.h>
#include "board_taranis.h"
#include "../eeprom_rlc.h"
#include "../pwr.h"
#include "../gui/Taranis/lcd.h"
#include "../keys.h"
#include "../sdcard.h"
#include "../FatFs/ff.h"
#include "../FatFs/diskio.h"
#include "../translations/en.h"
#include "../stamp-opentx.h"
#include "eeprom_rlc.h"
#include "pwr.h"
#include "gui/Taranis/lcd.h"
#include "keys.h"
#include "sdcard.h"
#include "FatFs/ff.h"
#include "FatFs/diskio.h"
#include "translations/en.h"
#include "stamp-opentx.h"
#if defined(PCBTARANIS)
#define BOOTLOADER_TITLE " Taranis BootLoader - " VERS_STR
+4 -4
View File
@@ -36,11 +36,11 @@
#include <string.h>
#include "board_taranis.h"
#include "../../FatFs/diskio.h"
#include "../../FatFs/ff.h"
#include "../../CoOS/kernel/CoOS.h"
#include "../../thirdparty/FatFs/diskio.h"
#include "../../thirdparty/FatFs/ff.h"
#include "../../thirdparty/CoOS/kernel/CoOS.h"
#include "hal.h"
#include "debug.h"
#include "../../debug.h"
/* Definitions for MMC/SDC command */
#define CMD0 (0x40+0) /* GO_IDLE_STATE */
@@ -27,7 +27,7 @@
/* Includes ------------------------------------------------------------------*/
#include "../../opentx.h"
#include "../../FatFs/diskio.h"
#include "../../thirdparty/FatFs/diskio.h"
#include "board_taranis.h"
#if defined(__cplusplus) && !defined(SIMU)

Some files were not shown because too many files have changed in this diff Show More