summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-06-24 21:52:51 +0700
committerhathach <[email protected]>2022-06-24 21:52:51 +0700
commit835ab01cab9ebe20eac46da1853eb158e1248f01 (patch)
treecd53167175098ef928dc1cd9c9e048d80604a4a2
parent4f6e770eda9f8c605b238f35def1edaff93a8fb8 (diff)
fix stm32 g4 and wb build issue with freertos, also add them to ci build
-rw-r--r--.github/workflows/build_arm.yml2
-rw-r--r--hw/bsp/board_mcu.h8
-rw-r--r--hw/bsp/stm32g4/family.c4
-rw-r--r--hw/bsp/stm32wb/family.c3
4 files changed, 14 insertions, 3 deletions
diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml
index 5a796a49b..6e4702735 100644
--- a/.github/workflows/build_arm.yml
+++ b/.github/workflows/build_arm.yml
@@ -57,8 +57,10 @@ jobs:
- 'stm32f1'
- 'stm32f4'
- 'stm32f7'
+ - 'stm32g4'
- 'stm32h7'
- 'stm32l4'
+ - 'stm32wb'
- 'tm4c123'
- 'xmc4000'
steps:
diff --git a/hw/bsp/board_mcu.h b/hw/bsp/board_mcu.h
index b911e1e53..8202479cb 100644
--- a/hw/bsp/board_mcu.h
+++ b/hw/bsp/board_mcu.h
@@ -31,7 +31,7 @@
#include "tusb_option.h"
//--------------------------------------------------------------------+
-// Low Level MCU header include. TinyUSB stack and example should be
+// Low Level MCU header include. Example should be
// platform independent and mostly doesn't need to include this file.
// However there are still certain situation where this file is needed:
// - FreeRTOSConfig.h to set up correct clock and NVIC interrupts for ARM Cortex
@@ -80,6 +80,9 @@
#elif CFG_TUSB_MCU == OPT_MCU_STM32F7
#include "stm32f7xx.h"
+#elif CFG_TUSB_MCU == OPT_MCU_STM32G4
+ #include "stm32g4xx.h"
+
#elif CFG_TUSB_MCU == OPT_MCU_STM32H7
#include "stm32h7xx.h"
@@ -92,6 +95,9 @@
#elif CFG_TUSB_MCU == OPT_MCU_STM32L4
#include "stm32l4xx.h"
+#elif CFG_TUSB_MCU == OPT_MCU_STM32WB
+ #include "stm32wbxx.h"
+
#elif CFG_TUSB_MCU == OPT_MCU_CXD56
// no header needed
diff --git a/hw/bsp/stm32g4/family.c b/hw/bsp/stm32g4/family.c
index 461dc61a1..a2312b0d8 100644
--- a/hw/bsp/stm32g4/family.c
+++ b/hw/bsp/stm32g4/family.c
@@ -73,7 +73,9 @@ void board_init(void)
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
- NVIC_SetPriority(OTG_FS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
+ NVIC_SetPriority(USB_HP_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
+ NVIC_SetPriority(USB_LP_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
+ NVIC_SetPriority(USBWakeUp_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
#endif
GPIO_InitTypeDef GPIO_InitStruct;
diff --git a/hw/bsp/stm32wb/family.c b/hw/bsp/stm32wb/family.c
index 1ed38308b..9f1f46f4d 100644
--- a/hw/bsp/stm32wb/family.c
+++ b/hw/bsp/stm32wb/family.c
@@ -67,7 +67,8 @@ void board_init(void)
SysTick->CTRL &= ~1U;
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
- NVIC_SetPriority(OTG_FS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
+ NVIC_SetPriority(USB_HP_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
+ NVIC_SetPriority(USB_LP_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
#endif
GPIO_InitTypeDef GPIO_InitStruct;