Skip to content

Commit 25bace5

Browse files
committed
add cmake for all board in stm32f4. fix build, also move ci for f4 from makefile to cmake
1 parent 81aca17 commit 25bace5

File tree

17 files changed

+188
-118
lines changed

17 files changed

+188
-118
lines changed

.github/workflows/build_arm.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ jobs:
4343
- 'samd51 same5x'
4444
- 'saml2x'
4545
- 'stm32f2 stm32f3'
46-
- 'stm32f4'
4746
- 'stm32l0 stm32u5 stm32wb'
4847
- 'tm4c123 xmc4000'
4948
steps:

.github/workflows/cmake_arm.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
- 'rp2040'
4343
- 'stm32f0'
4444
- 'stm32f1'
45+
- 'stm32f4'
4546
- 'stm32f7'
4647
- 'stm32g0'
4748
- 'stm32g4'

.idea/cmake.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hw/bsp/stm32f4/FreeRTOSConfig/FreeRTOSConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
#define configUSE_MUTEXES 1
6767
#define configUSE_RECURSIVE_MUTEXES 1
6868
#define configUSE_COUNTING_SEMAPHORES 1
69-
#define configQUEUE_REGISTRY_SIZE 2
69+
#define configQUEUE_REGISTRY_SIZE 4
7070
#define configUSE_QUEUE_SETS 0
7171
#define configUSE_TIME_SLICING 0
7272
#define configUSE_NEWLIB_REENTRANT 0
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
set(MCU_VARIANT stm32f405xx)
2+
set(JLINK_DEVICE stm32f405rg)
3+
4+
set(LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR}/STM32F405RGTx_FLASH.ld)
5+
6+
function(update_board TARGET)
7+
target_compile_definitions(${TARGET} PUBLIC
8+
STM32F405xx
9+
)
10+
endfunction()
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
set(MCU_VARIANT stm32f405xx)
2+
set(JLINK_DEVICE stm32f405rg)
3+
4+
set(LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR}/STM32F405RGTx_FLASH.ld)
5+
6+
function(update_board TARGET)
7+
target_compile_definitions(${TARGET} PUBLIC
8+
STM32F405xx
9+
)
10+
endfunction()
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
set(MCU_VARIANT stm32f401xc)
2+
set(JLINK_DEVICE stm32f401cc)
3+
4+
set(LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR}/STM32F401VCTx_FLASH.ld)
5+
6+
function(update_board TARGET)
7+
target_compile_definitions(${TARGET} PUBLIC
8+
STM32F405xx
9+
)
10+
endfunction()

hw/bsp/stm32f4/boards/stm32f407blackvet/board.cmake

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@ set(MCU_VARIANT stm32f407xx)
22
set(JLINK_DEVICE stm32f407ve)
33

44
set(LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR}/STM32F407VETx_FLASH.ld)
5-
set(LD_FILE_IAR ${ST_CMSIS}/Source/Templates/iar/linker/${MCU_VARIANT}_flash.icf)
6-
7-
set(STARTUP_FILE_GNU ${ST_CMSIS}/Source/Templates/gcc/startup_${MCU_VARIANT}.s)
8-
set(STARTUP_FILE_IAR ${ST_CMSIS}/Source/Templates/iar/startup_${MCU_VARIANT}.s)
95

106
function(update_board TARGET)
117
target_compile_definitions(${TARGET} PUBLIC
128
STM32F407xx
139
HSE_VALUE=8000000
14-
CORE_CM4
15-
BOARD_TUD_RHPORT=0
16-
BOARD_TUD_MAX_SPEED=OPT_MODE_FULL_SPEED
10+
BOARD_TUD_RHPORT=0
11+
BOARD_TUD_MAX_SPEED=OPT_MODE_FULL_SPEED
1712
)
1813
endfunction()
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
set(MCU_VARIANT stm32f407xx)
2+
set(JLINK_DEVICE stm32f407vg)
3+
4+
set(LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR}/STM32F407VGTx_FLASH.ld)
5+
6+
function(update_board TARGET)
7+
target_compile_definitions(${TARGET} PUBLIC
8+
STM32F407xx
9+
)
10+
endfunction()

0 commit comments

Comments
 (0)