Skip to content

Commit

Permalink
got rid of startup and drivers folders by taking their content from s…
Browse files Browse the repository at this point in the history
…ubmodules
  • Loading branch information
zukaitis committed Apr 4, 2020
1 parent df2b040 commit 9c73e32
Show file tree
Hide file tree
Showing 74 changed files with 110 additions and 86,642 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Firmware/drivers/* linguist-vendored
Firmware/middlewares/* linguist-vendored
Firmware/startup/* linguist-vendored
Firmware/submodules/* linguist-vendored
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@
[submodule "Firmware/submodules/semver-tool"]
path = Firmware/submodules/semver-tool
url = https://github.com/fsaintjacques/semver-tool.git
[submodule "Firmware/submodules/cmsis_core"]
path = Firmware/submodules/cmsis_core
url = https://github.com/STMicroelectronics/cmsis_core.git
[submodule "Firmware/submodules/cmsis_device_f4"]
path = Firmware/submodules/cmsis_device_f4
url = https://github.com/STMicroelectronics/cmsis_device_f4.git
[submodule "Firmware/submodules/stm32f4xx_hal_driver"]
path = Firmware/submodules/stm32f4xx_hal_driver
url = https://github.com/STMicroelectronics/stm32f4xx_hal_driver.git
139 changes: 71 additions & 68 deletions Firmware/build.ninja
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ c_flags = --target=arm-none-eabi -O0 -ggdb3 -ffunction-sections $
-fdata-sections -fdiagnostics-color=always
cxx_flags = -fno-rtti -fno-strict-aliasing -std=c++11 $
-DCPP_FREERTOS_NO_EXCEPTIONS -DCPP_FREERTOS_NO_CPP_STRINGS
inc_flags = -Idrivers/CMSIS/Device/ST/STM32F4xx/Include $
-Idrivers/CMSIS/Include -Idrivers/STM32F4xx_HAL_Driver/Inc $
-Idrivers/STM32F4xx_HAL_Driver/Inc/Legacy $
inc_flags = -Isubmodules/cmsis_device_f4/Include $
-Isubmodules/cmsis_core/Include -Isubmodules/stm32f4xx_hal_driver/Inc $
-Isubmodules/stm32f4xx_hal_driver/Inc/Legacy $
-Imiddlewares/ST/STM32_USB_Device_Library/Core/Inc $
-Imiddlewares/USBMIDI/Inc -Isrc -Isrc/configs -Isrc/lcd/84x48_mono $
-Isubmodules/etl/include $
Expand Down Expand Up @@ -94,51 +94,53 @@ rule compdb
description = Generating $out file

# Instructions to build each file
build output/startup/startup_stm32f411xe.o: as startup/startup_stm32f411xe.S
build $
output/submodules/cmsis_device_f4/Source/Templates/gcc/startup_stm32f411xe.o: $
as submodules/cmsis_device_f4/Source/Templates/gcc/startup_stm32f411xe.s

build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc_ex.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc_ex.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_adc.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_adc.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_adc_ex.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_adc_ex.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_cortex.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_cortex.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_dma.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_dma.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_dma_ex.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_dma_ex.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_flash.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_flash.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_flash_ex.o: $
cc submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_flash_ex.c
build $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o: $
cc drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c
build output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.o: cc $
drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.c
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_flash_ramfunc.o: $
cc submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_flash_ramfunc.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_gpio.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_gpio.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pcd.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pcd.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pcd_ex.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pcd_ex.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pwr.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pwr.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pwr_ex.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pwr_ex.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_rcc.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_rcc.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_rcc_ex.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_rcc_ex.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_spi.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_spi.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_tim.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_tim.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_tim_ex.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_tim_ex.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_uart.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_uart.c
build output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_ll_usb.o: cc $
submodules/stm32f4xx_hal_driver/Src/stm32f4xx_ll_usb.c
build output/middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.o: $
cc middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c
build $
Expand Down Expand Up @@ -227,28 +229,29 @@ build output/submodules/freertos-addons/c++/Source/cmutex.o: cxx $
submodules/freertos-addons/c++/Source/cmutex.cpp

# Target linker instruction
build $target: link output/startup/startup_stm32f411xe.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc_ex.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o $
output/drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.o $
build $target: link $
output/submodules/cmsis_device_f4/Source/Templates/gcc/startup_stm32f411xe.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_adc.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_adc_ex.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_cortex.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_dma.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_dma_ex.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_flash.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_flash_ex.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_flash_ramfunc.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_gpio.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pcd.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pcd_ex.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pwr.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pwr_ex.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_rcc.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_rcc_ex.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_spi.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_tim.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_tim_ex.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_uart.o $
output/submodules/stm32f4xx_hal_driver/Src/stm32f4xx_ll_usb.o $
output/middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.o $
output/middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.o $
output/middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.o $
Expand Down
52 changes: 26 additions & 26 deletions Firmware/build_settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ additional_outputs:
- output/midi-grid.dfu

include_directories:
- drivers/CMSIS/Device/ST/STM32F4xx/Include
- drivers/CMSIS/Include
- drivers/STM32F4xx_HAL_Driver/Inc
- drivers/STM32F4xx_HAL_Driver/Inc/Legacy
- submodules/cmsis_device_f4/Include
- submodules/cmsis_core/Include
- submodules/stm32f4xx_hal_driver/Inc
- submodules/stm32f4xx_hal_driver/Inc/Legacy
- middlewares/ST/STM32_USB_Device_Library/Core/Inc
- middlewares/USBMIDI/Inc
- src
Expand All @@ -27,27 +27,27 @@ include_directories:
- /opt/gcc-arm-none-eabi-9-2019-q4-major/arm-none-eabi/include/c++/9.2.1/arm-none-eabi

c_source_files:
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc_ex.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c
- drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_adc.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_adc_ex.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_cortex.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_dma.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_dma_ex.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_flash.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_flash_ex.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_flash_ramfunc.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_gpio.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pcd.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pcd_ex.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pwr.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_pwr_ex.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_rcc.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_rcc_ex.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_spi.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_tim.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_tim_ex.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_hal_uart.c
- submodules/stm32f4xx_hal_driver/Src/stm32f4xx_ll_usb.c
- middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c
- middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c
- middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c
Expand Down Expand Up @@ -105,7 +105,7 @@ cxx_source_files:
- submodules/freertos-addons/c++/Source/cmutex.cpp

asm_source_files:
- startup/startup_stm32f411xe.S
- submodules/cmsis_device_f4/Source/Templates/gcc/startup_stm32f411xe.s

linker_script: STM32F411RCTx_FLASH.ld
c_compiler: clang-9
Expand Down
Loading

0 comments on commit 9c73e32

Please sign in to comment.