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 93976469c2244ee801c6bdc5ca09ba1009526556 Author: Jerzy Kasenberg <jerzy.kasenb...@codecoup.pl> AuthorDate: Mon Apr 15 11:44:01 2024 +0200 hw/mcu/stm32l0: Use common startup code STM32L0 now uses common startup code for Cortex-M0 and autogenerated linker script. Code also adds flash cache settings Signed-off-by: Jerzy Kasenberg <jerzy.kasenb...@codecoup.pl> --- hw/mcu/stm/stm32l0xx/include/mcu/mcu_vectors.h | 60 ++++++ .../include/mcu/vectors/stm32l010x4_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l010x6_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l010x8_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l010xb_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l011xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l021xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l031xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l041xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l051xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l052xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l053xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l062xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l063xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l071xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l072xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l073xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l081xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l082xx_vectors.h | 67 +++++++ .../include/mcu/vectors/stm32l083xx_vectors.h | 67 +++++++ hw/mcu/stm/stm32l0xx/pkg.yml | 1 + hw/mcu/stm/stm32l0xx/src/hal_system_init.c | 60 ++++++ hw/mcu/stm/stm32l0xx/src/system_stm32l0xx.c | 9 - hw/mcu/stm/stm32l0xx/stm32l072.ld | 210 --------------------- hw/mcu/stm/stm32l0xx/stm32l073.ld | 210 --------------------- hw/mcu/stm/stm32l0xx/syscfg.yml | 8 + 26 files changed, 1402 insertions(+), 429 deletions(-) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/mcu_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/mcu_vectors.h new file mode 100644 index 000000000..2054f2868 --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/mcu_vectors.h @@ -0,0 +1,60 @@ +/* + * 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(STM32L010xB) +#include "vectors/stm32l010xb_vectors.h" +#elif defined(STM32L010x8) +#include "vectors/stm32l010x8_vectors.h" +#elif defined(STM32L010x6) +#include "vectors/stm32l010x6_vectors.h" +#elif defined(STM32L010x4) +#include "vectors/stm32l010x4_vectors.h" +#elif defined(STM32L011xx) +#include "vectors/stm32l011xx_vectors.h" +#elif defined(STM32L021xx) +#include "vectors/stm32l021xx_vectors.h" +#elif defined(STM32L031xx) +#include "vectors/stm32l031xx_vectors.h" +#elif defined(STM32L041xx) +#include "vectors/stm32l041xx_vectors.h" +#elif defined(STM32L051xx) +#include "vectors/stm32l051xx_vectors.h" +#elif defined(STM32L052xx) +#include "vectors/stm32l052xx_vectors.h" +#elif defined(STM32L053xx) +#include "vectors/stm32l053xx_vectors.h" +#elif defined(STM32L062xx) +#include "vectors/stm32l062xx_vectors.h" +#elif defined(STM32L063xx) +#include "vectors/stm32l063xx_vectors.h" +#elif defined(STM32L071xx) +#include "vectors/stm32l071xx_vectors.h" +#elif defined(STM32L072xx) +#include "vectors/stm32l072xx_vectors.h" +#elif defined(STM32L073xx) +#include "vectors/stm32l073xx_vectors.h" +#elif defined(STM32L082xx) +#include "vectors/stm32l082xx_vectors.h" +#elif defined(STM32L083xx) +#include "vectors/stm32l083xx_vectors.h" +#elif defined(STM32L081xx) +#include "vectors/stm32l081xx_vectors.h" +#else +#error "Please select first the target STM32L0xx device used in your application" +#endif diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l010x4_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l010x4_vectors.h new file mode 100644 index 000000000..36f0284a1 --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l010x4_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_UNUSED(0) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_IRQHandler) +INT_VECTOR(ADC1_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l010x6_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l010x6_vectors.h new file mode 100644 index 000000000..5f925e3bb --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l010x6_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_UNUSED(0) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l010x8_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l010x8_vectors.h new file mode 100644 index 000000000..5f925e3bb --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l010x8_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_UNUSED(0) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l010xb_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l010xb_vectors.h new file mode 100644 index 000000000..dfbe7e6ad --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l010xb_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_UNUSED(0) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l011xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l011xx_vectors.h new file mode 100644 index 000000000..ab450b9d9 --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l011xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l021xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l021xx_vectors.h new file mode 100644 index 000000000..8c69f08e6 --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l021xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(AES_LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l031xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l031xx_vectors.h new file mode 100644 index 000000000..79b1cbf2c --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l031xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l041xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l041xx_vectors.h new file mode 100644 index 000000000..5230862d0 --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l041xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(AES_LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l051xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l051xx_vectors.h new file mode 100644 index 000000000..0dad736c8 --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l051xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM6_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR(I2C2_IRQHandler) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR(SPI2_IRQHandler) +INT_VECTOR(USART1_IRQHandler) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l052xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l052xx_vectors.h new file mode 100644 index 000000000..d84de041e --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l052xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_CRS_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR(TSC_IRQHandler) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM6_DAC_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR(I2C2_IRQHandler) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR(SPI2_IRQHandler) +INT_VECTOR(USART1_IRQHandler) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(RNG_LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(USB_IRQHandler) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l053xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l053xx_vectors.h new file mode 100644 index 000000000..ccd791aac --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l053xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_CRS_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR(TSC_IRQHandler) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM6_DAC_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR(I2C2_IRQHandler) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR(SPI2_IRQHandler) +INT_VECTOR(USART1_IRQHandler) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(RNG_LPUART1_IRQHandler) +INT_VECTOR(LCD_IRQHandler) +INT_VECTOR(USB_IRQHandler) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l062xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l062xx_vectors.h new file mode 100644 index 000000000..325274646 --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l062xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_CRS_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR(TSC_IRQHandler) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM6_DAC_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR(I2C2_IRQHandler) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR(SPI2_IRQHandler) +INT_VECTOR(USART1_IRQHandler) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(AES_RNG_LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(USB_IRQHandler) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l063xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l063xx_vectors.h new file mode 100644 index 000000000..c6c23402c --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l063xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_CRS_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR(TSC_IRQHandler) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM6_DAC_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR(I2C2_IRQHandler) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR(SPI2_IRQHandler) +INT_VECTOR(USART1_IRQHandler) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(AES_RNG_LPUART1_IRQHandler) +INT_VECTOR(LCD_IRQHandler) +INT_VECTOR(USB_IRQHandler) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l071xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l071xx_vectors.h new file mode 100644 index 000000000..e31d4c7a9 --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l071xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR(USART4_5_IRQHandler) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR(TIM3_IRQHandler) +INT_VECTOR(TIM6_IRQHandler) +INT_VECTOR(TIM7_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR(I2C3_IRQHandler) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR(I2C2_IRQHandler) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR(SPI2_IRQHandler) +INT_VECTOR(USART1_IRQHandler) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l072xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l072xx_vectors.h new file mode 100644 index 000000000..98a45be15 --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l072xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_CRS_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR(TSC_IRQHandler) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR(USART4_5_IRQHandler) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR(TIM3_IRQHandler) +INT_VECTOR(TIM6_DAC_IRQHandler) +INT_VECTOR(TIM7_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR(I2C3_IRQHandler) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR(I2C2_IRQHandler) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR(SPI2_IRQHandler) +INT_VECTOR(USART1_IRQHandler) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(RNG_LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(USB_IRQHandler) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l073xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l073xx_vectors.h new file mode 100644 index 000000000..ad48ee44c --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l073xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_CRS_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR(TSC_IRQHandler) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR(USART4_5_IRQHandler) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR(TIM3_IRQHandler) +INT_VECTOR(TIM6_DAC_IRQHandler) +INT_VECTOR(TIM7_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR(I2C3_IRQHandler) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR(I2C2_IRQHandler) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR(SPI2_IRQHandler) +INT_VECTOR(USART1_IRQHandler) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(RNG_LPUART1_IRQHandler) +INT_VECTOR(LCD_IRQHandler) +INT_VECTOR(USB_IRQHandler) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l081xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l081xx_vectors.h new file mode 100644 index 000000000..d266b5afb --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l081xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR(USART4_5_IRQHandler) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR(TIM3_IRQHandler) +INT_VECTOR(TIM6_IRQHandler) +INT_VECTOR(TIM7_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR(I2C3_IRQHandler) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR(I2C2_IRQHandler) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR(SPI2_IRQHandler) +INT_VECTOR(USART1_IRQHandler) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(AES_LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR_UNUSED(0) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l082xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l082xx_vectors.h new file mode 100644 index 000000000..a84ea6201 --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l082xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_CRS_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR(TSC_IRQHandler) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR(USART4_5_IRQHandler) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR(TIM3_IRQHandler) +INT_VECTOR(TIM6_DAC_IRQHandler) +INT_VECTOR(TIM7_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR(I2C3_IRQHandler) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR(I2C2_IRQHandler) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR(SPI2_IRQHandler) +INT_VECTOR(USART1_IRQHandler) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(AES_RNG_LPUART1_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(USB_IRQHandler) diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l083xx_vectors.h b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l083xx_vectors.h new file mode 100644 index 000000000..023cbbd46 --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/include/mcu/vectors/stm32l083xx_vectors.h @@ -0,0 +1,67 @@ +/* + * 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_IRQHandler) +INT_VECTOR(RTC_IRQHandler) +INT_VECTOR(FLASH_IRQHandler) +INT_VECTOR(RCC_CRS_IRQHandler) +INT_VECTOR(EXTI0_1_IRQHandler) +INT_VECTOR(EXTI2_3_IRQHandler) +INT_VECTOR(EXTI4_15_IRQHandler) +INT_VECTOR(TSC_IRQHandler) +INT_VECTOR(DMA1_Channel1_IRQHandler) +INT_VECTOR(DMA1_Channel2_3_IRQHandler) +INT_VECTOR(DMA1_Channel4_5_6_7_IRQHandler) +INT_VECTOR(ADC1_COMP_IRQHandler) +INT_VECTOR(LPTIM1_IRQHandler) +INT_VECTOR(USART4_5_IRQHandler) +INT_VECTOR(TIM2_IRQHandler) +INT_VECTOR(TIM3_IRQHandler) +INT_VECTOR(TIM6_DAC_IRQHandler) +INT_VECTOR(TIM7_IRQHandler) +INT_VECTOR_UNUSED(0) +INT_VECTOR(TIM21_IRQHandler) +INT_VECTOR(I2C3_IRQHandler) +INT_VECTOR(TIM22_IRQHandler) +INT_VECTOR(I2C1_IRQHandler) +INT_VECTOR(I2C2_IRQHandler) +INT_VECTOR(SPI1_IRQHandler) +INT_VECTOR(SPI2_IRQHandler) +INT_VECTOR(USART1_IRQHandler) +INT_VECTOR(USART2_IRQHandler) +INT_VECTOR(AES_RNG_LPUART1_IRQHandler) +INT_VECTOR(LCD_IRQHandler) +INT_VECTOR(USB_IRQHandler) diff --git a/hw/mcu/stm/stm32l0xx/pkg.yml b/hw/mcu/stm/stm32l0xx/pkg.yml index 30036b69e..17d2d5489 100644 --- a/hw/mcu/stm/stm32l0xx/pkg.yml +++ b/hw/mcu/stm/stm32l0xx/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/stm32l0xx/src/hal_system_init.c b/hw/mcu/stm/stm32l0xx/src/hal_system_init.c new file mode 100644 index 000000000..a784b41fe --- /dev/null +++ b/hw/mcu/stm/stm32l0xx/src/hal_system_init.c @@ -0,0 +1,60 @@ +/* + * 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(); + + /* Relocate the vector table */ + NVIC_Relocate(); + + if (!BUFFER_CACHE_DISABLE) { + __HAL_FLASH_BUFFER_CACHE_ENABLE(); + } else { + __HAL_FLASH_BUFFER_CACHE_DISABLE(); + } + + if (PREREAD_ENABLE) { + __HAL_FLASH_PREREAD_BUFFER_ENABLE(); + } else { + __HAL_FLASH_PREREAD_BUFFER_DISABLE(); + } + + if (PREFETCH_ENABLE) { + __HAL_FLASH_PREFETCH_BUFFER_ENABLE(); + } else { + __HAL_FLASH_PREFETCH_BUFFER_DISABLE(); + } +} + diff --git a/hw/mcu/stm/stm32l0xx/src/system_stm32l0xx.c b/hw/mcu/stm/stm32l0xx/src/system_stm32l0xx.c index 97c476588..71f5bff4e 100644 --- a/hw/mcu/stm/stm32l0xx/src/system_stm32l0xx.c +++ b/hw/mcu/stm/stm32l0xx/src/system_stm32l0xx.c @@ -69,15 +69,6 @@ SystemInit(void) /* Disable all interrupts */ RCC->CIER = 0x00000000U; - - /* Configure System Clock */ - SystemClock_Config(); - - /* Update SystemCoreClock global variable */ - SystemCoreClockUpdate(); - - /* Relocate the vector table */ - NVIC_Relocate(); } /** diff --git a/hw/mcu/stm/stm32l0xx/stm32l072.ld b/hw/mcu/stm/stm32l0xx/stm32l072.ld deleted file mode 100644 index d18107458..000000000 --- a/hw/mcu/stm/stm32l0xx/stm32l072.ld +++ /dev/null @@ -1,210 +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 = 0x20005000; - -SECTIONS -{ - /* Reserve space at the start of the image for the header. */ - .imghdr (NOLOAD): - { - . = . + _imghdr_size; - } > FLASH - - .text : - { - . = ALIGN(4); - __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); - } > RAM - - .coredata : - { - . = ALIGN(4); - __coredata_start__ = .; - *(.data.core) - __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); -} - diff --git a/hw/mcu/stm/stm32l0xx/stm32l073.ld b/hw/mcu/stm/stm32l0xx/stm32l073.ld deleted file mode 100644 index d18107458..000000000 --- a/hw/mcu/stm/stm32l0xx/stm32l073.ld +++ /dev/null @@ -1,210 +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 = 0x20005000; - -SECTIONS -{ - /* Reserve space at the start of the image for the header. */ - .imghdr (NOLOAD): - { - . = . + _imghdr_size; - } > FLASH - - .text : - { - . = ALIGN(4); - __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); - } > RAM - - .coredata : - { - . = ALIGN(4); - __coredata_start__ = .; - *(.data.core) - __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); -} - diff --git a/hw/mcu/stm/stm32l0xx/syscfg.yml b/hw/mcu/stm/stm32l0xx/syscfg.yml index 5aa7544c7..a51c87c1b 100644 --- a/hw/mcu/stm/stm32l0xx/syscfg.yml +++ b/hw/mcu/stm/stm32l0xx/syscfg.yml @@ -107,6 +107,14 @@ syscfg.defs: description: Enable pre-fetch of instructions (when latency > 0) value: 0 + STM32_FLASH_PREREAD_ENABLE: + description: Enable the FLASH preread buffer. + value: 0 + + STM32_FLASH_CACHE_ENABLE: + description: Enable the FLASH Buffer cache. + value: 1 + STM32_HAL_SPI_HAS_FIFO: description: This MCU has a SPI without FIFO value: 0