You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2024/04/24 05:57:31 UTC
(mynewt-core) 01/02: hw/mcu/stm32wb: Use common startup code
This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit eb62c046c542aefec3b78fb8cf0ffb4def10b568
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Apr 16 15:38:56 2024 +0200
hw/mcu/stm32wb: Use common startup code
STM32WB now uses common startup code for Cortex-M4 and
autogenerated linker script.
Flash cache initialization moved to hal_system_init.c to
make system_stm32wbxx.c more like original ST file
so future updates will be easier.
Signed-off-by: Jerzy Kasenberg <je...@codecoup.pl>
---
hw/mcu/stm/stm32wbxx/include/mcu/mcu_vectors.h | 38 ++++
.../include/mcu/vectors/stm32wb10xx_cm4_vectors.h | 98 ++++++++++
.../include/mcu/vectors/stm32wb15xx_cm4_vectors.h | 98 ++++++++++
.../include/mcu/vectors/stm32wb1mxx_cm4_vectors.h | 98 ++++++++++
.../include/mcu/vectors/stm32wb30xx_cm4_vectors.h | 98 ++++++++++
.../include/mcu/vectors/stm32wb35xx_cm4_vectors.h | 98 ++++++++++
.../include/mcu/vectors/stm32wb50xx_cm4_vectors.h | 98 ++++++++++
.../include/mcu/vectors/stm32wb55xx_cm4_vectors.h | 98 ++++++++++
.../include/mcu/vectors/stm32wb5mxx_cm4_vectors.h | 98 ++++++++++
hw/mcu/stm/stm32wbxx/pkg.yml | 1 +
hw/mcu/stm/stm32wbxx/src/clock_stm32wbxx.c | 12 --
hw/mcu/stm/stm32wbxx/src/hal_system_init.c | 54 ++++++
hw/mcu/stm/stm32wbxx/src/system_stm32wbxx.c | 9 -
hw/mcu/stm/stm32wbxx/stm32wb55.ld | 211 ---------------------
14 files changed, 877 insertions(+), 232 deletions(-)
diff --git a/hw/mcu/stm/stm32wbxx/include/mcu/mcu_vectors.h b/hw/mcu/stm/stm32wbxx/include/mcu/mcu_vectors.h
new file mode 100644
index 000000000..0f18017bd
--- /dev/null
+++ b/hw/mcu/stm/stm32wbxx/include/mcu/mcu_vectors.h
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#if defined(STM32WB55xx)
+#include "vectors/stm32wb55xx_cm4_vectors.h"
+#elif defined(STM32WB5Mxx)
+#include "vectors/stm32wb5mxx_cm4_vectors.h"
+#elif defined(STM32WB50xx)
+#include "vectors/stm32wb50xx_cm4_vectors.h"
+#elif defined(STM32WB35xx)
+#include "vectors/stm32wb35xx_cm4_vectors.h"
+#elif defined(STM32WB30xx)
+#include "vectors/stm32wb30xx_cm4_vectors.h"
+#elif defined(STM32WB15xx)
+#include "vectors/stm32wb15xx_cm4_vectors.h"
+#elif defined(STM32WB10xx)
+#include "vectors/stm32wb10xx_cm4_vectors.h"
+#elif defined(STM32WB1Mxx)
+#include "vectors/stm32wb1mxx_cm4_vectors.h"
+#else
+#error "Please select first the target STM32WBxx device used in your application, for instance xxx (in stm32wbxx.h file)"
+#endif
diff --git a/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb10xx_cm4_vectors.h b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb10xx_cm4_vectors.h
new file mode 100644
index 000000000..06c951046
--- /dev/null
+++ b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb10xx_cm4_vectors.h
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+INT_VECTOR_STACK_TOP(__StackTop)
+INT_VECTOR_RESET_HANDLER(Reset_Handler)
+INT_VECTOR_NMI_HANDLER(NMI_Handler)
+INT_VECTOR_HARDFAULT_HANDLER(HardFault_Handler)
+INT_VECTOR_MEMMANAGE_HANDLER(MemManage_Handler)
+INT_VECTOR_BUSFAULT_HANDLER(BusFault_Handler)
+INT_VECTOR_USAGEFAULT_HANDLER(UsageFault_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_SVC_HANDLER(SVC_Handler)
+INT_VECTOR_DEBUGMON_HANDLER(DebugMon_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_PENDSV_HANDLER(PendSV_Handler)
+INT_VECTOR_SYSTICK_HANDLER(SysTick_Handler)
+INT_VECTOR(WWDG_IRQHandler)
+INT_VECTOR(PVD_PVM_IRQHandler)
+INT_VECTOR(TAMP_STAMP_LSECSS_IRQHandler)
+INT_VECTOR(RTC_WKUP_IRQHandler)
+INT_VECTOR(FLASH_IRQHandler)
+INT_VECTOR(RCC_IRQHandler)
+INT_VECTOR(EXTI0_IRQHandler)
+INT_VECTOR(EXTI1_IRQHandler)
+INT_VECTOR(EXTI2_IRQHandler)
+INT_VECTOR(EXTI3_IRQHandler)
+INT_VECTOR(EXTI4_IRQHandler)
+INT_VECTOR(DMA1_Channel1_IRQHandler)
+INT_VECTOR(DMA1_Channel2_IRQHandler)
+INT_VECTOR(DMA1_Channel3_IRQHandler)
+INT_VECTOR(DMA1_Channel4_IRQHandler)
+INT_VECTOR(DMA1_Channel5_IRQHandler)
+INT_VECTOR(DMA1_Channel6_IRQHandler)
+INT_VECTOR(DMA1_Channel7_IRQHandler)
+INT_VECTOR(ADC1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(C2SEV_PWR_C2H_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(EXTI9_5_IRQHandler)
+INT_VECTOR(TIM1_BRK_IRQHandler)
+INT_VECTOR(TIM1_UP_IRQHandler)
+INT_VECTOR(TIM1_TRG_COM_IRQHandler)
+INT_VECTOR(TIM1_CC_IRQHandler)
+INT_VECTOR(TIM2_IRQHandler)
+INT_VECTOR(PKA_IRQHandler)
+INT_VECTOR(I2C1_EV_IRQHandler)
+INT_VECTOR(I2C1_ER_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(SPI1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(USART1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(TSC_IRQHandler)
+INT_VECTOR(EXTI15_10_IRQHandler)
+INT_VECTOR(RTC_Alarm_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(PWR_SOTF_BLEACT_RFPHASE_IRQHandler)
+INT_VECTOR(IPCC_C1_RX_IRQHandler)
+INT_VECTOR(IPCC_C1_TX_IRQHandler)
+INT_VECTOR(HSEM_IRQHandler)
+INT_VECTOR(LPTIM1_IRQHandler)
+INT_VECTOR(LPTIM2_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(AES2_IRQHandler)
+INT_VECTOR(RNG_IRQHandler)
+INT_VECTOR(FPU_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(DMAMUX1_OVR_IRQHandler)
diff --git a/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb15xx_cm4_vectors.h b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb15xx_cm4_vectors.h
new file mode 100644
index 000000000..e82f7c42e
--- /dev/null
+++ b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb15xx_cm4_vectors.h
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+INT_VECTOR_STACK_TOP(__StackTop)
+INT_VECTOR_RESET_HANDLER(Reset_Handler)
+INT_VECTOR_NMI_HANDLER(NMI_Handler)
+INT_VECTOR_HARDFAULT_HANDLER(HardFault_Handler)
+INT_VECTOR_MEMMANAGE_HANDLER(MemManage_Handler)
+INT_VECTOR_BUSFAULT_HANDLER(BusFault_Handler)
+INT_VECTOR_USAGEFAULT_HANDLER(UsageFault_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_SVC_HANDLER(SVC_Handler)
+INT_VECTOR_DEBUGMON_HANDLER(DebugMon_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_PENDSV_HANDLER(PendSV_Handler)
+INT_VECTOR_SYSTICK_HANDLER(SysTick_Handler)
+INT_VECTOR(WWDG_IRQHandler)
+INT_VECTOR(PVD_PVM_IRQHandler)
+INT_VECTOR(TAMP_STAMP_LSECSS_IRQHandler)
+INT_VECTOR(RTC_WKUP_IRQHandler)
+INT_VECTOR(FLASH_IRQHandler)
+INT_VECTOR(RCC_IRQHandler)
+INT_VECTOR(EXTI0_IRQHandler)
+INT_VECTOR(EXTI1_IRQHandler)
+INT_VECTOR(EXTI2_IRQHandler)
+INT_VECTOR(EXTI3_IRQHandler)
+INT_VECTOR(EXTI4_IRQHandler)
+INT_VECTOR(DMA1_Channel1_IRQHandler)
+INT_VECTOR(DMA1_Channel2_IRQHandler)
+INT_VECTOR(DMA1_Channel3_IRQHandler)
+INT_VECTOR(DMA1_Channel4_IRQHandler)
+INT_VECTOR(DMA1_Channel5_IRQHandler)
+INT_VECTOR(DMA1_Channel6_IRQHandler)
+INT_VECTOR(DMA1_Channel7_IRQHandler)
+INT_VECTOR(ADC1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(C2SEV_PWR_C2H_IRQHandler)
+INT_VECTOR(COMP_IRQHandler)
+INT_VECTOR(EXTI9_5_IRQHandler)
+INT_VECTOR(TIM1_BRK_IRQHandler)
+INT_VECTOR(TIM1_UP_IRQHandler)
+INT_VECTOR(TIM1_TRG_COM_IRQHandler)
+INT_VECTOR(TIM1_CC_IRQHandler)
+INT_VECTOR(TIM2_IRQHandler)
+INT_VECTOR(PKA_IRQHandler)
+INT_VECTOR(I2C1_EV_IRQHandler)
+INT_VECTOR(I2C1_ER_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(SPI1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(USART1_IRQHandler)
+INT_VECTOR(LPUART1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(TSC_IRQHandler)
+INT_VECTOR(EXTI15_10_IRQHandler)
+INT_VECTOR(RTC_Alarm_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(PWR_SOTF_BLEACT_RFPHASE_IRQHandler)
+INT_VECTOR(IPCC_C1_RX_IRQHandler)
+INT_VECTOR(IPCC_C1_TX_IRQHandler)
+INT_VECTOR(HSEM_IRQHandler)
+INT_VECTOR(LPTIM1_IRQHandler)
+INT_VECTOR(LPTIM2_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(AES2_IRQHandler)
+INT_VECTOR(RNG_IRQHandler)
+INT_VECTOR(FPU_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(DMAMUX1_OVR_IRQHandler)
diff --git a/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb1mxx_cm4_vectors.h b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb1mxx_cm4_vectors.h
new file mode 100644
index 000000000..e82f7c42e
--- /dev/null
+++ b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb1mxx_cm4_vectors.h
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+INT_VECTOR_STACK_TOP(__StackTop)
+INT_VECTOR_RESET_HANDLER(Reset_Handler)
+INT_VECTOR_NMI_HANDLER(NMI_Handler)
+INT_VECTOR_HARDFAULT_HANDLER(HardFault_Handler)
+INT_VECTOR_MEMMANAGE_HANDLER(MemManage_Handler)
+INT_VECTOR_BUSFAULT_HANDLER(BusFault_Handler)
+INT_VECTOR_USAGEFAULT_HANDLER(UsageFault_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_SVC_HANDLER(SVC_Handler)
+INT_VECTOR_DEBUGMON_HANDLER(DebugMon_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_PENDSV_HANDLER(PendSV_Handler)
+INT_VECTOR_SYSTICK_HANDLER(SysTick_Handler)
+INT_VECTOR(WWDG_IRQHandler)
+INT_VECTOR(PVD_PVM_IRQHandler)
+INT_VECTOR(TAMP_STAMP_LSECSS_IRQHandler)
+INT_VECTOR(RTC_WKUP_IRQHandler)
+INT_VECTOR(FLASH_IRQHandler)
+INT_VECTOR(RCC_IRQHandler)
+INT_VECTOR(EXTI0_IRQHandler)
+INT_VECTOR(EXTI1_IRQHandler)
+INT_VECTOR(EXTI2_IRQHandler)
+INT_VECTOR(EXTI3_IRQHandler)
+INT_VECTOR(EXTI4_IRQHandler)
+INT_VECTOR(DMA1_Channel1_IRQHandler)
+INT_VECTOR(DMA1_Channel2_IRQHandler)
+INT_VECTOR(DMA1_Channel3_IRQHandler)
+INT_VECTOR(DMA1_Channel4_IRQHandler)
+INT_VECTOR(DMA1_Channel5_IRQHandler)
+INT_VECTOR(DMA1_Channel6_IRQHandler)
+INT_VECTOR(DMA1_Channel7_IRQHandler)
+INT_VECTOR(ADC1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(C2SEV_PWR_C2H_IRQHandler)
+INT_VECTOR(COMP_IRQHandler)
+INT_VECTOR(EXTI9_5_IRQHandler)
+INT_VECTOR(TIM1_BRK_IRQHandler)
+INT_VECTOR(TIM1_UP_IRQHandler)
+INT_VECTOR(TIM1_TRG_COM_IRQHandler)
+INT_VECTOR(TIM1_CC_IRQHandler)
+INT_VECTOR(TIM2_IRQHandler)
+INT_VECTOR(PKA_IRQHandler)
+INT_VECTOR(I2C1_EV_IRQHandler)
+INT_VECTOR(I2C1_ER_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(SPI1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(USART1_IRQHandler)
+INT_VECTOR(LPUART1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(TSC_IRQHandler)
+INT_VECTOR(EXTI15_10_IRQHandler)
+INT_VECTOR(RTC_Alarm_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(PWR_SOTF_BLEACT_RFPHASE_IRQHandler)
+INT_VECTOR(IPCC_C1_RX_IRQHandler)
+INT_VECTOR(IPCC_C1_TX_IRQHandler)
+INT_VECTOR(HSEM_IRQHandler)
+INT_VECTOR(LPTIM1_IRQHandler)
+INT_VECTOR(LPTIM2_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(AES2_IRQHandler)
+INT_VECTOR(RNG_IRQHandler)
+INT_VECTOR(FPU_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(DMAMUX1_OVR_IRQHandler)
diff --git a/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb30xx_cm4_vectors.h b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb30xx_cm4_vectors.h
new file mode 100644
index 000000000..4b8d33388
--- /dev/null
+++ b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb30xx_cm4_vectors.h
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+INT_VECTOR_STACK_TOP(__StackTop)
+INT_VECTOR_RESET_HANDLER(Reset_Handler)
+INT_VECTOR_NMI_HANDLER(NMI_Handler)
+INT_VECTOR_HARDFAULT_HANDLER(HardFault_Handler)
+INT_VECTOR_MEMMANAGE_HANDLER(MemManage_Handler)
+INT_VECTOR_BUSFAULT_HANDLER(BusFault_Handler)
+INT_VECTOR_USAGEFAULT_HANDLER(UsageFault_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_SVC_HANDLER(SVC_Handler)
+INT_VECTOR_DEBUGMON_HANDLER(DebugMon_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_PENDSV_HANDLER(PendSV_Handler)
+INT_VECTOR_SYSTICK_HANDLER(SysTick_Handler)
+INT_VECTOR(WWDG_IRQHandler)
+INT_VECTOR(PVD_PVM_IRQHandler)
+INT_VECTOR(TAMP_STAMP_LSECSS_IRQHandler)
+INT_VECTOR(RTC_WKUP_IRQHandler)
+INT_VECTOR(FLASH_IRQHandler)
+INT_VECTOR(RCC_IRQHandler)
+INT_VECTOR(EXTI0_IRQHandler)
+INT_VECTOR(EXTI1_IRQHandler)
+INT_VECTOR(EXTI2_IRQHandler)
+INT_VECTOR(EXTI3_IRQHandler)
+INT_VECTOR(EXTI4_IRQHandler)
+INT_VECTOR(DMA1_Channel1_IRQHandler)
+INT_VECTOR(DMA1_Channel2_IRQHandler)
+INT_VECTOR(DMA1_Channel3_IRQHandler)
+INT_VECTOR(DMA1_Channel4_IRQHandler)
+INT_VECTOR(DMA1_Channel5_IRQHandler)
+INT_VECTOR(DMA1_Channel6_IRQHandler)
+INT_VECTOR(DMA1_Channel7_IRQHandler)
+INT_VECTOR(ADC1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(C2SEV_PWR_C2H_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(EXTI9_5_IRQHandler)
+INT_VECTOR(TIM1_BRK_IRQHandler)
+INT_VECTOR(TIM1_UP_TIM16_IRQHandler)
+INT_VECTOR(TIM1_TRG_COM_TIM17_IRQHandler)
+INT_VECTOR(TIM1_CC_IRQHandler)
+INT_VECTOR(TIM2_IRQHandler)
+INT_VECTOR(PKA_IRQHandler)
+INT_VECTOR(I2C1_EV_IRQHandler)
+INT_VECTOR(I2C1_ER_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(SPI1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(USART1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(EXTI15_10_IRQHandler)
+INT_VECTOR(RTC_Alarm_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler)
+INT_VECTOR(IPCC_C1_RX_IRQHandler)
+INT_VECTOR(IPCC_C1_TX_IRQHandler)
+INT_VECTOR(HSEM_IRQHandler)
+INT_VECTOR(LPTIM1_IRQHandler)
+INT_VECTOR(LPTIM2_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(AES2_IRQHandler)
+INT_VECTOR(RNG_IRQHandler)
+INT_VECTOR(FPU_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(DMAMUX1_OVR_IRQHandler)
diff --git a/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb35xx_cm4_vectors.h b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb35xx_cm4_vectors.h
new file mode 100644
index 000000000..8e3608d51
--- /dev/null
+++ b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb35xx_cm4_vectors.h
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+INT_VECTOR_STACK_TOP(__StackTop)
+INT_VECTOR_RESET_HANDLER(Reset_Handler)
+INT_VECTOR_NMI_HANDLER(NMI_Handler)
+INT_VECTOR_HARDFAULT_HANDLER(HardFault_Handler)
+INT_VECTOR_MEMMANAGE_HANDLER(MemManage_Handler)
+INT_VECTOR_BUSFAULT_HANDLER(BusFault_Handler)
+INT_VECTOR_USAGEFAULT_HANDLER(UsageFault_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_SVC_HANDLER(SVC_Handler)
+INT_VECTOR_DEBUGMON_HANDLER(DebugMon_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_PENDSV_HANDLER(PendSV_Handler)
+INT_VECTOR_SYSTICK_HANDLER(SysTick_Handler)
+INT_VECTOR(WWDG_IRQHandler)
+INT_VECTOR(PVD_PVM_IRQHandler)
+INT_VECTOR(TAMP_STAMP_LSECSS_IRQHandler)
+INT_VECTOR(RTC_WKUP_IRQHandler)
+INT_VECTOR(FLASH_IRQHandler)
+INT_VECTOR(RCC_IRQHandler)
+INT_VECTOR(EXTI0_IRQHandler)
+INT_VECTOR(EXTI1_IRQHandler)
+INT_VECTOR(EXTI2_IRQHandler)
+INT_VECTOR(EXTI3_IRQHandler)
+INT_VECTOR(EXTI4_IRQHandler)
+INT_VECTOR(DMA1_Channel1_IRQHandler)
+INT_VECTOR(DMA1_Channel2_IRQHandler)
+INT_VECTOR(DMA1_Channel3_IRQHandler)
+INT_VECTOR(DMA1_Channel4_IRQHandler)
+INT_VECTOR(DMA1_Channel5_IRQHandler)
+INT_VECTOR(DMA1_Channel6_IRQHandler)
+INT_VECTOR(DMA1_Channel7_IRQHandler)
+INT_VECTOR(ADC1_IRQHandler)
+INT_VECTOR(USB_HP_IRQHandler)
+INT_VECTOR(USB_LP_IRQHandler)
+INT_VECTOR(C2SEV_PWR_C2H_IRQHandler)
+INT_VECTOR(COMP_IRQHandler)
+INT_VECTOR(EXTI9_5_IRQHandler)
+INT_VECTOR(TIM1_BRK_IRQHandler)
+INT_VECTOR(TIM1_UP_TIM16_IRQHandler)
+INT_VECTOR(TIM1_TRG_COM_TIM17_IRQHandler)
+INT_VECTOR(TIM1_CC_IRQHandler)
+INT_VECTOR(TIM2_IRQHandler)
+INT_VECTOR(PKA_IRQHandler)
+INT_VECTOR(I2C1_EV_IRQHandler)
+INT_VECTOR(I2C1_ER_IRQHandler)
+INT_VECTOR(I2C3_EV_IRQHandler)
+INT_VECTOR(I2C3_ER_IRQHandler)
+INT_VECTOR(SPI1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(USART1_IRQHandler)
+INT_VECTOR(LPUART1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(EXTI15_10_IRQHandler)
+INT_VECTOR(RTC_Alarm_IRQHandler)
+INT_VECTOR(CRS_IRQHandler)
+INT_VECTOR(PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler)
+INT_VECTOR(IPCC_C1_RX_IRQHandler)
+INT_VECTOR(IPCC_C1_TX_IRQHandler)
+INT_VECTOR(HSEM_IRQHandler)
+INT_VECTOR(LPTIM1_IRQHandler)
+INT_VECTOR(LPTIM2_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(QUADSPI_IRQHandler)
+INT_VECTOR(AES1_IRQHandler)
+INT_VECTOR(AES2_IRQHandler)
+INT_VECTOR(RNG_IRQHandler)
+INT_VECTOR(FPU_IRQHandler)
+INT_VECTOR(DMA2_Channel1_IRQHandler)
+INT_VECTOR(DMA2_Channel2_IRQHandler)
+INT_VECTOR(DMA2_Channel3_IRQHandler)
+INT_VECTOR(DMA2_Channel4_IRQHandler)
+INT_VECTOR(DMA2_Channel5_IRQHandler)
+INT_VECTOR(DMA2_Channel6_IRQHandler)
+INT_VECTOR(DMA2_Channel7_IRQHandler)
+INT_VECTOR(DMAMUX1_OVR_IRQHandler)
diff --git a/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb50xx_cm4_vectors.h b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb50xx_cm4_vectors.h
new file mode 100644
index 000000000..4b8d33388
--- /dev/null
+++ b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb50xx_cm4_vectors.h
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+INT_VECTOR_STACK_TOP(__StackTop)
+INT_VECTOR_RESET_HANDLER(Reset_Handler)
+INT_VECTOR_NMI_HANDLER(NMI_Handler)
+INT_VECTOR_HARDFAULT_HANDLER(HardFault_Handler)
+INT_VECTOR_MEMMANAGE_HANDLER(MemManage_Handler)
+INT_VECTOR_BUSFAULT_HANDLER(BusFault_Handler)
+INT_VECTOR_USAGEFAULT_HANDLER(UsageFault_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_SVC_HANDLER(SVC_Handler)
+INT_VECTOR_DEBUGMON_HANDLER(DebugMon_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_PENDSV_HANDLER(PendSV_Handler)
+INT_VECTOR_SYSTICK_HANDLER(SysTick_Handler)
+INT_VECTOR(WWDG_IRQHandler)
+INT_VECTOR(PVD_PVM_IRQHandler)
+INT_VECTOR(TAMP_STAMP_LSECSS_IRQHandler)
+INT_VECTOR(RTC_WKUP_IRQHandler)
+INT_VECTOR(FLASH_IRQHandler)
+INT_VECTOR(RCC_IRQHandler)
+INT_VECTOR(EXTI0_IRQHandler)
+INT_VECTOR(EXTI1_IRQHandler)
+INT_VECTOR(EXTI2_IRQHandler)
+INT_VECTOR(EXTI3_IRQHandler)
+INT_VECTOR(EXTI4_IRQHandler)
+INT_VECTOR(DMA1_Channel1_IRQHandler)
+INT_VECTOR(DMA1_Channel2_IRQHandler)
+INT_VECTOR(DMA1_Channel3_IRQHandler)
+INT_VECTOR(DMA1_Channel4_IRQHandler)
+INT_VECTOR(DMA1_Channel5_IRQHandler)
+INT_VECTOR(DMA1_Channel6_IRQHandler)
+INT_VECTOR(DMA1_Channel7_IRQHandler)
+INT_VECTOR(ADC1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(C2SEV_PWR_C2H_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(EXTI9_5_IRQHandler)
+INT_VECTOR(TIM1_BRK_IRQHandler)
+INT_VECTOR(TIM1_UP_TIM16_IRQHandler)
+INT_VECTOR(TIM1_TRG_COM_TIM17_IRQHandler)
+INT_VECTOR(TIM1_CC_IRQHandler)
+INT_VECTOR(TIM2_IRQHandler)
+INT_VECTOR(PKA_IRQHandler)
+INT_VECTOR(I2C1_EV_IRQHandler)
+INT_VECTOR(I2C1_ER_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(SPI1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(USART1_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(EXTI15_10_IRQHandler)
+INT_VECTOR(RTC_Alarm_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler)
+INT_VECTOR(IPCC_C1_RX_IRQHandler)
+INT_VECTOR(IPCC_C1_TX_IRQHandler)
+INT_VECTOR(HSEM_IRQHandler)
+INT_VECTOR(LPTIM1_IRQHandler)
+INT_VECTOR(LPTIM2_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(AES2_IRQHandler)
+INT_VECTOR(RNG_IRQHandler)
+INT_VECTOR(FPU_IRQHandler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR(DMAMUX1_OVR_IRQHandler)
diff --git a/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb55xx_cm4_vectors.h b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb55xx_cm4_vectors.h
new file mode 100644
index 000000000..ced1d8e56
--- /dev/null
+++ b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb55xx_cm4_vectors.h
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+INT_VECTOR_STACK_TOP(__StackTop)
+INT_VECTOR_RESET_HANDLER(Reset_Handler)
+INT_VECTOR_NMI_HANDLER(NMI_Handler)
+INT_VECTOR_HARDFAULT_HANDLER(HardFault_Handler)
+INT_VECTOR_MEMMANAGE_HANDLER(MemManage_Handler)
+INT_VECTOR_BUSFAULT_HANDLER(BusFault_Handler)
+INT_VECTOR_USAGEFAULT_HANDLER(UsageFault_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_SVC_HANDLER(SVC_Handler)
+INT_VECTOR_DEBUGMON_HANDLER(DebugMon_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_PENDSV_HANDLER(PendSV_Handler)
+INT_VECTOR_SYSTICK_HANDLER(SysTick_Handler)
+INT_VECTOR(WWDG_IRQHandler)
+INT_VECTOR(PVD_PVM_IRQHandler)
+INT_VECTOR(TAMP_STAMP_LSECSS_IRQHandler)
+INT_VECTOR(RTC_WKUP_IRQHandler)
+INT_VECTOR(FLASH_IRQHandler)
+INT_VECTOR(RCC_IRQHandler)
+INT_VECTOR(EXTI0_IRQHandler)
+INT_VECTOR(EXTI1_IRQHandler)
+INT_VECTOR(EXTI2_IRQHandler)
+INT_VECTOR(EXTI3_IRQHandler)
+INT_VECTOR(EXTI4_IRQHandler)
+INT_VECTOR(DMA1_Channel1_IRQHandler)
+INT_VECTOR(DMA1_Channel2_IRQHandler)
+INT_VECTOR(DMA1_Channel3_IRQHandler)
+INT_VECTOR(DMA1_Channel4_IRQHandler)
+INT_VECTOR(DMA1_Channel5_IRQHandler)
+INT_VECTOR(DMA1_Channel6_IRQHandler)
+INT_VECTOR(DMA1_Channel7_IRQHandler)
+INT_VECTOR(ADC1_IRQHandler)
+INT_VECTOR(USB_HP_IRQHandler)
+INT_VECTOR(USB_LP_IRQHandler)
+INT_VECTOR(C2SEV_PWR_C2H_IRQHandler)
+INT_VECTOR(COMP_IRQHandler)
+INT_VECTOR(EXTI9_5_IRQHandler)
+INT_VECTOR(TIM1_BRK_IRQHandler)
+INT_VECTOR(TIM1_UP_TIM16_IRQHandler)
+INT_VECTOR(TIM1_TRG_COM_TIM17_IRQHandler)
+INT_VECTOR(TIM1_CC_IRQHandler)
+INT_VECTOR(TIM2_IRQHandler)
+INT_VECTOR(PKA_IRQHandler)
+INT_VECTOR(I2C1_EV_IRQHandler)
+INT_VECTOR(I2C1_ER_IRQHandler)
+INT_VECTOR(I2C3_EV_IRQHandler)
+INT_VECTOR(I2C3_ER_IRQHandler)
+INT_VECTOR(SPI1_IRQHandler)
+INT_VECTOR(SPI2_IRQHandler)
+INT_VECTOR(USART1_IRQHandler)
+INT_VECTOR(LPUART1_IRQHandler)
+INT_VECTOR(SAI1_IRQHandler)
+INT_VECTOR(TSC_IRQHandler)
+INT_VECTOR(EXTI15_10_IRQHandler)
+INT_VECTOR(RTC_Alarm_IRQHandler)
+INT_VECTOR(CRS_IRQHandler)
+INT_VECTOR(PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler)
+INT_VECTOR(IPCC_C1_RX_IRQHandler)
+INT_VECTOR(IPCC_C1_TX_IRQHandler)
+INT_VECTOR(HSEM_IRQHandler)
+INT_VECTOR(LPTIM1_IRQHandler)
+INT_VECTOR(LPTIM2_IRQHandler)
+INT_VECTOR(LCD_IRQHandler)
+INT_VECTOR(QUADSPI_IRQHandler)
+INT_VECTOR(AES1_IRQHandler)
+INT_VECTOR(AES2_IRQHandler)
+INT_VECTOR(RNG_IRQHandler)
+INT_VECTOR(FPU_IRQHandler)
+INT_VECTOR(DMA2_Channel1_IRQHandler)
+INT_VECTOR(DMA2_Channel2_IRQHandler)
+INT_VECTOR(DMA2_Channel3_IRQHandler)
+INT_VECTOR(DMA2_Channel4_IRQHandler)
+INT_VECTOR(DMA2_Channel5_IRQHandler)
+INT_VECTOR(DMA2_Channel6_IRQHandler)
+INT_VECTOR(DMA2_Channel7_IRQHandler)
+INT_VECTOR(DMAMUX1_OVR_IRQHandler)
diff --git a/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb5mxx_cm4_vectors.h b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb5mxx_cm4_vectors.h
new file mode 100644
index 000000000..ced1d8e56
--- /dev/null
+++ b/hw/mcu/stm/stm32wbxx/include/mcu/vectors/stm32wb5mxx_cm4_vectors.h
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+INT_VECTOR_STACK_TOP(__StackTop)
+INT_VECTOR_RESET_HANDLER(Reset_Handler)
+INT_VECTOR_NMI_HANDLER(NMI_Handler)
+INT_VECTOR_HARDFAULT_HANDLER(HardFault_Handler)
+INT_VECTOR_MEMMANAGE_HANDLER(MemManage_Handler)
+INT_VECTOR_BUSFAULT_HANDLER(BusFault_Handler)
+INT_VECTOR_USAGEFAULT_HANDLER(UsageFault_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_SVC_HANDLER(SVC_Handler)
+INT_VECTOR_DEBUGMON_HANDLER(DebugMon_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_PENDSV_HANDLER(PendSV_Handler)
+INT_VECTOR_SYSTICK_HANDLER(SysTick_Handler)
+INT_VECTOR(WWDG_IRQHandler)
+INT_VECTOR(PVD_PVM_IRQHandler)
+INT_VECTOR(TAMP_STAMP_LSECSS_IRQHandler)
+INT_VECTOR(RTC_WKUP_IRQHandler)
+INT_VECTOR(FLASH_IRQHandler)
+INT_VECTOR(RCC_IRQHandler)
+INT_VECTOR(EXTI0_IRQHandler)
+INT_VECTOR(EXTI1_IRQHandler)
+INT_VECTOR(EXTI2_IRQHandler)
+INT_VECTOR(EXTI3_IRQHandler)
+INT_VECTOR(EXTI4_IRQHandler)
+INT_VECTOR(DMA1_Channel1_IRQHandler)
+INT_VECTOR(DMA1_Channel2_IRQHandler)
+INT_VECTOR(DMA1_Channel3_IRQHandler)
+INT_VECTOR(DMA1_Channel4_IRQHandler)
+INT_VECTOR(DMA1_Channel5_IRQHandler)
+INT_VECTOR(DMA1_Channel6_IRQHandler)
+INT_VECTOR(DMA1_Channel7_IRQHandler)
+INT_VECTOR(ADC1_IRQHandler)
+INT_VECTOR(USB_HP_IRQHandler)
+INT_VECTOR(USB_LP_IRQHandler)
+INT_VECTOR(C2SEV_PWR_C2H_IRQHandler)
+INT_VECTOR(COMP_IRQHandler)
+INT_VECTOR(EXTI9_5_IRQHandler)
+INT_VECTOR(TIM1_BRK_IRQHandler)
+INT_VECTOR(TIM1_UP_TIM16_IRQHandler)
+INT_VECTOR(TIM1_TRG_COM_TIM17_IRQHandler)
+INT_VECTOR(TIM1_CC_IRQHandler)
+INT_VECTOR(TIM2_IRQHandler)
+INT_VECTOR(PKA_IRQHandler)
+INT_VECTOR(I2C1_EV_IRQHandler)
+INT_VECTOR(I2C1_ER_IRQHandler)
+INT_VECTOR(I2C3_EV_IRQHandler)
+INT_VECTOR(I2C3_ER_IRQHandler)
+INT_VECTOR(SPI1_IRQHandler)
+INT_VECTOR(SPI2_IRQHandler)
+INT_VECTOR(USART1_IRQHandler)
+INT_VECTOR(LPUART1_IRQHandler)
+INT_VECTOR(SAI1_IRQHandler)
+INT_VECTOR(TSC_IRQHandler)
+INT_VECTOR(EXTI15_10_IRQHandler)
+INT_VECTOR(RTC_Alarm_IRQHandler)
+INT_VECTOR(CRS_IRQHandler)
+INT_VECTOR(PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler)
+INT_VECTOR(IPCC_C1_RX_IRQHandler)
+INT_VECTOR(IPCC_C1_TX_IRQHandler)
+INT_VECTOR(HSEM_IRQHandler)
+INT_VECTOR(LPTIM1_IRQHandler)
+INT_VECTOR(LPTIM2_IRQHandler)
+INT_VECTOR(LCD_IRQHandler)
+INT_VECTOR(QUADSPI_IRQHandler)
+INT_VECTOR(AES1_IRQHandler)
+INT_VECTOR(AES2_IRQHandler)
+INT_VECTOR(RNG_IRQHandler)
+INT_VECTOR(FPU_IRQHandler)
+INT_VECTOR(DMA2_Channel1_IRQHandler)
+INT_VECTOR(DMA2_Channel2_IRQHandler)
+INT_VECTOR(DMA2_Channel3_IRQHandler)
+INT_VECTOR(DMA2_Channel4_IRQHandler)
+INT_VECTOR(DMA2_Channel5_IRQHandler)
+INT_VECTOR(DMA2_Channel6_IRQHandler)
+INT_VECTOR(DMA2_Channel7_IRQHandler)
+INT_VECTOR(DMAMUX1_OVR_IRQHandler)
diff --git a/hw/mcu/stm/stm32wbxx/pkg.yml b/hw/mcu/stm/stm32wbxx/pkg.yml
index 3cb5aa4a0..91e1feee9 100644
--- a/hw/mcu/stm/stm32wbxx/pkg.yml
+++ b/hw/mcu/stm/stm32wbxx/pkg.yml
@@ -45,6 +45,7 @@ pkg.deps:
- "@apache-mynewt-core/hw/hal"
- "@apache-mynewt-core/hw/mcu/stm/stm32_common"
- "@apache-mynewt-core/hw/cmsis-core"
+ - "@apache-mynewt-core/boot/startup"
pkg.deps.'(SPI_0_MASTER || SPI_1_MASTER) && BUS_DRIVER_PRESENT':
- "@apache-mynewt-core/hw/bus/drivers/spi_stm32"
diff --git a/hw/mcu/stm/stm32wbxx/src/clock_stm32wbxx.c b/hw/mcu/stm/stm32wbxx/src/clock_stm32wbxx.c
index 1640d6c80..1bb24c24f 100644
--- a/hw/mcu/stm/stm32wbxx/src/clock_stm32wbxx.c
+++ b/hw/mcu/stm/stm32wbxx/src/clock_stm32wbxx.c
@@ -315,17 +315,5 @@ SystemClock_Config(void)
assert(0);
}
#endif
-
-#if PREFETCH_ENABLE
- __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
-#endif
-
-#if INSTRUCTION_CACHE_ENABLE
- __HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
-#endif
-
-#if DATA_CACHE_ENABLE
- __HAL_FLASH_DATA_CACHE_ENABLE();
-#endif
}
#endif
diff --git a/hw/mcu/stm/stm32wbxx/src/hal_system_init.c b/hw/mcu/stm/stm32wbxx/src/hal_system_init.c
new file mode 100644
index 000000000..b848c4c90
--- /dev/null
+++ b/hw/mcu/stm/stm32wbxx/src/hal_system_init.c
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "os/mynewt.h"
+#include "mcu/stm32_hal.h"
+#include <hal/hal_system.h>
+
+extern char __vector_tbl_reloc__[];
+
+void SystemClock_Config(void);
+
+void
+hal_system_init(void)
+{
+ SCB->VTOR = (uint32_t)&__vector_tbl_reloc__;
+
+ /* Configure System Clock */
+ SystemClock_Config();
+
+ /* Update SystemCoreClock global variable */
+ SystemCoreClockUpdate();
+
+#if PREFETCH_ENABLE
+ __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
+#endif
+
+#if INSTRUCTION_CACHE_ENABLE
+ __HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
+#endif
+
+#if DATA_CACHE_ENABLE
+ __HAL_FLASH_DATA_CACHE_ENABLE();
+#endif
+
+ /* Relocate the vector table */
+ NVIC_Relocate();
+}
+
diff --git a/hw/mcu/stm/stm32wbxx/src/system_stm32wbxx.c b/hw/mcu/stm/stm32wbxx/src/system_stm32wbxx.c
index 8e729a803..1a0bad039 100644
--- a/hw/mcu/stm/stm32wbxx/src/system_stm32wbxx.c
+++ b/hw/mcu/stm/stm32wbxx/src/system_stm32wbxx.c
@@ -92,15 +92,6 @@ void SystemInit(void)
/* Disable all interrupts */
RCC->CIER = 0x00000000;
-
- /* Configure System Clock */
- SystemClock_Config();
-
- /* Update SystemCoreClock global variable */
- SystemCoreClockUpdate();
-
- /* Relocate the vector table */
- NVIC_Relocate();
}
/**
diff --git a/hw/mcu/stm/stm32wbxx/stm32wb55.ld b/hw/mcu/stm/stm32wbxx/stm32wb55.ld
deleted file mode 100644
index 411ec7a60..000000000
--- a/hw/mcu/stm/stm32wbxx/stm32wb55.ld
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __end__
- * end
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __coredata_start__
- * __coredata_end__
- * __corebss_start__
- * __corebss_end__
- * __ecoredata
- * __ecorebss
- */
-ENTRY(Reset_Handler)
-
-_estack = ORIGIN(RAM) + LENGTH(RAM);
-
-SECTIONS
-{
- /* Reserve space at the start of the image for the header. */
- .imghdr (NOLOAD):
- {
- . = . + _imghdr_size;
- } > FLASH
-
- __text = .;
-
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP(*(.preinit_array))
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE_HIDDEN (__init_array_end = .);
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP(*(SORT(.fini_array.*)))
- KEEP(*(.fini_array))
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
-INCLUDE "link_tables.ld.h"
- *(.rodata*)
-
- KEEP(*(.eh_frame*))
- PROVIDE(mynewt_main = main);
- } > FLASH
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- } > FLASH
-
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .coredata :
- {
- __coredata_start__ = .;
- *(.data.core)
- . = ALIGN(4);
- __coredata_end__ = .;
- } > RAM AT > FLASH
-
- __ecoredata = __etext + SIZEOF(.coredata);
-
- _sidata = LOADADDR(.data);
-
- .data :
- {
- . = ALIGN(4);
- _sdata = .;
- __data_start__ = _sdata;
- *(vtable)
- *(.data*)
-
- KEEP(*(.jcr*))
- . = ALIGN(4);
- /* All data end */
- _edata = .;
- __data_end__ = _edata;
-
- } > RAM AT > FLASH
-
- .corebss (NOLOAD):
- {
- . = ALIGN(4);
- __corebss_start__ = .;
- *(.bss.core)
- . = ALIGN(4);
- __corebss_end__ = .;
- *(.corebss*)
- *(.bss.core.nz)
- . = ALIGN(4);
- __ecorebss = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- _sbss = .;
- __bss_start__ = _sbss;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- _ebss = .;
- __bss_end__ = _ebss;
- } > RAM
-
- . = ALIGN(8);
- __HeapBase = .;
- __HeapLimit = ORIGIN(RAM) + LENGTH(RAM);
-
- _ram_start = ORIGIN(RAM);
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM; stack limit is bottom of stack */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-}