diff --git a/arch/arm/include/stm32f3/chip.h b/arch/arm/include/stm32f3/chip.h new file mode 100644 index 00000000000..f97f301c8f0 --- /dev/null +++ b/arch/arm/include/stm32f3/chip.h @@ -0,0 +1,627 @@ +/**************************************************************************** + * arch/arm/include/stm32f3/chip.h + * + * SPDX-License-Identifier: Apache-2.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. + * + ****************************************************************************/ + +#ifndef __ARCH_ARM_INCLUDE_STM32F3_CHIP_H +#define __ARCH_ARM_INCLUDE_STM32F3_CHIP_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Pre-processor Prototypes + ****************************************************************************/ + +/* Get customizations for each supported chip and provide alternate function + * pin-mapping + * + * NOTE: Each GPIO pin may serve either for general purpose I/O or for a + * special alternate function (such as USART, CAN, USB, SDIO, etc.). That + * particular pin-mapping will depend on the package and STM32 family. If + * you are incorporating a new STM32 chip into NuttX, you will need to add + * the pin-mapping to a header file and to include that header file below. + * The chip-specific pin-mapping is defined in the chip datasheet. + */ + +#if defined(CONFIG_ARCH_CHIP_STM32F302K6) || defined(CONFIG_ARCH_CHIP_STM32F302K8) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 1 /* (1) Advanced 16-bit timers with DMA: TIM1 (no TIM8) */ +# define STM32_NGTIM 6 /* (2) 16-bit general timers with DMA: TIM3 and TIM4 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ + +# define STM32_NBTIM 1 /* (1) Basic timers: TIM6 (no TIM7) */ +# define STM32_NDMA 1 /* (1) DMA1 (7 channels) */ +# define STM32_NSPI 2 /* (3) SPI1-3 */ +# define STM32_NI2S 0 /* (0) No I2S */ +# define STM32_NUSART 2 /* (2) USART1-2, no UARTs */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 3 /* (3) I2C1-3 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 24 /* GPIOA-F */ +# define STM32_NADC 1 /* (1) 12-bit ADC1 */ +# define STM32_NDAC 1 /* (1) 12-bit DAC1, 1 channel */ +# define STM32_NCMP 2 /* (2) Ultra-fast analog comparators: COMP2 and COMP4 */ +# define STM32_NPGA 1 /* (1) Operational amplifiers: OPAMP */ +# define STM32_NCAPSENSE 13 /* (13) Capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F302C6) || defined(CONFIG_ARCH_CHIP_STM32F302C8) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 1 /* (1) Advanced 16-bit timers with DMA: TIM1 (no TIM8) */ +# define STM32_NGTIM 6 /* (2) 16-bit general timers with DMA: TIM3 and TIM4 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ + +# define STM32_NBTIM 1 /* (1) Basic timers: TIM6 (no TIM7) */ +# define STM32_NDMA 1 /* (1) DMA1 (7 channels) */ +# define STM32_NSPI 2 /* (3) SPI1-3 */ +# define STM32_NI2S 0 /* (0) No I2S */ +# define STM32_NUSART 3 /* (3) USART1-3, no UARTs */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 3 /* (3) I2C1-3 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 37 /* GPIOA-F */ +# define STM32_NADC 1 /* (1) 12-bit ADC1 */ +# define STM32_NDAC 1 /* (1) 12-bit DAC1, 1 channel */ +# define STM32_NCMP 3 /* (3) Ultra-fast analog comparators: COMP2, COMP4 and COMP6*/ +# define STM32_NPGA 1 /* (1) Operational amplifiers: OPAMP */ +# define STM32_NCAPSENSE 17 /* (17) Capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F302R6) || defined(CONFIG_ARCH_CHIP_STM32F302R8) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 1 /* (1) Advanced 16-bit timers with DMA: TIM1 (no TIM8) */ +# define STM32_NGTIM 6 /* (2) 16-bit general timers with DMA: TIM3 and TIM4 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ + +# define STM32_NBTIM 1 /* (1) Basic timers: TIM6 (no TIM7) */ +# define STM32_NDMA 1 /* (1) DMA1 (7 channels) */ +# define STM32_NSPI 2 /* (3) SPI1-3 */ +# define STM32_NI2S 0 /* (0) No I2S */ +# define STM32_NUSART 3 /* (2) USART1-3, no UARTs */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 3 /* (3) I2C1-3 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 51 /* GPIOA-F */ +# define STM32_NADC 1 /* (1) 12-bit ADC1 */ +# define STM32_NDAC 1 /* (1) 12-bit DAC1, 1 channel */ +# define STM32_NCMP 3 /* (3) Ultra-fast analog comparators: COMP2, COMP4 and COMP6*/ +# define STM32_NPGA 1 /* (1) Operational amplifiers: OPAMP */ +# define STM32_NCAPSENSE 18 /* (18) Capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F302CB) || defined(CONFIG_ARCH_CHIP_STM32F302CC) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 1 /* (1) Advanced 16-bit timers with DMA: TIM1 (no TIM8) */ +# define STM32_NGTIM 6 /* (2) 16-bit general timers with DMA: TIM3 and TIM4 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ + +# define STM32_NBTIM 1 /* (1) Basic timers: TIM6 (no TIM7) */ +# define STM32_NDMA 2 /* (2) DMA1 (7 channels) and DMA2 (5 channels) */ +# define STM32_NSPI 3 /* (3) SPI1-3 */ +# define STM32_NI2S 0 /* (0) No I2S */ +# define STM32_NUSART 3 /* (3) No UART1-3, no UARTs */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 2 /* (2) I2C1-2 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 37 /* GPIOA-F */ +# define STM32_NADC 2 /* (2) 12-bit ADC1-2 */ +# define STM32_NDAC 1 /* (1) 12-bit DAC1, 1 channel */ +# define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F302RB) || defined(CONFIG_ARCH_CHIP_STM32F302RC) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 1 /* (1) Advanced 16-bit timers with DMA: TIM1 (no TIM8) */ +# define STM32_NGTIM 6 /* (2) 16-bit general timers with DMA: TIM3 and TIM4 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ + +# define STM32_NBTIM 1 /* (1) Basic timers: TIM6 (no TIM7) */ +# define STM32_NDMA 2 /* (2) DMA1 (7 channels) and DMA2 (5 channels) */ +# define STM32_NSPI 3 /* (3) SPI1-3 */ +# define STM32_NI2S 0 /* (0) No I2S */ +# define STM32_NUSART 5 /* (5) USART1-3, UART4-5 */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 2 /* (2) I2C1-2 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 52 /* GPIOA-F */ +# define STM32_NADC 2 /* (2) 12-bit ADC1-2 */ +# define STM32_NDAC 1 /* (1) 12-bit DAC1, 1 channel */ +# define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F302VB) || defined(CONFIG_ARCH_CHIP_STM32F302VC) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 1 /* (1) Advanced 16-bit timers with DMA: TIM1 (no TIM8) */ +# define STM32_NGTIM 6 /* (2) 16-bit general timers with DMA: TIM3 and TIM4 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ + +# define STM32_NBTIM 1 /* (1) Basic timers: TIM6 (no TIM7) */ +# define STM32_NDMA 2 /* (2) DMA1 (7 channels) and DMA2 (5 channels) */ +# define STM32_NSPI 3 /* (3) SPI1-3 */ +# define STM32_NI2S 0 /* (0) No I2S */ +# define STM32_NUSART 5 /* (5) USART1-3, UART4-5 */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 2 /* (2) I2C1-2 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 87 /* GPIOA-F */ +# define STM32_NADC 2 /* (2) 12-bit ADC1-2 */ +# define STM32_NDAC 1 /* (1) 12-bit DAC1, 1 channel */ +# define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F303K6) || defined(CONFIG_ARCH_CHIP_STM32F303K8) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 1 /* (1) Advanced 16-bit timers with DMA: TIM1 */ +# define STM32_NGTIM 5 /* (1) 16-bit general timers with DMA: TIM3 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ +# define STM32_NBTIM 2 /* (2) Basic timers: TIM6 and TIM7 */ +# define STM32_NDMA 1 /* (1) DMA1 (7 channels) */ +# define STM32_NSPI 1 /* (1) SPI1 */ +# define STM32_NI2S 0 /* (0) No I2S */ +# define STM32_NUSART 2 /* (2) USART1-2, no UARTs */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 1 /* (1) I2C1 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */ +# define STM32_NGPIO 25 /* GPIOA-F */ +# define STM32_NADC 2 /* (2) 12-bit ADC1-2 */ +# define STM32_NDAC 3 /* (3) 12-bit DAC1-2, 3 channels */ +# define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F303C6) || defined(CONFIG_ARCH_CHIP_STM32F303C8) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 1 /* (1) Advanced 16-bit timers with DMA: TIM1 */ +# define STM32_NGTIM 5 /* (1) 16-bit general timers with DMA: TIM3 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ +# define STM32_NBTIM 2 /* (2) Basic timers: TIM6 and TIM7 */ +# define STM32_NDMA 1 /* (1) DMA1 (7 channels) */ +# define STM32_NSPI 1 /* (1) SPI1 */ +# define STM32_NI2S 0 /* (0) No I2S */ +# define STM32_NUSART 3 /* (3) USART1-3, no UARTs */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 1 /* (1) I2C1 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */ +# define STM32_NGPIO 37 /* GPIOA-F */ +# define STM32_NADC 2 /* (2) 12-bit ADC1-2 */ +# define STM32_NDAC 3 /* (3) 12-bit DAC1-2, 3 channels */ +# define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F303CB) || defined(CONFIG_ARCH_CHIP_STM32F303CC) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 2 /* (2) Advanced 16-bit timers with DMA: TIM1 and TIM8 */ +# define STM32_NGTIM 6 /* (2) 16-bit general timers with DMA: TIM3 and TIM4 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ +# define STM32_NBTIM 2 /* (2) Basic timers: TIM6 and TIM7 */ +# define STM32_NDMA 2 /* (2) DMA1 (7 channels) and DMA2 (5 channels) */ +# define STM32_NSPI 3 /* (3) SPI1-3 */ +# define STM32_NI2S 2 /* (2) I2S1-2 (multiplexed with SPI2-3) */ +# define STM32_NUSART 3 /* (3) No UART1-3, no UARTs */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 2 /* (2) I2C1-2 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 37 /* GPIOA-F */ +# define STM32_NADC 4 /* (3) 12-bit ADC1-4 */ +# define STM32_NDAC 2 /* (2) 12-bit DAC1, 2 channels */ +# define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F303RB) || defined(CONFIG_ARCH_CHIP_STM32F303RC) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 2 /* (2) Advanced 16-bit timers with DMA: TIM1 and TIM8 */ +# define STM32_NGTIM 6 /* (2) 16-bit general timers with DMA: TIM3 and TIM4 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ +# define STM32_NBTIM 2 /* (2) Basic timers: TIM6 and TIM7 */ +# define STM32_NDMA 2 /* (2) DMA1 (7 channels) and DMA2 (5 channels) */ +# define STM32_NSPI 3 /* (3) SPI1-3 */ +# define STM32_NI2S 2 /* (2) I2S1-2 (multiplexed with SPI2-3) */ +# define STM32_NUSART 5 /* (5) USART1-3, UART4-5 */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 2 /* (2) I2C1-2 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 52 /* GPIOA-F */ +# define STM32_NADC 4 /* (3) 12-bit ADC1-4 */ +# define STM32_NDAC 2 /* (2) 12-bit DAC1, 2 channels */ +# define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F303RD) || defined(CONFIG_ARCH_CHIP_STM32F303RE) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 2 /* (2) Advanced 16-bit timers with DMA: TIM1 and TIM8 */ +# define STM32_NGTIM 6 /* (2) 16-bit general timers with DMA: TIM3 and TIM4 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ +# define STM32_NBTIM 2 /* (2) Basic timers: TIM6 and TIM7 */ +# define STM32_NDMA 2 /* (2) DMA1 (7 channels) and DMA2 (5 channels) */ +# define STM32_NSPI 4 /* (4) SPI1-4 */ +# define STM32_NI2S 2 /* (2) I2S1-2 (multiplexed with SPI2-3) */ +# define STM32_NUSART 5 /* (5) USART1-3, UART4-5 */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 3 /* (2) I2C1-3 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 51 /* GPIOA-F */ +# define STM32_NADC 4 /* (4) 12-bit ADC1-4 */ +# define STM32_NDAC 2 /* (2) 12-bit DAC1, 2 channels */ +# define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F303VB) || defined(CONFIG_ARCH_CHIP_STM32F303VC) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 2 /* (2) Advanced 16-bit timers with DMA: TIM1 and TIM8 */ +# define STM32_NGTIM 6 /* (2) 16-bit general timers with DMA: TIM3 and TIM4 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ +# define STM32_NBTIM 2 /* (2) Basic timers: TIM6 and TIM7 */ +# define STM32_NDMA 2 /* (2) DMA1 (7 channels) and DMA2 (5 channels) */ +# define STM32_NSPI 3 /* (3) SPI1-3 */ +# define STM32_NI2S 2 /* (2) I2S1-2 (multiplexed with SPI2-3) */ +# define STM32_NUSART 5 /* (5) USART1-3, UART4-5 */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 2 /* (2) I2C1-2 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 87 /* GPIOA-F */ +# define STM32_NADC 4 /* (3) 12-bit ADC1-4 */ +# define STM32_NDAC 2 /* (2) 12-bit DAC1, 2 channels */ +# define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F303RD) || defined(CONFIG_ARCH_CHIP_STM32F303RE) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 2 /* (2) Advanced 16-bit timers with DMA: TIM1 and TIM8 */ +# define STM32_NGTIM 6 /* (5) 16-bit general timers + * (1) 32-bit general timers */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ +# define STM32_NBTIM 2 /* (2) Basic timers: TIM6 and TIM7 */ +# define STM32_NDMA 2 /* (2) DMA1 (7 channels) and DMA2 (5 channels) */ +# define STM32_NSPI 4 /* (4) SPI1-4 */ +# define STM32_NI2S 2 /* (2) I2S1-2 (multiplexed with SPI2-3) */ +# define STM32_NUSART 5 /* (5) USART1-3, UART4-5 */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 3 /* (3) I2C1-3 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 51 /* GPIOA-F */ +# define STM32_NADC 4 /* (4) 12-bit ADC1-4 */ +# define STM32_NDAC 2 /* (2) 12-bit DAC1, 2 channels */ +# define STM32_NCAPSENSE 18 /* (18) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F303VD) || defined(CONFIG_ARCH_CHIP_STM32F303VE) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 3 /* (3) Advanced 16-bit timers with DMA: TIM1, TIM8 and TIM20 */ +# define STM32_NGTIM 6 /* (5) 16-bit general timers + * (1) 32-bit general timers */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ +# define STM32_NBTIM 2 /* (2) Basic timers: TIM6 and TIM7 */ +# define STM32_NDMA 2 /* (2) DMA1 (7 channels) and DMA2 (5 channels) */ +# define STM32_NSPI 4 /* (4) SPI1-4 */ +# define STM32_NI2S 2 /* (2) I2S1-2 (multiplexed with SPI2-3) */ +# define STM32_NUSART 5 /* (5) USART1-3, UART4-5 */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 3 /* (3) I2C1-3 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 84 /* GPIOA-F (depends on package) */ +# define STM32_NADC 4 /* (4) 12-bit ADC1-4 */ +# define STM32_NDAC 2 /* (2) 12-bit DAC1, 2 channels */ +# define STM32_NCAPSENSE 24 /* (24) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F303ZD) || defined(CONFIG_ARCH_CHIP_STM32F303ZE) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 3 /* (3) Advanced 16-bit timers with DMA: TIM1, TIM8 and TIM20 */ +# define STM32_NGTIM 6 /* (5) 16-bit general timers + * (1) 32-bit general timers */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ +# define STM32_NBTIM 2 /* (2) Basic timers: TIM6 and TIM7 */ +# define STM32_NDMA 2 /* (2) DMA1 (7 channels) and DMA2 (5 channels) */ +# define STM32_NSPI 4 /* (4) SPI1-4 */ +# define STM32_NI2S 2 /* (2) I2S1-2 (multiplexed with SPI2-3) */ +# define STM32_NUSART 5 /* (5) USART1-3, UART4-5 */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 3 /* (3) I2C1-3 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 115 /* GPIOA-F */ +# define STM32_NADC 4 /* (4) 12-bit ADC1-4 */ +# define STM32_NDAC 2 /* (2) 12-bit DAC1, 2 channels */ +# define STM32_NCAPSENSE 24 /* (24) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F334K4) || defined(CONFIG_ARCH_CHIP_STM32F334K6) || defined(CONFIG_ARCH_CHIP_STM32F334K8) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_HRTIM 1 /* (1) High-resolution timer 16-bit, 10 channels: HRTIM1 */ +# define STM32_NATIM 1 /* (1) Advanced 16-bit timers with DMA: TIM1*/ +# define STM32_NGTIM 5 /* (1) 16-bit general timers with DMA: TIM3 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ +# define STM32_NBTIM 2 /* (2) Basic timers: TIM6 and TIM7 */ +# define STM32_NDMA 1 /* (1) DMA1 (7 channels) */ +# define STM32_NSPI 1 /* (1) SPI1 */ +# define STM32_NI2S 0 /* (0) No I2S1 */ +# define STM32_NUSART 2 /* (2) USART1-2 */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 1 /* (1) I2C1 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* (0) No USB */ +# define STM32_NGPIO 25 /* GPIOA-F */ +# define STM32_NADC 2 /* (2) 12-bit ADC1-2 */ +# define STM32_NDAC 3 /* (3) 12-bit DAC1-2, 3 channels */ +# define STM32_NCMP 2 /* (2) Ultra-fast analog comparators: COMP2 and COMP4 */ +# define STM32_NPGA 1 /* (1) Operational amplifiers: OPAMP */ +# define STM32_NCAPSENSE 14 /* (14) Capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F334C4) || defined(CONFIG_ARCH_CHIP_STM32F334C6) || defined(CONFIG_ARCH_CHIP_STM32F334C8) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_HRTIM 1 /* (1) High-resolution timer 16-bit, 10 channels: HRTIM1 */ +# define STM32_NATIM 1 /* (1) Advanced 16-bit timers with DMA: TIM1*/ +# define STM32_NGTIM 5 /* (1) 16-bit general timers with DMA: TIM3 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ +# define STM32_NBTIM 2 /* (2) Basic timers: TIM6 and TIM7 */ +# define STM32_NDMA 1 /* (1) DMA1 (7 channels) */ +# define STM32_NSPI 1 /* (1) SPI1 */ +# define STM32_NI2S 0 /* (0) No I2S1 */ +# define STM32_NUSART 3 /* (3) USART1-3 */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 1 /* (1) I2C1 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* (0) No USB */ +# define STM32_NGPIO 37 /* GPIOA-F */ +# define STM32_NADC 2 /* (2) 12-bit ADC1-2 */ +# define STM32_NDAC 3 /* (3) 12-bit DAC1-2, 3 channels */ +# define STM32_NCMP 3 /* (3) Ultra-fast analog comparators: COMP2, COMP4 and COMP6 */ +# define STM32_NPGA 1 /* (1) Operational amplifiers: OPAMP */ +# define STM32_NCAPSENSE 17 /* (17) Capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F334R4) || defined(CONFIG_ARCH_CHIP_STM32F334R6) || defined(CONFIG_ARCH_CHIP_STM32F334R8) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_HRTIM 1 /* (1) High-resolution timer 16-bit, 10 channels: HRTIM1 */ +# define STM32_NATIM 1 /* (1) Advanced 16-bit timers with DMA: TIM1*/ +# define STM32_NGTIM 5 /* (1) 16-bit general timers with DMA: TIM3 + * (1) 32-bit general timers with DMA: TIM2 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 0 /* All timers have DMA */ +# define STM32_NBTIM 2 /* (2) Basic timers: TIM6 and TIM7 */ +# define STM32_NDMA 1 /* (1) DMA1 (7 channels) */ +# define STM32_NSPI 1 /* (1) SPI1 */ +# define STM32_NI2S 0 /* (0) No I2S1 */ +# define STM32_NUSART 3 /* (3) USART1-3 */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 1 /* (1) I2C1 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* (0) No USB */ +# define STM32_NGPIO 51 /* GPIOA-F */ +# define STM32_NADC 2 /* (2) 12-bit ADC1-2 */ +# define STM32_NDAC 3 /* (3) 12-bit DAC1-2, 3 channels */ +# define STM32_NCMP 3 /* (3) Ultra-fast analog comparators: COMP2, COMP4 and COMP6 */ +# define STM32_NPGA 1 /* (1) Operational amplifiers: OPAMP */ +# define STM32_NCAPSENSE 18 /* (18) Capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +#elif defined(CONFIG_ARCH_CHIP_STM32F373C8) || defined(CONFIG_ARCH_CHIP_STM32F373CB) || defined(CONFIG_ARCH_CHIP_STM32F373CC) +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 0 /* (0) Advanced 16-bit timers with DMA: */ +# define STM32_NGTIM 8 /* (3) 16-bit general timers with DMA: TIM3, TIM4 and TIM19 + * (2) 32-bit general timers with DMA: TIM2 and TIM5 + * (3) 16-bit general timers count-up timers with DMA: TIM15-17 */ +# define STM32_NGTIMNDMA 3 /* (3) 16-bit general timers count-up timers without DMA: TIM12-14 */ +# define STM32_NBTIM 3 /* (3) Basic timers: TIM6, TIM7 and TIM18 */ +# define STM32_NDMA 2 /* (2) DMA1 (7 channels) and DMA2 (5 channels) */ +# define STM32_NSPI 3 /* (3) SPI1-3 */ +# define STM32_NI2S 3 /* (3) I2S1-2 (multiplexed with SPI1-3) */ +# define STM32_NUSART 3 /* (3) USART1-3 */ +# define STM32_NLPUART 0 /* No LPUART */ +# define STM32_NI2C 2 /* (2) I2C1-2 */ +# define STM32_NCAN 1 /* (1) CAN1 */ +# define STM32_NSDIO 0 /* (0) No SDIO */ +# define STM32_NLCD 0 /* (0) No LCD */ +# define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ +# define STM32_NGPIO 87 /* GPIOA-F */ +# define STM32_NADC 1 /* (1) 12-bit ADC1 */ +# define STM32_NSDADC 3 /* (3) 16-bit SDADC1-3 */ +# define STM32_NDAC 3 /* (3) 12-bit DAC1-2, 3 channels */ +# define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ +# define STM32_NCRC 1 /* (1) CRC calculation unit */ +# define STM32_NETHERNET 0 /* (0) No Ethernet MAC */ +# define STM32_NRNG 0 /* (0) No random number generator (RNG) */ +# define STM32_NDCMI 0 /* (0) No digital camera interface (DCMI) */ + +/* STM23 F4 Family **********************************************************/ + +/* STM32F01xB/C Family Differences: + * + * PART PACKAGE FLASH SDIO ADC Channels + * ----------- ---------------- ----- ---- ------------ + * STM32F401CB WLCSP49/UFQFPN48 128Kb No 10 + * STM32F401RB LQFP64 128Kb Yes 16 + * STM32F401VB UFBGA100/LQFP100 128Kb Yes 16 + * STM32F401CC WLCSP49/UFQFPN48 256Kb No 10 + * STM32F401RC LQFP64 256Kb Yes 16 + * STM32F401VC UFBGA100/LQFP100 256Kb Yes 16 + */ + +#else +# error "Unsupported STM32 chip" +#endif + +/* Peripheral IP versions ***************************************************/ + +/* Peripheral IP versions are invariant and should be decided here, not in + * Kconfig. + * + * REVISIT: Currently only SPI IP version is handled here, with others being + * handled in Kconfig. Those others need to be gradually refactored + * and resolved here. + */ + +#if defined(CONFIG_STM32_STM32F30XX) +# define STM32_HAVE_IP_SPI_V3 + +#elif defined(CONFIG_STM32_STM32F33XX) +# define STM32_HAVE_IP_SPI_V1 + +#elif defined(CONFIG_STM32_STM32F37XX) +# define STM32_HAVE_IP_SPI_V3 + +#else +# error "Did not resolve peripheral IP versions!" +#endif + +/* NVIC priority levels *****************************************************/ + +#define NVIC_SYSH_PRIORITY_MIN 0xf0 /* All bits set in minimum priority */ +#define NVIC_SYSH_PRIORITY_DEFAULT 0x80 /* Midpoint is the default */ +#define NVIC_SYSH_PRIORITY_MAX 0x00 /* Zero is maximum priority */ +#define NVIC_SYSH_PRIORITY_STEP 0x10 /* Four bits of interrupt priority used */ + +#endif /* __ARCH_ARM_INCLUDE_STM32F3_CHIP_H */ diff --git a/arch/arm/include/stm32/irq.h b/arch/arm/include/stm32f3/irq.h similarity index 68% rename from arch/arm/include/stm32/irq.h rename to arch/arm/include/stm32f3/irq.h index 6e55b57a3fc..91c056320ef 100644 --- a/arch/arm/include/stm32/irq.h +++ b/arch/arm/include/stm32f3/irq.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/include/stm32/irq.h + * arch/arm/include/stm32f3/irq.h * * SPDX-License-Identifier: Apache-2.0 * @@ -24,8 +24,8 @@ * only indirectly through nuttx/irq.h */ -#ifndef __ARCH_ARM_INCLUDE_STM32_IRQ_H -#define __ARCH_ARM_INCLUDE_STM32_IRQ_H +#ifndef __ARCH_ARM_INCLUDE_STM32F3_IRQ_H +#define __ARCH_ARM_INCLUDE_STM32F3_IRQ_H /**************************************************************************** * Included Files @@ -33,7 +33,7 @@ #include #include -#include +#include /**************************************************************************** * Pre-processor Prototypes @@ -71,51 +71,14 @@ * Included Files ****************************************************************************/ -#if defined(CONFIG_STM32_STM32L15XX) -# include -#elif defined(CONFIG_STM32_STM32F10XX) -# include -#elif defined(CONFIG_STM32_STM32F20XX) -# include -#elif defined(CONFIG_STM32_STM32F30XX) -# include +#if defined(CONFIG_STM32_STM32F30XX) +# include #elif defined(CONFIG_STM32_STM32F33XX) -# include +# include #elif defined(CONFIG_STM32_STM32F37XX) -# include -#elif defined(CONFIG_STM32_STM32F4XXX) -# include -#elif defined(CONFIG_STM32_STM32G4XXX) -# include +# include #else -# error "Unsupported STM32 chip" +# error "Unsupported STM32F3 chip" #endif -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - -#endif /* __ARCH_ARM_INCLUDE_STM32_IRQ_H */ +#endif /* __ARCH_ARM_INCLUDE_STM32F3_IRQ_H */ diff --git a/arch/arm/include/stm32/stm32f30xxx_irq.h b/arch/arm/include/stm32f3/stm32f30xxx_irq.h similarity index 93% rename from arch/arm/include/stm32/stm32f30xxx_irq.h rename to arch/arm/include/stm32f3/stm32f30xxx_irq.h index 32c5dc0d557..b5a5612cfa2 100644 --- a/arch/arm/include/stm32/stm32f30xxx_irq.h +++ b/arch/arm/include/stm32f3/stm32f30xxx_irq.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/include/stm32/stm32f30xxx_irq.h + * arch/arm/include/stm32f3/stm32f30xxx_irq.h * * SPDX-License-Identifier: Apache-2.0 * @@ -43,7 +43,7 @@ * memory in the IRQ to handle mapping tables. * * Processor Exceptions (vectors 0-15). These common definitions can be - * found in nuttx/arch/arm/include/stm32/irq.h + * found in nuttx/arch/arm/include/stm32f3/irq.h * * External interrupts (vectors >= 16) */ @@ -153,31 +153,4 @@ #define STM32_IRQ_NEXTINTS (82) #define NR_IRQS (STM32_IRQ_FIRST + STM32_IRQ_NEXTINTS) -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - #endif /* __ARCH_ARM_INCLUDE_STM32_STM32F30XXX_IRQ_H */ diff --git a/arch/arm/include/stm32/stm32f33xxx_irq.h b/arch/arm/include/stm32f3/stm32f33xxx_irq.h similarity index 92% rename from arch/arm/include/stm32/stm32f33xxx_irq.h rename to arch/arm/include/stm32f3/stm32f33xxx_irq.h index bb6e9f84cc9..4dde150c30d 100644 --- a/arch/arm/include/stm32/stm32f33xxx_irq.h +++ b/arch/arm/include/stm32f3/stm32f33xxx_irq.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/include/stm32/stm32f33xxx_irq.h + * arch/arm/include/stm32f3/stm32f33xxx_irq.h * * SPDX-License-Identifier: Apache-2.0 * @@ -43,7 +43,7 @@ * memory in the IRQ to handle mapping tables. * * Processor Exceptions (vectors 0-15). These common definitions can be - * found in nuttx/arch/arm/include/stm32/irq.h + * found in nuttx/arch/arm/include/stm32f3/irq.h * * External interrupts (vectors >= 16) */ @@ -143,31 +143,4 @@ #define STM32_IRQ_NEXTINTS (82) #define NR_IRQS (STM32_IRQ_FIRST + STM32_IRQ_NEXTINTS) -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - #endif /* __ARCH_ARM_INCLUDE_STM32F30XXX_IRQ_H */ diff --git a/arch/arm/include/stm32/stm32f37xxx_irq.h b/arch/arm/include/stm32f3/stm32f37xxx_irq.h similarity index 92% rename from arch/arm/include/stm32/stm32f37xxx_irq.h rename to arch/arm/include/stm32f3/stm32f37xxx_irq.h index cf052a8493a..445fa0c657b 100644 --- a/arch/arm/include/stm32/stm32f37xxx_irq.h +++ b/arch/arm/include/stm32f3/stm32f37xxx_irq.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/include/stm32/stm32f37xxx_irq.h + * arch/arm/include/stm32f3/stm32f37xxx_irq.h * * SPDX-License-Identifier: Apache-2.0 * @@ -43,7 +43,7 @@ * memory in the IRQ to handle mapping tables. * * Processor Exceptions (vectors 0-15). These common definitions can be - * found in nuttx/arch/arm/include/stm32/irq.h + * found in nuttx/arch/arm/include/stm32f3/irq.h * * External interrupts (vectors >= 16) */ @@ -138,31 +138,4 @@ #define STM32_IRQ_NEXTINTS (82) #define NR_IRQS (STM32_IRQ_FIRST + STM32_IRQ_NEXTINTS) -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#undef EXTERN -#ifdef __cplusplus -} -#endif -#endif - #endif /* __ARCH_ARM_INCLUDE_STM32F30XXX_IRQ_H */ diff --git a/arch/arm/src/stm32f3/CMakeLists.txt b/arch/arm/src/stm32f3/CMakeLists.txt new file mode 100644 index 00000000000..36707fa80f1 --- /dev/null +++ b/arch/arm/src/stm32f3/CMakeLists.txt @@ -0,0 +1,28 @@ +# ############################################################################## +# arch/arm/src/stm32f3/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.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. +# +# ############################################################################## + +set(SRCS) + +list(APPEND SRCS stm32_rcc.c) + +target_sources(arch PRIVATE ${SRCS}) +add_subdirectory(${NUTTX_DIR}/arch/arm/src/common/stm32 stm32_common) diff --git a/arch/arm/src/stm32f3/Kconfig b/arch/arm/src/stm32f3/Kconfig new file mode 100644 index 00000000000..428efe6c9c5 --- /dev/null +++ b/arch/arm/src/stm32f3/Kconfig @@ -0,0 +1,626 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# +comment "STM32 F3 configuration" + +if ARCH_CHIP_STM32F3 + +choice + prompt "STM32F3 Chip Selection" + depends on ARCH_CHIP_STM32F3 + +config ARCH_CHIP_STM32F302K6 + bool "STM32F302K6" + select STM32_STM32F30XX + select STM32_STM32F302 + select STM32_HAVE_I2C3 + +config ARCH_CHIP_STM32F302K8 + bool "STM32F302K8" + select STM32_STM32F30XX + select STM32_STM32F302 + select STM32_HAVE_I2C3 + +config ARCH_CHIP_STM32F302C6 + bool "STM32F302C6" + select STM32_STM32F30XX + select STM32_STM32F302 + +config ARCH_CHIP_STM32F302C8 + bool "STM32F302C8" + select STM32_STM32F30XX + select STM32_STM32F302 + +config ARCH_CHIP_STM32F302R6 + bool "STM32F302R6" + select STM32_STM32F30XX + select STM32_STM32F302 + +config ARCH_CHIP_STM32F302R8 + bool "STM32F302R8" + select STM32_STM32F30XX + select STM32_STM32F302 + +config ARCH_CHIP_STM32F302CB + bool "STM32F302CB" + select STM32_STM32F30XX + select STM32_STM32F302 + select STM32_HAVE_ADC2 + select STM32_HAVE_USART3 + +config ARCH_CHIP_STM32F302CC + bool "STM32F302CC" + select STM32_STM32F30XX + select STM32_STM32F302 + select STM32_HAVE_ADC2 + select STM32_HAVE_USART3 + +config ARCH_CHIP_STM32F302RB + bool "STM32F302RB" + select STM32_STM32F30XX + select STM32_STM32F302 + select STM32_HAVE_ADC2 + select STM32_HAVE_USART3 + select STM32_HAVE_UART4 + select STM32_HAVE_UART5 + +config ARCH_CHIP_STM32F302RC + bool "STM32F302RC" + select STM32_STM32F30XX + select STM32_STM32F302 + select STM32_HAVE_ADC2 + select STM32_HAVE_USART3 + select STM32_HAVE_UART4 + select STM32_HAVE_UART5 + +config ARCH_CHIP_STM32F302VB + bool "STM32F302VB" + select STM32_STM32F30XX + select STM32_STM32F302 + select STM32_HAVE_ADC2 + select STM32_HAVE_USART3 + select STM32_HAVE_UART4 + select STM32_HAVE_UART5 + +config ARCH_CHIP_STM32F302VC + bool "STM32F302VC" + select STM32_STM32F30XX + select STM32_STM32F302 + select STM32_HAVE_ADC2 + select STM32_HAVE_USART3 + select STM32_HAVE_UART4 + select STM32_HAVE_UART5 + +config ARCH_CHIP_STM32F303K6 + bool "STM32F303K6" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_DAC2 + +config ARCH_CHIP_STM32F303K8 + bool "STM32F303K8" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_DAC2 + +config ARCH_CHIP_STM32F303C6 + bool "STM32F303C6" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_DAC2 + select STM32_HAVE_USART3 + +config ARCH_CHIP_STM32F303C8 + bool "STM32F303C8" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_DAC2 + select STM32_HAVE_USART3 + +config ARCH_CHIP_STM32F303CB + bool "STM32F303CB" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_ADC3 + select STM32_HAVE_ADC4 + select STM32_HAVE_I2C2 + select STM32_HAVE_SPI2 + select STM32_HAVE_SPI3 + select STM32_HAVE_TIM4 + select STM32_HAVE_TIM8 + select STM32_HAVE_USART3 + select STM32_HAVE_USBDEV + +config ARCH_CHIP_STM32F303CC + bool "STM32F303CC" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_ADC3 + select STM32_HAVE_ADC4 + select STM32_HAVE_I2C2 + select STM32_HAVE_SPI2 + select STM32_HAVE_SPI3 + select STM32_HAVE_TIM4 + select STM32_HAVE_TIM8 + select STM32_HAVE_USART3 + select STM32_HAVE_USBDEV + +config ARCH_CHIP_STM32F303RB + bool "STM32F303RB" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_ADC3 + select STM32_HAVE_ADC4 + select STM32_HAVE_I2C2 + select STM32_HAVE_SPI2 + select STM32_HAVE_SPI3 + select STM32_HAVE_TIM4 + select STM32_HAVE_TIM8 + select STM32_HAVE_USART3 + select STM32_HAVE_UART4 + select STM32_HAVE_UART5 + select STM32_HAVE_USBDEV + +config ARCH_CHIP_STM32F303RC + bool "STM32F303RC" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_ADC3 + select STM32_HAVE_ADC4 + select STM32_HAVE_I2C2 + select STM32_HAVE_SPI2 + select STM32_HAVE_SPI3 + select STM32_HAVE_TIM4 + select STM32_HAVE_TIM8 + select STM32_HAVE_USART3 + select STM32_HAVE_UART4 + select STM32_HAVE_UART5 + select STM32_HAVE_USBDEV + +config ARCH_CHIP_STM32F303RD + bool "STM32F303RD" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_ADC3 + select STM32_HAVE_ADC4 + select STM32_HAVE_I2C2 + select STM32_HAVE_I2C3 + select STM32_HAVE_SPI2 + select STM32_HAVE_SPI3 + select STM32_HAVE_SPI4 + select STM32_HAVE_TIM4 + select STM32_HAVE_TIM8 + select STM32_HAVE_USART3 + select STM32_HAVE_UART4 + select STM32_HAVE_UART5 + select STM32_HAVE_USBDEV + +config ARCH_CHIP_STM32F303RE + bool "STM32F303RE" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_ADC3 + select STM32_HAVE_ADC4 + select STM32_HAVE_I2C2 + select STM32_HAVE_I2C3 + select STM32_HAVE_SPI2 + select STM32_HAVE_SPI3 + select STM32_HAVE_SPI4 + select STM32_HAVE_TIM4 + select STM32_HAVE_TIM8 + select STM32_HAVE_USART3 + select STM32_HAVE_UART4 + select STM32_HAVE_UART5 + select STM32_HAVE_USBDEV + +config ARCH_CHIP_STM32F303VB + bool "STM32F303VB" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_ADC3 + select STM32_HAVE_ADC4 + select STM32_HAVE_I2C2 + select STM32_HAVE_SPI2 + select STM32_HAVE_SPI3 + select STM32_HAVE_TIM4 + select STM32_HAVE_TIM8 + select STM32_HAVE_USART3 + select STM32_HAVE_UART4 + select STM32_HAVE_UART5 + select STM32_HAVE_USBDEV + +config ARCH_CHIP_STM32F303VC + bool "STM32F303VC" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_ADC3 + select STM32_HAVE_ADC4 + select STM32_HAVE_I2C2 + select STM32_HAVE_SPI2 + select STM32_HAVE_SPI3 + select STM32_HAVE_TIM4 + select STM32_HAVE_TIM8 + select STM32_HAVE_USART3 + select STM32_HAVE_UART4 + select STM32_HAVE_UART5 + select STM32_HAVE_USBDEV + +config ARCH_CHIP_STM32F303VD + bool "STM32F303VD" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_ADC3 + select STM32_HAVE_ADC4 + select STM32_HAVE_USART3 + +config ARCH_CHIP_STM32F303VE + bool "STM32F303VE" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_ADC3 + select STM32_HAVE_ADC4 + select STM32_HAVE_USART3 + +config ARCH_CHIP_STM32F303ZD + bool "STM32F303ZD" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_ADC3 + select STM32_HAVE_ADC4 + select STM32_HAVE_USART3 + +config ARCH_CHIP_STM32F303ZE + bool "STM32F303ZE" + select STM32_STM32F30XX + select STM32_STM32F303 + select STM32_HAVE_ADC3 + select STM32_HAVE_ADC4 + select STM32_HAVE_USART3 + +config ARCH_CHIP_STM32F334K4 + bool "STM32F334K4" + select STM32_STM32F33XX + +config ARCH_CHIP_STM32F334K6 + bool "STM32F334K6" + select STM32_STM32F33XX + +config ARCH_CHIP_STM32F334K8 + bool "STM32F334K8" + select STM32_STM32F33XX + +config ARCH_CHIP_STM32F334C4 + bool "STM32F334C4" + select STM32_STM32F33XX + +config ARCH_CHIP_STM32F334C6 + bool "STM32F334C6" + select STM32_STM32F33XX + +config ARCH_CHIP_STM32F334C8 + bool "STM32F334C8" + select STM32_STM32F33XX + +config ARCH_CHIP_STM32F334R4 + bool "STM32F334R4" + select STM32_STM32F33XX + +config ARCH_CHIP_STM32F334R6 + bool "STM32F334R6" + select STM32_STM32F33XX + +config ARCH_CHIP_STM32F334R8 + bool "STM32F334R8" + select STM32_STM32F33XX + +config ARCH_CHIP_STM32F372C8 + bool "STM32F372C8" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F372R8 + bool "STM32F372R8" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F372V8 + bool "STM32F372V8" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F372CB + bool "STM32F372CB" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F372RB + bool "STM32F372RB" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F372VB + bool "STM32F372VB" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F372CC + bool "STM32F372CC" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F372RC + bool "STM32F372RC" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F372VC + bool "STM32F372VC" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F373C8 + bool "STM32F373C8" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F373R8 + bool "STM32F373R8" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F373V8 + bool "STM32F373V8" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F373CB + bool "STM32F373CB" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F373RB + bool "STM32F373RB" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F373VB + bool "STM32F373VB" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F373CC + bool "STM32F373CC" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F373RC + bool "STM32F373RC" + select STM32_STM32F37XX + +config ARCH_CHIP_STM32F373VC + bool "STM32F373VC" + select STM32_STM32F37XX + +endchoice + +endif + +config STM32_STM32F30XX + bool + default n + select STM32_HAVE_DMA1 + select STM32_HAVE_DMA2 + select ARCH_CORTEXM4 + select ARCH_HAVE_FPU + select STM32_HAVE_I2C1 + select STM32_HAVE_SPI1 + select STM32_HAVE_SYSCFG + select STM32_HAVE_USART1 + select STM32_HAVE_USART2 + select STM32_HAVE_CAN1 + select STM32_HAVE_DAC1 + select STM32_HAVE_TIM1 + select STM32_HAVE_TIM2 + select STM32_HAVE_TIM3 + select STM32_HAVE_TIM6 + select STM32_HAVE_TIM15 + select STM32_HAVE_TIM16 + select STM32_HAVE_TIM17 + select STM32_HAVE_TSC + select STM32_HAVE_IP_AES_M3M4_V1 if STM32_HAVE_AES + select STM32_HAVE_IP_BBSRAM_M3M4_V1 + select STM32_HAVE_IP_BKP_M3M4_V1 + select STM32_HAVE_IP_CAN_BXCAN_M3M4_V1 + select STM32_HAVE_IP_CCM_M3M4_V1 if STM32_HAVE_CCM + select STM32_HAVE_IP_CRYPTO_M3M4_V1 + select STM32_HAVE_IP_DBGMCU_M3M4_V2 + select STM32_HAVE_IP_ADC_M3M4_V2 + select STM32_HAVE_COMMON_FOC + select STM32_HAVE_IP_DCMI_V1 + select STM32_HAVE_IP_DAC_M3M4_V1 + select STM32_HAVE_IP_DFUMODE_M3M4_V1 + select STM32_HAVE_IP_DMA_V1 + select STM32_HAVE_IP_DMA_V1_8CH + select STM32_HAVE_IP_EXTI_V1 + select STM32_HAVE_IP_ETHMAC_M3M4_V1 if STM32_HAVE_ETHMAC + select STM32_HAVE_IP_FLASH_M3M4_V1 + select STM32_HAVE_IP_FLASH_M3M4_F1F3 + select STM32_HAVE_IP_FMC_M3M4_V1 if STM32_HAVE_FMC + select STM32_HAVE_IP_FREERUN_M3M4_V1 + select STM32_HAVE_IP_FSMC_M3M4_V1 if STM32_HAVE_FSMC + select STM32_HAVE_IP_GPIO_M3M4_V1 + select STM32_HAVE_IP_HRTIM_M3M4_V1 if STM32_HAVE_HRTIM1 + select STM32_HAVE_IP_I2C_M3M4_V2 + select STM32_HAVE_IP_I2S_M3M4_V1 + select STM32_HAVE_IP_ONESHOT_M3M4_V1 + select STM32_HAVE_IP_PWR_M3M4_V1 + select STM32_HAVE_IP_RTC_M3M4_V1 + select STM32_HAVE_IP_RTCC_M3M4_V1 + select STM32_HAVE_RTC_MAGIC + select STM32_HAVE_RTC + select STM32_HAVE_CRC + select STM32_HAVE_PWR + select STM32_HAVE_IP_SDIO_M3M4_V1 + select STM32_HAVE_IP_SPI_V3 + select STM32_HAVE_IP_SYSCFG_M3M4_V1 + select STM32_HAVE_IP_TIMERS_M3M4_V2 + select STM32_HAVE_IP_UID_M3M4_V1 + select STM32_HAVE_IP_USART_V3 + select STM32_HAVE_IP_USBDEV_M3M4_V1 if STM32_HAVE_USBDEV + select STM32_HAVE_IP_USBFS_M3M4_V1 if STM32_HAVE_USBFS + select STM32_HAVE_IP_OTGFS_M3M4_V1 if STM32_HAVE_OTGFS + select STM32_HAVE_IP_WDG_M3M4_V1 + +config STM32_STM32F302 + bool + default n + select STM32_HAVE_ADC2 + select STM32_HAVE_I2C2 + select STM32_HAVE_SPI2 + select STM32_HAVE_SPI3 + select STM32_HAVE_TIM4 + select STM32_HAVE_USBDEV + +config STM32_STM32F303 + bool + default n + select STM32_HAVE_ADC2 + select STM32_HAVE_CCM + select STM32_HAVE_TIM7 + +config STM32_STM32F33XX + bool + default n + select STM32_HAVE_DMA1 + select STM32_HAVE_COMP + select STM32_HAVE_DMA2 + select ARCH_CORTEXM4 + select ARCH_HAVE_FPU + select STM32_HAVE_I2C1 + select STM32_HAVE_HRTIM1 + select STM32_HAVE_COMP2 + select STM32_HAVE_COMP4 + select STM32_HAVE_COMP6 + select STM32_HAVE_OPAMP2 + select STM32_HAVE_CCM + select STM32_HAVE_TIM1 + select STM32_HAVE_TIM2 + select STM32_HAVE_TIM6 + select STM32_HAVE_TIM7 + select STM32_HAVE_TIM15 + select STM32_HAVE_TIM16 + select STM32_HAVE_TIM17 + select STM32_HAVE_TSC + select STM32_HAVE_ADC2 + select STM32_HAVE_CAN1 + select STM32_HAVE_DAC1 + select STM32_HAVE_DAC2 + select STM32_HAVE_SPI1 + select STM32_HAVE_SYSCFG + select STM32_HAVE_USART2 + select STM32_HAVE_USART3 + select STM32_HAVE_IP_AES_M3M4_V1 if STM32_HAVE_AES + select STM32_HAVE_IP_BBSRAM_M3M4_V1 + select STM32_HAVE_IP_BKP_M3M4_V1 + select STM32_HAVE_IP_CAN_BXCAN_M3M4_V1 + select STM32_HAVE_IP_CCM_M3M4_V1 if STM32_HAVE_CCM + select STM32_HAVE_IP_CRYPTO_M3M4_V1 + select STM32_HAVE_IP_DBGMCU_M3M4_V2 + select STM32_HAVE_IP_ADC_M3M4_V2 + select STM32_HAVE_IP_COMP_M3M4_V1 + select STM32_HAVE_COMMON_FOC + select STM32_HAVE_IP_DCMI_V1 + select STM32_HAVE_IP_DAC_M3M4_V1 + select STM32_HAVE_IP_DFUMODE_M3M4_V1 + select STM32_HAVE_IP_DMA_V1 + select STM32_HAVE_IP_DMA_V1_8CH + select STM32_HAVE_IP_EXTI_V1 + select STM32_HAVE_IP_ETHMAC_M3M4_V1 if STM32_HAVE_ETHMAC + select STM32_HAVE_IP_FLASH_M3M4_V1 + select STM32_HAVE_IP_FLASH_M3M4_F1F3 + select STM32_HAVE_IP_FMC_M3M4_V1 if STM32_HAVE_FMC + select STM32_HAVE_IP_FREERUN_M3M4_V1 + select STM32_HAVE_IP_FSMC_M3M4_V1 if STM32_HAVE_FSMC + select STM32_HAVE_IP_GPIO_M3M4_V1 + select STM32_HAVE_IP_HRTIM_M3M4_V1 if STM32_HAVE_HRTIM1 + select STM32_HAVE_IP_I2C_M3M4_V2 + select STM32_HAVE_IP_I2S_M3M4_V1 + select STM32_HAVE_IP_ONESHOT_M3M4_V1 + select STM32_HAVE_IP_OPAMP_M3M4_V1 if STM32_HAVE_OPAMP1 || STM32_HAVE_OPAMP2 || STM32_HAVE_OPAMP3 || STM32_HAVE_OPAMP4 || STM32_HAVE_OPAMP5 || STM32_HAVE_OPAMP6 + select STM32_HAVE_IP_PWR_M3M4_V1 + select STM32_HAVE_IP_RTC_M3M4_V1 + select STM32_HAVE_IP_RTCC_M3M4_V1 + select STM32_HAVE_RTC_MAGIC + select STM32_HAVE_RTC + select STM32_HAVE_CRC + select STM32_HAVE_PWR + select STM32_HAVE_IP_SDIO_M3M4_V1 + select STM32_HAVE_IP_SPI_V3 + select STM32_HAVE_IP_SYSCFG_M3M4_V1 + select STM32_HAVE_IP_TIMERS_M3M4_V2 + select STM32_HAVE_IP_UID_M3M4_V1 + select STM32_HAVE_IP_USART_V3 + select STM32_HAVE_IP_USBDEV_M3M4_V1 if STM32_HAVE_USBDEV + select STM32_HAVE_IP_USBFS_M3M4_V1 if STM32_HAVE_USBFS + select STM32_HAVE_IP_OTGFS_M3M4_V1 if STM32_HAVE_OTGFS + select STM32_HAVE_IP_WDG_M3M4_V1 + +config STM32_STM32F37XX + bool + default n + select STM32_HAVE_DMA1 + select STM32_HAVE_DMA2 + select ARCH_CORTEXM4 + select ARCH_HAVE_FPU + select STM32_HAVE_I2C1 + select STM32_HAVE_SPI1 + select STM32_HAVE_SYSCFG + select STM32_HAVE_USBDEV + select STM32_HAVE_TIM2 + select STM32_HAVE_TIM3 + select STM32_HAVE_TIM4 + select STM32_HAVE_TIM5 + select STM32_HAVE_TIM6 + select STM32_HAVE_TIM7 + select STM32_HAVE_TIM15 + select STM32_HAVE_TIM16 + select STM32_HAVE_TIM17 + select STM32_HAVE_TSC + select STM32_HAVE_SDADC1 + select STM32_HAVE_SDADC2 + select STM32_HAVE_SDADC3 + select STM32_HAVE_CAN1 + select STM32_HAVE_DAC1 + select STM32_HAVE_DAC2 + select STM32_HAVE_I2C2 + select STM32_HAVE_SPI2 + select STM32_HAVE_SPI3 + select STM32_HAVE_USART3 + select STM32_HAVE_IP_AES_M3M4_V1 if STM32_HAVE_AES + select STM32_HAVE_IP_BBSRAM_M3M4_V1 + select STM32_HAVE_IP_BKP_M3M4_V1 + select STM32_HAVE_IP_CAN_BXCAN_M3M4_V1 + select STM32_HAVE_IP_CCM_M3M4_V1 if STM32_HAVE_CCM + select STM32_HAVE_IP_CRYPTO_M3M4_V1 + select STM32_HAVE_IP_TIMERS_M3M4_V1 + select STM32_HAVE_IP_ADC_M3M4_V1_BASIC + select STM32_HAVE_COMMON_FOC + select STM32_HAVE_IP_DCMI_V1 + select STM32_HAVE_IP_DAC_M3M4_V1 + select STM32_HAVE_IP_DFUMODE_M3M4_V1 + select STM32_HAVE_IP_DMA_V1 + select STM32_HAVE_IP_DMA_V1_8CH + select STM32_HAVE_IP_EXTI_V1 + select STM32_HAVE_IP_ETHMAC_M3M4_V1 if STM32_HAVE_ETHMAC + select STM32_HAVE_IP_FLASH_M3M4_V1 + select STM32_HAVE_IP_FLASH_M3M4_F1F3 + select STM32_HAVE_IP_FMC_M3M4_V1 if STM32_HAVE_FMC + select STM32_HAVE_IP_FREERUN_M3M4_V1 + select STM32_HAVE_IP_FSMC_M3M4_V1 if STM32_HAVE_FSMC + select STM32_HAVE_IP_GPIO_M3M4_V1 + select STM32_HAVE_IP_HRTIM_M3M4_V1 if STM32_HAVE_HRTIM1 + select STM32_HAVE_IP_I2C_M3M4_V2 + select STM32_HAVE_IP_I2S_M3M4_V1 + select STM32_HAVE_IP_ONESHOT_M3M4_V1 + select STM32_HAVE_IP_PWR_M3M4_V1 + select STM32_HAVE_IP_RTC_M3M4_V1 + select STM32_HAVE_IP_RTCC_M3M4_V1 + select STM32_HAVE_RTC_MAGIC + select STM32_HAVE_RTC + select STM32_HAVE_CRC + select STM32_HAVE_PWR + select STM32_HAVE_IP_SDADC_M3M4_V1 + select STM32_HAVE_IP_SDIO_M3M4_V1 + select STM32_HAVE_IP_SPI_V3 + select STM32_HAVE_IP_SYSCFG_M3M4_V1 + select STM32_HAVE_IP_UID_M3M4_V1 + select STM32_HAVE_IP_USART_V3 + select STM32_HAVE_IP_USBDEV_M3M4_V1 if STM32_HAVE_USBDEV + select STM32_HAVE_IP_USBFS_M3M4_V1 if STM32_HAVE_USBFS + select STM32_HAVE_IP_OTGFS_M3M4_V1 if STM32_HAVE_OTGFS + select STM32_HAVE_IP_WDG_M3M4_V1 diff --git a/arch/arm/src/stm32f3/Make.defs b/arch/arm/src/stm32f3/Make.defs new file mode 100644 index 00000000000..e847b60c007 --- /dev/null +++ b/arch/arm/src/stm32f3/Make.defs @@ -0,0 +1,27 @@ +############################################################################ +# arch/arm/src/stm32f3/Make.defs +# +# SPDX-License-Identifier: Apache-2.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. +# +############################################################################ + +include armv7-m/Make.defs + +CHIP_CSRCS = stm32_rcc.c + +include common/stm32/Make.defs diff --git a/arch/arm/src/stm32f3/chip.h b/arch/arm/src/stm32f3/chip.h new file mode 100644 index 00000000000..c3961139c12 --- /dev/null +++ b/arch/arm/src/stm32f3/chip.h @@ -0,0 +1,59 @@ +/**************************************************************************** + * arch/arm/src/stm32f3/chip.h + * + * SPDX-License-Identifier: Apache-2.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. + * + ****************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F3_CHIP_H +#define __ARCH_ARM_SRC_STM32F3_CHIP_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/* Include the chip capabilities file */ + +#include + +/* Include the chip interrupt definition file */ + +#include + +/* Include the chip memory map */ + +#include "hardware/stm32_memorymap.h" + +/* Include the chip pinmap */ + +#include "hardware/stm32_pinmap.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Provide the required number of peripheral interrupt vector + * definitions as * well. The definition STM32_IRQ_NEXTINTS simply comes + * from the chip-specific * IRQ header file included by arch/stm32/irq.h. + */ + +#define ARMV7M_PERIPHERAL_INTERRUPTS STM32_IRQ_NEXTINTS + +#endif /* __ARCH_ARM_SRC_STM32F3_CHIP_H */ diff --git a/arch/arm/src/stm32f3/hardware/stm32_memorymap.h b/arch/arm/src/stm32f3/hardware/stm32_memorymap.h new file mode 100644 index 00000000000..475cd8800a3 --- /dev/null +++ b/arch/arm/src/stm32f3/hardware/stm32_memorymap.h @@ -0,0 +1,27 @@ +/**************************************************************************** + * arch/arm/src/stm32f3/hardware/stm32_memorymap.h + * + * SPDX-License-Identifier: Apache-2.0 + * + ****************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F3_HARDWARE_STM32_MEMORYMAP_H +#define __ARCH_ARM_SRC_STM32F3_HARDWARE_STM32_MEMORYMAP_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#if defined(CONFIG_STM32_STM32F30XX) +# include "hardware/stm32f30xxx_memorymap.h" +#elif defined(CONFIG_STM32_STM32F33XX) +# include "hardware/stm32f33xxx_memorymap.h" +#elif defined(CONFIG_STM32_STM32F37XX) +# include "hardware/stm32f37xxx_memorymap.h" +#else +# error "Unsupported STM32F3 memory map" +#endif + +#endif /* __ARCH_ARM_SRC_STM32F3_HARDWARE_STM32_MEMORYMAP_H */ diff --git a/arch/arm/src/stm32f3/hardware/stm32_pinmap.h b/arch/arm/src/stm32f3/hardware/stm32_pinmap.h new file mode 100644 index 00000000000..35a22b56009 --- /dev/null +++ b/arch/arm/src/stm32f3/hardware/stm32_pinmap.h @@ -0,0 +1,27 @@ +/**************************************************************************** + * arch/arm/src/stm32f3/hardware/stm32_pinmap.h + * + * SPDX-License-Identifier: Apache-2.0 + * + ****************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F3_HARDWARE_STM32_PINMAP_H +#define __ARCH_ARM_SRC_STM32F3_HARDWARE_STM32_PINMAP_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#if defined(CONFIG_STM32_STM32F30XX) +# include "hardware/stm32f30xxx_pinmap.h" +#elif defined(CONFIG_STM32_STM32F33XX) +# include "hardware/stm32f33xxx_pinmap.h" +#elif defined(CONFIG_STM32_STM32F37XX) +# include "hardware/stm32f37xxx_pinmap.h" +#else +# error "Unsupported STM32F3 pin map" +#endif + +#endif /* __ARCH_ARM_SRC_STM32F3_HARDWARE_STM32_PINMAP_H */ diff --git a/arch/arm/src/stm32/hardware/stm32f30xxx_gpio.h b/arch/arm/src/stm32f3/hardware/stm32f30xxx_gpio.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f30xxx_gpio.h rename to arch/arm/src/stm32f3/hardware/stm32f30xxx_gpio.h index 47087489a38..247900fd222 100644 --- a/arch/arm/src/stm32/hardware/stm32f30xxx_gpio.h +++ b/arch/arm/src/stm32f3/hardware/stm32f30xxx_gpio.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f30xxx_gpio.h + * arch/arm/src/stm32f3/hardware/stm32f30xxx_gpio.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f30xxx_memorymap.h b/arch/arm/src/stm32f3/hardware/stm32f30xxx_memorymap.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f30xxx_memorymap.h rename to arch/arm/src/stm32f3/hardware/stm32f30xxx_memorymap.h index 23667f3b7c9..9471911d8c4 100644 --- a/arch/arm/src/stm32/hardware/stm32f30xxx_memorymap.h +++ b/arch/arm/src/stm32f3/hardware/stm32f30xxx_memorymap.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f30xxx_memorymap.h + * arch/arm/src/stm32f3/hardware/stm32f30xxx_memorymap.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f30xxx_pinmap.h b/arch/arm/src/stm32f3/hardware/stm32f30xxx_pinmap.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f30xxx_pinmap.h rename to arch/arm/src/stm32f3/hardware/stm32f30xxx_pinmap.h index d92b45de89a..02c86632c64 100644 --- a/arch/arm/src/stm32/hardware/stm32f30xxx_pinmap.h +++ b/arch/arm/src/stm32f3/hardware/stm32f30xxx_pinmap.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f30xxx_pinmap.h + * arch/arm/src/stm32f3/hardware/stm32f30xxx_pinmap.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f30xxx_rcc.h b/arch/arm/src/stm32f3/hardware/stm32f30xxx_rcc.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f30xxx_rcc.h rename to arch/arm/src/stm32f3/hardware/stm32f30xxx_rcc.h index 9d86d13a704..10d8c30c617 100644 --- a/arch/arm/src/stm32/hardware/stm32f30xxx_rcc.h +++ b/arch/arm/src/stm32f3/hardware/stm32f30xxx_rcc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f30xxx_rcc.h + * arch/arm/src/stm32f3/hardware/stm32f30xxx_rcc.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f30xxx_syscfg.h b/arch/arm/src/stm32f3/hardware/stm32f30xxx_syscfg.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f30xxx_syscfg.h rename to arch/arm/src/stm32f3/hardware/stm32f30xxx_syscfg.h index 74900826244..e9fa174e4e7 100644 --- a/arch/arm/src/stm32/hardware/stm32f30xxx_syscfg.h +++ b/arch/arm/src/stm32f3/hardware/stm32f30xxx_syscfg.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f30xxx_syscfg.h + * arch/arm/src/stm32f3/hardware/stm32f30xxx_syscfg.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_comp.h b/arch/arm/src/stm32f3/hardware/stm32f33xxx_comp.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f33xxx_comp.h rename to arch/arm/src/stm32f3/hardware/stm32f33xxx_comp.h index d12e43317d5..0cc9a568c7b 100644 --- a/arch/arm/src/stm32/hardware/stm32f33xxx_comp.h +++ b/arch/arm/src/stm32f3/hardware/stm32f33xxx_comp.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f33xxx_comp.h + * arch/arm/src/stm32f3/hardware/stm32f33xxx_comp.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_hrtim.h b/arch/arm/src/stm32f3/hardware/stm32f33xxx_hrtim.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f33xxx_hrtim.h rename to arch/arm/src/stm32f3/hardware/stm32f33xxx_hrtim.h index 7c6ff331f9a..94480b13875 100644 --- a/arch/arm/src/stm32/hardware/stm32f33xxx_hrtim.h +++ b/arch/arm/src/stm32f3/hardware/stm32f33xxx_hrtim.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f33xxx_hrtim.h + * arch/arm/src/stm32f3/hardware/stm32f33xxx_hrtim.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_memorymap.h b/arch/arm/src/stm32f3/hardware/stm32f33xxx_memorymap.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f33xxx_memorymap.h rename to arch/arm/src/stm32f3/hardware/stm32f33xxx_memorymap.h index eb59aba7e21..ce0e3889d20 100644 --- a/arch/arm/src/stm32/hardware/stm32f33xxx_memorymap.h +++ b/arch/arm/src/stm32f3/hardware/stm32f33xxx_memorymap.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f33xxx_memorymap.h + * arch/arm/src/stm32f3/hardware/stm32f33xxx_memorymap.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_opamp.h b/arch/arm/src/stm32f3/hardware/stm32f33xxx_opamp.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f33xxx_opamp.h rename to arch/arm/src/stm32f3/hardware/stm32f33xxx_opamp.h index 3235866bcee..a2a1a269b96 100644 --- a/arch/arm/src/stm32/hardware/stm32f33xxx_opamp.h +++ b/arch/arm/src/stm32f3/hardware/stm32f33xxx_opamp.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f33xxx_opamp.h + * arch/arm/src/stm32f3/hardware/stm32f33xxx_opamp.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_pinmap.h b/arch/arm/src/stm32f3/hardware/stm32f33xxx_pinmap.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f33xxx_pinmap.h rename to arch/arm/src/stm32f3/hardware/stm32f33xxx_pinmap.h index 629efe26b24..d26376e3af5 100644 --- a/arch/arm/src/stm32/hardware/stm32f33xxx_pinmap.h +++ b/arch/arm/src/stm32f3/hardware/stm32f33xxx_pinmap.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f33xxx_pinmap.h + * arch/arm/src/stm32f3/hardware/stm32f33xxx_pinmap.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_rcc.h b/arch/arm/src/stm32f3/hardware/stm32f33xxx_rcc.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f33xxx_rcc.h rename to arch/arm/src/stm32f3/hardware/stm32f33xxx_rcc.h index 1e26281fb43..05348c760ec 100644 --- a/arch/arm/src/stm32/hardware/stm32f33xxx_rcc.h +++ b/arch/arm/src/stm32f3/hardware/stm32f33xxx_rcc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f33xxx_rcc.h + * arch/arm/src/stm32f3/hardware/stm32f33xxx_rcc.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f33xxx_syscfg.h b/arch/arm/src/stm32f3/hardware/stm32f33xxx_syscfg.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f33xxx_syscfg.h rename to arch/arm/src/stm32f3/hardware/stm32f33xxx_syscfg.h index 5c3764b2d4d..a3270a48b35 100644 --- a/arch/arm/src/stm32/hardware/stm32f33xxx_syscfg.h +++ b/arch/arm/src/stm32f3/hardware/stm32f33xxx_syscfg.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f33xxx_syscfg.h + * arch/arm/src/stm32f3/hardware/stm32f33xxx_syscfg.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f37xxx_memorymap.h b/arch/arm/src/stm32f3/hardware/stm32f37xxx_memorymap.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f37xxx_memorymap.h rename to arch/arm/src/stm32f3/hardware/stm32f37xxx_memorymap.h index fd05c2477b9..26baaf49cd4 100644 --- a/arch/arm/src/stm32/hardware/stm32f37xxx_memorymap.h +++ b/arch/arm/src/stm32f3/hardware/stm32f37xxx_memorymap.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f37xxx_memorymap.h + * arch/arm/src/stm32f3/hardware/stm32f37xxx_memorymap.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f37xxx_pinmap.h b/arch/arm/src/stm32f3/hardware/stm32f37xxx_pinmap.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f37xxx_pinmap.h rename to arch/arm/src/stm32f3/hardware/stm32f37xxx_pinmap.h index f830d6868dc..f26a6c33f29 100644 --- a/arch/arm/src/stm32/hardware/stm32f37xxx_pinmap.h +++ b/arch/arm/src/stm32f3/hardware/stm32f37xxx_pinmap.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f37xxx_pinmap.h + * arch/arm/src/stm32f3/hardware/stm32f37xxx_pinmap.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f37xxx_rcc.h b/arch/arm/src/stm32f3/hardware/stm32f37xxx_rcc.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f37xxx_rcc.h rename to arch/arm/src/stm32f3/hardware/stm32f37xxx_rcc.h index a0f658aa6d7..ef555856d7c 100644 --- a/arch/arm/src/stm32/hardware/stm32f37xxx_rcc.h +++ b/arch/arm/src/stm32f3/hardware/stm32f37xxx_rcc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f37xxx_rcc.h + * arch/arm/src/stm32f3/hardware/stm32f37xxx_rcc.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/hardware/stm32f37xxx_sdadc.h b/arch/arm/src/stm32f3/hardware/stm32f37xxx_sdadc.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f37xxx_sdadc.h rename to arch/arm/src/stm32f3/hardware/stm32f37xxx_sdadc.h index f7514129502..908ccda789f 100644 --- a/arch/arm/src/stm32/hardware/stm32f37xxx_sdadc.h +++ b/arch/arm/src/stm32f3/hardware/stm32f37xxx_sdadc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f37xxx_sdadc.h + * arch/arm/src/stm32f3/hardware/stm32f37xxx_sdadc.h * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2016 Studelec SA. All rights reserved. diff --git a/arch/arm/src/stm32/hardware/stm32f37xxx_syscfg.h b/arch/arm/src/stm32f3/hardware/stm32f37xxx_syscfg.h similarity index 99% rename from arch/arm/src/stm32/hardware/stm32f37xxx_syscfg.h rename to arch/arm/src/stm32f3/hardware/stm32f37xxx_syscfg.h index 6849a95cbb6..d6a72647148 100644 --- a/arch/arm/src/stm32/hardware/stm32f37xxx_syscfg.h +++ b/arch/arm/src/stm32f3/hardware/stm32f37xxx_syscfg.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/hardware/stm32f37xxx_syscfg.h + * arch/arm/src/stm32f3/hardware/stm32f37xxx_syscfg.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32f3/stm32.h b/arch/arm/src/stm32f3/stm32.h new file mode 100644 index 00000000000..f7eb0f45c81 --- /dev/null +++ b/arch/arm/src/stm32f3/stm32.h @@ -0,0 +1,69 @@ +/**************************************************************************** + * arch/arm/src/stm32f3/stm32.h + * + * SPDX-License-Identifier: Apache-2.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. + * + ****************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32_STM32_H +#define __ARCH_ARM_SRC_STM32_STM32_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include +#include + +#include "arm_internal.h" + +/* Peripherals **************************************************************/ + +#include "chip.h" +#include "stm32_adc.h" +#include "stm32_can.h" +#include "stm32_comp.h" +#include "stm32_dbgmcu.h" +#include "stm32_dma.h" +#include "stm32_dac_m3m4_v1.h" +#include "stm32_exti.h" +#include "stm32_flash.h" +#include "stm32_fmc_m3m4_v1.h" +#include "stm32_fsmc_m3m4_v1.h" +#include "stm32_gpio.h" +#include "stm32_i2c.h" +#include "stm32_ltdc_m3m4_v1.h" +#include "stm32_opamp_m3m4_v1.h" +#include "stm32_pwr.h" +#include "stm32_rcc.h" +#include "stm32_rtc.h" +#include "stm32_sdio_m3m4_v1.h" +#include "stm32_spi.h" +#include "stm32_i2s.h" +#include "stm32_tim.h" +#include "stm32_uart.h" +#if defined(CONFIG_USBDEV) && defined(CONFIG_STM32_USB) +# include "stm32_usbdev.h" +#endif +#include "stm32_wdg.h" +#include "stm32_lowputc.h" +#include "stm32_eth_m3m4_v1.h" + +#endif /* __ARCH_ARM_SRC_STM32_STM32_H */ diff --git a/arch/arm/src/stm32/stm32_rcc.c b/arch/arm/src/stm32f3/stm32_rcc.c similarity index 93% rename from arch/arm/src/stm32/stm32_rcc.c rename to arch/arm/src/stm32f3/stm32_rcc.c index 5d1c3715b6a..32d4bbca0f3 100644 --- a/arch/arm/src/stm32/stm32_rcc.c +++ b/arch/arm/src/stm32f3/stm32_rcc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/stm32_rcc.c + * arch/arm/src/stm32f3/stm32_rcc.c * * SPDX-License-Identifier: Apache-2.0 * @@ -62,24 +62,14 @@ static_assert(CONFIG_BOARD_LOOPSPERMSEC != -1, /* Include chip-specific clocking initialization logic */ -#if defined(CONFIG_STM32_STM32L15XX) -# include "stm32l15xxx_rcc.c" -#elif defined(CONFIG_STM32_STM32F10XX) -# include "stm32f10xxx_rcc.c" -#elif defined(CONFIG_STM32_STM32F20XX) -# include "stm32f20xxx_rcc.c" -#elif defined(CONFIG_STM32_STM32F30XX) +#if defined(CONFIG_STM32_STM32F30XX) # include "stm32f30xxx_rcc.c" #elif defined(CONFIG_STM32_STM32F33XX) # include "stm32f33xxx_rcc.c" #elif defined(CONFIG_STM32_STM32F37XX) # include "stm32f37xxx_rcc.c" -#elif defined(CONFIG_STM32_STM32F4XXX) -# include "stm32f40xxx_rcc.c" -#elif defined(CONFIG_STM32_STM32G4XXX) -# include "stm32g4xxxx_rcc.c" #else -# error "Unsupported STM32 chip" +# error "Unsupported STM32F3 chip" #endif /**************************************************************************** diff --git a/arch/arm/src/stm32/stm32f30xxx_rcc.c b/arch/arm/src/stm32f3/stm32f30xxx_rcc.c similarity index 99% rename from arch/arm/src/stm32/stm32f30xxx_rcc.c rename to arch/arm/src/stm32f3/stm32f30xxx_rcc.c index 8c0f606c765..79eeff67e83 100644 --- a/arch/arm/src/stm32/stm32f30xxx_rcc.c +++ b/arch/arm/src/stm32f3/stm32f30xxx_rcc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/stm32f30xxx_rcc.c + * arch/arm/src/stm32f3/stm32f30xxx_rcc.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/stm32f33xxx_rcc.c b/arch/arm/src/stm32f3/stm32f33xxx_rcc.c similarity index 99% rename from arch/arm/src/stm32/stm32f33xxx_rcc.c rename to arch/arm/src/stm32f3/stm32f33xxx_rcc.c index bf3edc07275..d55f756b53b 100644 --- a/arch/arm/src/stm32/stm32f33xxx_rcc.c +++ b/arch/arm/src/stm32f3/stm32f33xxx_rcc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/stm32f33xxx_rcc.c + * arch/arm/src/stm32f3/stm32f33xxx_rcc.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/arch/arm/src/stm32/stm32f37xxx_rcc.c b/arch/arm/src/stm32f3/stm32f37xxx_rcc.c similarity index 99% rename from arch/arm/src/stm32/stm32f37xxx_rcc.c rename to arch/arm/src/stm32f3/stm32f37xxx_rcc.c index 6c8a157a48e..c640835f696 100644 --- a/arch/arm/src/stm32/stm32f37xxx_rcc.c +++ b/arch/arm/src/stm32f3/stm32f37xxx_rcc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/stm32/stm32f37xxx_rcc.c + * arch/arm/src/stm32f3/stm32f37xxx_rcc.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32f3/common/CMakeLists.txt b/boards/arm/stm32f3/common/CMakeLists.txt new file mode 100644 index 00000000000..793d06cc009 --- /dev/null +++ b/boards/arm/stm32f3/common/CMakeLists.txt @@ -0,0 +1,25 @@ +# ############################################################################## +# boards/arm/stm32f3/common/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.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. +# +# ############################################################################## + +if(CONFIG_ARCH_BOARD_COMMON) + add_subdirectory(${NUTTX_DIR}/boards/arm/common/stm32 stm32_common) +endif() diff --git a/boards/arm/stm32f3/common/Kconfig b/boards/arm/stm32f3/common/Kconfig new file mode 100644 index 00000000000..5c48f62a025 --- /dev/null +++ b/boards/arm/stm32f3/common/Kconfig @@ -0,0 +1,6 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +source "boards/arm/common/stm32/Kconfig" diff --git a/boards/arm/stm32f3/common/Makefile b/boards/arm/stm32f3/common/Makefile new file mode 100644 index 00000000000..c4aa92e0a7f --- /dev/null +++ b/boards/arm/stm32f3/common/Makefile @@ -0,0 +1,38 @@ +############################################################################# +# boards/arm/stm32f3/common/Makefile +# +# SPDX-License-Identifier: Apache-2.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. +# +############################################################################# + +include $(TOPDIR)/Make.defs + +STM32_BOARD_COMMON_DIR := $(TOPDIR)$(DELIM)boards$(DELIM)arm$(DELIM)common$(DELIM)stm32 +STM32_COMMON_SRCDIR := $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)common$(DELIM)stm32 + +include board/Make.defs +include $(STM32_BOARD_COMMON_DIR)$(DELIM)src$(DELIM)Make.defs + +DEPPATH += --dep-path board + +include $(TOPDIR)/boards/Board.mk + +ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src +BOARDDIR = $(ARCHSRCDIR)$(DELIM)board +CFLAGS += ${INCDIR_PREFIX}$(BOARDDIR)$(DELIM)include +CFLAGS += ${INCDIR_PREFIX}$(STM32_COMMON_SRCDIR) diff --git a/boards/arm/stm32f3/nucleo-f302r8/CMakeLists.txt b/boards/arm/stm32f3/nucleo-f302r8/CMakeLists.txt new file mode 100644 index 00000000000..d777a964b18 --- /dev/null +++ b/boards/arm/stm32f3/nucleo-f302r8/CMakeLists.txt @@ -0,0 +1,23 @@ +# ############################################################################## +# boards/arm/stm32f3/nucleo-f302r8/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.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. +# +# ############################################################################## + +add_subdirectory(src) diff --git a/boards/arm/stm32/nucleo-f302r8/Kconfig b/boards/arm/stm32f3/nucleo-f302r8/Kconfig similarity index 100% rename from boards/arm/stm32/nucleo-f302r8/Kconfig rename to boards/arm/stm32f3/nucleo-f302r8/Kconfig diff --git a/boards/arm/stm32/nucleo-f302r8/configs/can/defconfig b/boards/arm/stm32f3/nucleo-f302r8/configs/can/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/configs/can/defconfig rename to boards/arm/stm32f3/nucleo-f302r8/configs/can/defconfig index d9e63f0503d..5e2a50cea1a 100644 --- a/boards/arm/stm32/nucleo-f302r8/configs/can/defconfig +++ b/boards/arm/stm32f3/nucleo-f302r8/configs/can/defconfig @@ -9,7 +9,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f302r8" CONFIG_ARCH_BOARD_NUCLEO_F302R8=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F302R8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f302r8/configs/cansock/defconfig b/boards/arm/stm32f3/nucleo-f302r8/configs/cansock/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/configs/cansock/defconfig rename to boards/arm/stm32f3/nucleo-f302r8/configs/cansock/defconfig index a7d8a70986e..de7101c186d 100644 --- a/boards/arm/stm32/nucleo-f302r8/configs/cansock/defconfig +++ b/boards/arm/stm32f3/nucleo-f302r8/configs/cansock/defconfig @@ -13,7 +13,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f302r8" CONFIG_ARCH_BOARD_NUCLEO_F302R8=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F302R8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f302r8/configs/highpri/defconfig b/boards/arm/stm32f3/nucleo-f302r8/configs/highpri/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/configs/highpri/defconfig rename to boards/arm/stm32f3/nucleo-f302r8/configs/highpri/defconfig index 591de57c991..f415d6e0fc5 100644 --- a/boards/arm/stm32/nucleo-f302r8/configs/highpri/defconfig +++ b/boards/arm/stm32f3/nucleo-f302r8/configs/highpri/defconfig @@ -9,7 +9,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f302r8" CONFIG_ARCH_BOARD_NUCLEO_F302R8=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F302R8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_b16/defconfig b/boards/arm/stm32f3/nucleo-f302r8/configs/ihm07m1_b16/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_b16/defconfig rename to boards/arm/stm32f3/nucleo-f302r8/configs/ihm07m1_b16/defconfig index 3c84735698b..b0a78520cab 100644 --- a/boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_b16/defconfig +++ b/boards/arm/stm32f3/nucleo-f302r8/configs/ihm07m1_b16/defconfig @@ -15,7 +15,7 @@ CONFIG_ARCH_BOARD="nucleo-f302r8" CONFIG_ARCH_BOARD_COMMON=y CONFIG_ARCH_BOARD_NUCLEO_F302R8=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F302R8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_f32/defconfig b/boards/arm/stm32f3/nucleo-f302r8/configs/ihm07m1_f32/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_f32/defconfig rename to boards/arm/stm32f3/nucleo-f302r8/configs/ihm07m1_f32/defconfig index e51931b5d9e..4f71addaafc 100644 --- a/boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_f32/defconfig +++ b/boards/arm/stm32f3/nucleo-f302r8/configs/ihm07m1_f32/defconfig @@ -15,7 +15,7 @@ CONFIG_ARCH_BOARD="nucleo-f302r8" CONFIG_ARCH_BOARD_COMMON=y CONFIG_ARCH_BOARD_NUCLEO_F302R8=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F302R8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f302r8/configs/nsh/defconfig b/boards/arm/stm32f3/nucleo-f302r8/configs/nsh/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/configs/nsh/defconfig rename to boards/arm/stm32f3/nucleo-f302r8/configs/nsh/defconfig index 0e3692e647d..7363a11f42d 100644 --- a/boards/arm/stm32/nucleo-f302r8/configs/nsh/defconfig +++ b/boards/arm/stm32f3/nucleo-f302r8/configs/nsh/defconfig @@ -11,7 +11,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f302r8" CONFIG_ARCH_BOARD_NUCLEO_F302R8=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F302R8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f302r8/configs/qenco/defconfig b/boards/arm/stm32f3/nucleo-f302r8/configs/qenco/defconfig similarity index 99% rename from boards/arm/stm32/nucleo-f302r8/configs/qenco/defconfig rename to boards/arm/stm32f3/nucleo-f302r8/configs/qenco/defconfig index a63d93c717a..f8824d58450 100644 --- a/boards/arm/stm32/nucleo-f302r8/configs/qenco/defconfig +++ b/boards/arm/stm32f3/nucleo-f302r8/configs/qenco/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_BOARD="nucleo-f302r8" CONFIG_ARCH_BOARD_COMMON=y CONFIG_ARCH_BOARD_NUCLEO_F302R8=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F302R8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f302r8/include/board.h b/boards/arm/stm32f3/nucleo-f302r8/include/board.h similarity index 99% rename from boards/arm/stm32/nucleo-f302r8/include/board.h rename to boards/arm/stm32f3/nucleo-f302r8/include/board.h index 21d24f4b50e..14529925ce3 100644 --- a/boards/arm/stm32/nucleo-f302r8/include/board.h +++ b/boards/arm/stm32f3/nucleo-f302r8/include/board.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/include/board.h + * boards/arm/stm32f3/nucleo-f302r8/include/board.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32f3/nucleo-f302r8/scripts/Make.defs b/boards/arm/stm32f3/nucleo-f302r8/scripts/Make.defs new file mode 100644 index 00000000000..32cfbf27178 --- /dev/null +++ b/boards/arm/stm32f3/nucleo-f302r8/scripts/Make.defs @@ -0,0 +1,41 @@ +############################################################################ +# boards/arm/stm32f3/nucleo-f302r8/scripts/Make.defs +# +# SPDX-License-Identifier: Apache-2.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. +# +############################################################################ + +include $(TOPDIR)/.config +include $(TOPDIR)/tools/Config.mk +include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs + +LDSCRIPT = ld.script +ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) + +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +AFLAGS := $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 diff --git a/boards/arm/stm32/nucleo-f302r8/scripts/ld.script b/boards/arm/stm32f3/nucleo-f302r8/scripts/ld.script similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/scripts/ld.script rename to boards/arm/stm32f3/nucleo-f302r8/scripts/ld.script index cde87e144cb..a5bad8b6dac 100644 --- a/boards/arm/stm32/nucleo-f302r8/scripts/ld.script +++ b/boards/arm/stm32f3/nucleo-f302r8/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/scripts/ld.script + * boards/arm/stm32f3/nucleo-f302r8/scripts/ld.script * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt b/boards/arm/stm32f3/nucleo-f302r8/src/CMakeLists.txt similarity index 97% rename from boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt rename to boards/arm/stm32f3/nucleo-f302r8/src/CMakeLists.txt index e5e905b763f..d2e1166c77e 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt +++ b/boards/arm/stm32f3/nucleo-f302r8/src/CMakeLists.txt @@ -1,5 +1,5 @@ # ############################################################################## -# boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt +# boards/arm/stm32f3/nucleo-f302r8/src/CMakeLists.txt # # SPDX-License-Identifier: Apache-2.0 # diff --git a/boards/arm/stm32/nucleo-f302r8/src/Make.defs b/boards/arm/stm32f3/nucleo-f302r8/src/Make.defs similarity index 97% rename from boards/arm/stm32/nucleo-f302r8/src/Make.defs rename to boards/arm/stm32f3/nucleo-f302r8/src/Make.defs index 7c9ce0e0b1f..4b4fc883e98 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/Make.defs +++ b/boards/arm/stm32f3/nucleo-f302r8/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# boards/arm/stm32/nucleo-f302r8/src/Make.defs +# boards/arm/stm32f3/nucleo-f302r8/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # diff --git a/boards/arm/stm32/nucleo-f302r8/src/nucleo-f302r8.h b/boards/arm/stm32f3/nucleo-f302r8/src/nucleo-f302r8.h similarity index 99% rename from boards/arm/stm32/nucleo-f302r8/src/nucleo-f302r8.h rename to boards/arm/stm32f3/nucleo-f302r8/src/nucleo-f302r8.h index 6c3c83d04a0..f38dbe2ed28 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/nucleo-f302r8.h +++ b/boards/arm/stm32f3/nucleo-f302r8/src/nucleo-f302r8.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/nucleo-f302r8.h + * boards/arm/stm32f3/nucleo-f302r8/src/nucleo-f302r8.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_adc.c b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_adc.c similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/src/stm32_adc.c rename to boards/arm/stm32f3/nucleo-f302r8/src/stm32_adc.c index f4ec3e6b317..b4aed937ec9 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_adc.c +++ b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_adc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/stm32_adc.c + * boards/arm/stm32f3/nucleo-f302r8/src/stm32_adc.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_autoleds.c b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_autoleds.c similarity index 97% rename from boards/arm/stm32/nucleo-f302r8/src/stm32_autoleds.c rename to boards/arm/stm32f3/nucleo-f302r8/src/stm32_autoleds.c index 0175408b561..16b52f1961f 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_autoleds.c +++ b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_autoleds.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/stm32_autoleds.c + * boards/arm/stm32f3/nucleo-f302r8/src/stm32_autoleds.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_boot.c b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_boot.c similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/src/stm32_boot.c rename to boards/arm/stm32f3/nucleo-f302r8/src/stm32_boot.c index 36c4aa9905c..58c14e31836 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_boot.c +++ b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_boot.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/stm32_boot.c + * boards/arm/stm32f3/nucleo-f302r8/src/stm32_boot.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_bringup.c b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_bringup.c similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/src/stm32_bringup.c rename to boards/arm/stm32f3/nucleo-f302r8/src/stm32_bringup.c index 4a878d66e05..ddf259cacf7 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_bringup.c +++ b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_bringup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/stm32_bringup.c + * boards/arm/stm32f3/nucleo-f302r8/src/stm32_bringup.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_buttons.c b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_buttons.c similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/src/stm32_buttons.c rename to boards/arm/stm32f3/nucleo-f302r8/src/stm32_buttons.c index 581c45bda8e..718b549d346 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_buttons.c +++ b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_buttons.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/stm32_buttons.c + * boards/arm/stm32f3/nucleo-f302r8/src/stm32_buttons.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_can.c b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_can.c similarity index 97% rename from boards/arm/stm32/nucleo-f302r8/src/stm32_can.c rename to boards/arm/stm32f3/nucleo-f302r8/src/stm32_can.c index 3fae10a1a6a..c75d14627c2 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_can.c +++ b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_can.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/stm32_can.c + * boards/arm/stm32f3/nucleo-f302r8/src/stm32_can.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_cansock.c b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_cansock.c similarity index 97% rename from boards/arm/stm32/nucleo-f302r8/src/stm32_cansock.c rename to boards/arm/stm32f3/nucleo-f302r8/src/stm32_cansock.c index 7ccf0ad686b..6a7ed672f30 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_cansock.c +++ b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_cansock.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/stm32_cansock.c + * boards/arm/stm32f3/nucleo-f302r8/src/stm32_cansock.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_foc_ihm07m1.c similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c rename to boards/arm/stm32f3/nucleo-f302r8/src/stm32_foc_ihm07m1.c index 3d061622c90..b06c6378f9d 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c +++ b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_foc_ihm07m1.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c + * boards/arm/stm32f3/nucleo-f302r8/src/stm32_foc_ihm07m1.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_highpri.c similarity index 99% rename from boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c rename to boards/arm/stm32f3/nucleo-f302r8/src/stm32_highpri.c index a7775f2b0ec..2882d646db1 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c +++ b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_highpri.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/stm32_highpri.c + * boards/arm/stm32f3/nucleo-f302r8/src/stm32_highpri.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_pwm.c b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_pwm.c similarity index 98% rename from boards/arm/stm32/nucleo-f302r8/src/stm32_pwm.c rename to boards/arm/stm32f3/nucleo-f302r8/src/stm32_pwm.c index 49997999a1c..3270dce669b 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_pwm.c +++ b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_pwm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/stm32_pwm.c + * boards/arm/stm32f3/nucleo-f302r8/src/stm32_pwm.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_userleds.c b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_userleds.c similarity index 97% rename from boards/arm/stm32/nucleo-f302r8/src/stm32_userleds.c rename to boards/arm/stm32f3/nucleo-f302r8/src/stm32_userleds.c index 1895649936c..5b5c35cf20d 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_userleds.c +++ b/boards/arm/stm32f3/nucleo-f302r8/src/stm32_userleds.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/stm32_userleds.c + * boards/arm/stm32f3/nucleo-f302r8/src/stm32_userleds.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32f3/nucleo-f303re/CMakeLists.txt b/boards/arm/stm32f3/nucleo-f303re/CMakeLists.txt new file mode 100644 index 00000000000..98d4d6771d7 --- /dev/null +++ b/boards/arm/stm32f3/nucleo-f303re/CMakeLists.txt @@ -0,0 +1,23 @@ +# ############################################################################## +# boards/arm/stm32f3/nucleo-f303re/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.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. +# +# ############################################################################## + +add_subdirectory(src) diff --git a/boards/arm/stm32/nucleo-f303re/Kconfig b/boards/arm/stm32f3/nucleo-f303re/Kconfig similarity index 100% rename from boards/arm/stm32/nucleo-f303re/Kconfig rename to boards/arm/stm32f3/nucleo-f303re/Kconfig diff --git a/boards/arm/stm32/nucleo-f303re/configs/adc/defconfig b/boards/arm/stm32f3/nucleo-f303re/configs/adc/defconfig similarity index 97% rename from boards/arm/stm32/nucleo-f303re/configs/adc/defconfig rename to boards/arm/stm32f3/nucleo-f303re/configs/adc/defconfig index 40f25f3adf6..800369214a2 100644 --- a/boards/arm/stm32/nucleo-f303re/configs/adc/defconfig +++ b/boards/arm/stm32f3/nucleo-f303re/configs/adc/defconfig @@ -12,7 +12,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f303re" CONFIG_ARCH_BOARD_NUCLEO_F303RE=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F303RE=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f303re/configs/can/defconfig b/boards/arm/stm32f3/nucleo-f303re/configs/can/defconfig similarity index 97% rename from boards/arm/stm32/nucleo-f303re/configs/can/defconfig rename to boards/arm/stm32f3/nucleo-f303re/configs/can/defconfig index 7132acae45a..464b73deff7 100644 --- a/boards/arm/stm32/nucleo-f303re/configs/can/defconfig +++ b/boards/arm/stm32f3/nucleo-f303re/configs/can/defconfig @@ -12,7 +12,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f303re" CONFIG_ARCH_BOARD_NUCLEO_F303RE=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F303RE=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f303re/configs/hello/defconfig b/boards/arm/stm32f3/nucleo-f303re/configs/hello/defconfig similarity index 97% rename from boards/arm/stm32/nucleo-f303re/configs/hello/defconfig rename to boards/arm/stm32f3/nucleo-f303re/configs/hello/defconfig index ca034f8f9bd..e8470d5fdbd 100644 --- a/boards/arm/stm32/nucleo-f303re/configs/hello/defconfig +++ b/boards/arm/stm32f3/nucleo-f303re/configs/hello/defconfig @@ -10,7 +10,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f303re" CONFIG_ARCH_BOARD_NUCLEO_F303RE=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F303RE=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f303re/configs/nsh/defconfig b/boards/arm/stm32f3/nucleo-f303re/configs/nsh/defconfig similarity index 97% rename from boards/arm/stm32/nucleo-f303re/configs/nsh/defconfig rename to boards/arm/stm32f3/nucleo-f303re/configs/nsh/defconfig index 2c491319b47..4b5ead9b89f 100644 --- a/boards/arm/stm32/nucleo-f303re/configs/nsh/defconfig +++ b/boards/arm/stm32f3/nucleo-f303re/configs/nsh/defconfig @@ -10,7 +10,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f303re" CONFIG_ARCH_BOARD_NUCLEO_F303RE=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F303RE=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f303re/configs/nxlines/defconfig b/boards/arm/stm32f3/nucleo-f303re/configs/nxlines/defconfig similarity index 97% rename from boards/arm/stm32/nucleo-f303re/configs/nxlines/defconfig rename to boards/arm/stm32f3/nucleo-f303re/configs/nxlines/defconfig index 75d56847146..6c5fbbe4e1c 100644 --- a/boards/arm/stm32/nucleo-f303re/configs/nxlines/defconfig +++ b/boards/arm/stm32f3/nucleo-f303re/configs/nxlines/defconfig @@ -14,7 +14,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f303re" CONFIG_ARCH_BOARD_NUCLEO_F303RE=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F303RE=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f303re/configs/pwm/defconfig b/boards/arm/stm32f3/nucleo-f303re/configs/pwm/defconfig similarity index 97% rename from boards/arm/stm32/nucleo-f303re/configs/pwm/defconfig rename to boards/arm/stm32f3/nucleo-f303re/configs/pwm/defconfig index 2b12f647fd7..e6ef3644349 100644 --- a/boards/arm/stm32/nucleo-f303re/configs/pwm/defconfig +++ b/boards/arm/stm32f3/nucleo-f303re/configs/pwm/defconfig @@ -10,7 +10,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f303re" CONFIG_ARCH_BOARD_NUCLEO_F303RE=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F303RE=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f303re/configs/serialrx/defconfig b/boards/arm/stm32f3/nucleo-f303re/configs/serialrx/defconfig similarity index 97% rename from boards/arm/stm32/nucleo-f303re/configs/serialrx/defconfig rename to boards/arm/stm32f3/nucleo-f303re/configs/serialrx/defconfig index 1f48a0590ec..cdfbb2e02b0 100644 --- a/boards/arm/stm32/nucleo-f303re/configs/serialrx/defconfig +++ b/boards/arm/stm32f3/nucleo-f303re/configs/serialrx/defconfig @@ -12,7 +12,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f303re" CONFIG_ARCH_BOARD_NUCLEO_F303RE=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F303RE=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f303re/include/board.h b/boards/arm/stm32f3/nucleo-f303re/include/board.h similarity index 99% rename from boards/arm/stm32/nucleo-f303re/include/board.h rename to boards/arm/stm32f3/nucleo-f303re/include/board.h index d5cb48ca3b4..a27906b0a72 100644 --- a/boards/arm/stm32/nucleo-f303re/include/board.h +++ b/boards/arm/stm32f3/nucleo-f303re/include/board.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/include/board.h + * boards/arm/stm32f3/nucleo-f303re/include/board.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32f3/nucleo-f303re/scripts/Make.defs b/boards/arm/stm32f3/nucleo-f303re/scripts/Make.defs new file mode 100644 index 00000000000..8d2299c83d6 --- /dev/null +++ b/boards/arm/stm32f3/nucleo-f303re/scripts/Make.defs @@ -0,0 +1,41 @@ +############################################################################ +# boards/arm/stm32f3/nucleo-f303re/scripts/Make.defs +# +# SPDX-License-Identifier: Apache-2.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. +# +############################################################################ + +include $(TOPDIR)/.config +include $(TOPDIR)/tools/Config.mk +include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs + +LDSCRIPT = ld.script +ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) + +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +AFLAGS := $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 diff --git a/boards/arm/stm32/nucleo-f303re/scripts/ld.script b/boards/arm/stm32f3/nucleo-f303re/scripts/ld.script similarity index 98% rename from boards/arm/stm32/nucleo-f303re/scripts/ld.script rename to boards/arm/stm32f3/nucleo-f303re/scripts/ld.script index 509bf141fad..49e73ee56d1 100644 --- a/boards/arm/stm32/nucleo-f303re/scripts/ld.script +++ b/boards/arm/stm32f3/nucleo-f303re/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/scripts/ld.script + * boards/arm/stm32f3/nucleo-f303re/scripts/ld.script * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303re/src/CMakeLists.txt b/boards/arm/stm32f3/nucleo-f303re/src/CMakeLists.txt similarity index 97% rename from boards/arm/stm32/nucleo-f303re/src/CMakeLists.txt rename to boards/arm/stm32f3/nucleo-f303re/src/CMakeLists.txt index bcc8d69e66c..1388c1f7d1e 100644 --- a/boards/arm/stm32/nucleo-f303re/src/CMakeLists.txt +++ b/boards/arm/stm32f3/nucleo-f303re/src/CMakeLists.txt @@ -1,5 +1,5 @@ # ############################################################################## -# boards/arm/stm32/nucleo-f303re/src/CMakeLists.txt +# boards/arm/stm32f3/nucleo-f303re/src/CMakeLists.txt # # SPDX-License-Identifier: Apache-2.0 # diff --git a/boards/arm/stm32/nucleo-f303re/src/Make.defs b/boards/arm/stm32f3/nucleo-f303re/src/Make.defs similarity index 97% rename from boards/arm/stm32/nucleo-f303re/src/Make.defs rename to boards/arm/stm32f3/nucleo-f303re/src/Make.defs index 08749d74cd0..d65a5d39ac5 100644 --- a/boards/arm/stm32/nucleo-f303re/src/Make.defs +++ b/boards/arm/stm32f3/nucleo-f303re/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# boards/arm/stm32/nucleo-f303re/src/Make.defs +# boards/arm/stm32f3/nucleo-f303re/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # diff --git a/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h b/boards/arm/stm32f3/nucleo-f303re/src/nucleo-f303re.h similarity index 99% rename from boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h rename to boards/arm/stm32f3/nucleo-f303re/src/nucleo-f303re.h index bcd7bb84176..01ce746a805 100644 --- a/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h +++ b/boards/arm/stm32f3/nucleo-f303re/src/nucleo-f303re.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h + * boards/arm/stm32f3/nucleo-f303re/src/nucleo-f303re.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_adc.c b/boards/arm/stm32f3/nucleo-f303re/src/stm32_adc.c similarity index 99% rename from boards/arm/stm32/nucleo-f303re/src/stm32_adc.c rename to boards/arm/stm32f3/nucleo-f303re/src/stm32_adc.c index 7f9f78d1d8e..8031cccfaee 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_adc.c +++ b/boards/arm/stm32f3/nucleo-f303re/src/stm32_adc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/stm32_adc.c + * boards/arm/stm32f3/nucleo-f303re/src/stm32_adc.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_autoleds.c b/boards/arm/stm32f3/nucleo-f303re/src/stm32_autoleds.c similarity index 97% rename from boards/arm/stm32/nucleo-f303re/src/stm32_autoleds.c rename to boards/arm/stm32f3/nucleo-f303re/src/stm32_autoleds.c index 55c7df56a71..b8bd4ec3c7f 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_autoleds.c +++ b/boards/arm/stm32f3/nucleo-f303re/src/stm32_autoleds.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/stm32_autoleds.c + * boards/arm/stm32f3/nucleo-f303re/src/stm32_autoleds.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_boot.c b/boards/arm/stm32f3/nucleo-f303re/src/stm32_boot.c similarity index 98% rename from boards/arm/stm32/nucleo-f303re/src/stm32_boot.c rename to boards/arm/stm32f3/nucleo-f303re/src/stm32_boot.c index 6231f8b5f59..8ff26cda3c5 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_boot.c +++ b/boards/arm/stm32f3/nucleo-f303re/src/stm32_boot.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/stm32_boot.c + * boards/arm/stm32f3/nucleo-f303re/src/stm32_boot.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_buttons.c b/boards/arm/stm32f3/nucleo-f303re/src/stm32_buttons.c similarity index 98% rename from boards/arm/stm32/nucleo-f303re/src/stm32_buttons.c rename to boards/arm/stm32f3/nucleo-f303re/src/stm32_buttons.c index f93ac3a5f9b..0dbfc2add9f 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_buttons.c +++ b/boards/arm/stm32f3/nucleo-f303re/src/stm32_buttons.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/stm32_buttons.c + * boards/arm/stm32f3/nucleo-f303re/src/stm32_buttons.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_can.c b/boards/arm/stm32f3/nucleo-f303re/src/stm32_can.c similarity index 97% rename from boards/arm/stm32/nucleo-f303re/src/stm32_can.c rename to boards/arm/stm32f3/nucleo-f303re/src/stm32_can.c index e7b25cf16ae..5aad2992848 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_can.c +++ b/boards/arm/stm32f3/nucleo-f303re/src/stm32_can.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/stm32_can.c + * boards/arm/stm32f3/nucleo-f303re/src/stm32_can.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_pwm.c b/boards/arm/stm32f3/nucleo-f303re/src/stm32_pwm.c similarity index 98% rename from boards/arm/stm32/nucleo-f303re/src/stm32_pwm.c rename to boards/arm/stm32f3/nucleo-f303re/src/stm32_pwm.c index 5d4544d1e8c..c9910bee3d0 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_pwm.c +++ b/boards/arm/stm32f3/nucleo-f303re/src/stm32_pwm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/stm32_pwm.c + * boards/arm/stm32f3/nucleo-f303re/src/stm32_pwm.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_spi.c b/boards/arm/stm32f3/nucleo-f303re/src/stm32_spi.c similarity index 99% rename from boards/arm/stm32/nucleo-f303re/src/stm32_spi.c rename to boards/arm/stm32f3/nucleo-f303re/src/stm32_spi.c index 559b5020f03..70e8e235c6e 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_spi.c +++ b/boards/arm/stm32f3/nucleo-f303re/src/stm32_spi.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/stm32_spi.c + * boards/arm/stm32f3/nucleo-f303re/src/stm32_spi.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_ssd1351.c b/boards/arm/stm32f3/nucleo-f303re/src/stm32_ssd1351.c similarity index 98% rename from boards/arm/stm32/nucleo-f303re/src/stm32_ssd1351.c rename to boards/arm/stm32f3/nucleo-f303re/src/stm32_ssd1351.c index b0f3a56d028..35e09d621e5 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_ssd1351.c +++ b/boards/arm/stm32f3/nucleo-f303re/src/stm32_ssd1351.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/stm32_ssd1351.c + * boards/arm/stm32f3/nucleo-f303re/src/stm32_ssd1351.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_timer.c b/boards/arm/stm32f3/nucleo-f303re/src/stm32_timer.c similarity index 97% rename from boards/arm/stm32/nucleo-f303re/src/stm32_timer.c rename to boards/arm/stm32f3/nucleo-f303re/src/stm32_timer.c index 221f721b5af..61e2ff9d063 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_timer.c +++ b/boards/arm/stm32f3/nucleo-f303re/src/stm32_timer.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/stm32_timer.c + * boards/arm/stm32f3/nucleo-f303re/src/stm32_timer.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_uid.c b/boards/arm/stm32f3/nucleo-f303re/src/stm32_uid.c similarity index 98% rename from boards/arm/stm32/nucleo-f303re/src/stm32_uid.c rename to boards/arm/stm32f3/nucleo-f303re/src/stm32_uid.c index af1a488fa10..54e03ff99d1 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_uid.c +++ b/boards/arm/stm32f3/nucleo-f303re/src/stm32_uid.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/stm32_uid.c + * boards/arm/stm32f3/nucleo-f303re/src/stm32_uid.c * * SPDX-License-Identifier: BSD-3-Clause * SPDX-FileCopyrightText: 2015 Marawan Ragab. All rights reserved. diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_userleds.c b/boards/arm/stm32f3/nucleo-f303re/src/stm32_userleds.c similarity index 97% rename from boards/arm/stm32/nucleo-f303re/src/stm32_userleds.c rename to boards/arm/stm32f3/nucleo-f303re/src/stm32_userleds.c index 121230d908e..fdcf1734640 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_userleds.c +++ b/boards/arm/stm32f3/nucleo-f303re/src/stm32_userleds.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/stm32_userleds.c + * boards/arm/stm32f3/nucleo-f303re/src/stm32_userleds.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32f3/nucleo-f303ze/CMakeLists.txt b/boards/arm/stm32f3/nucleo-f303ze/CMakeLists.txt new file mode 100644 index 00000000000..236a1e371d1 --- /dev/null +++ b/boards/arm/stm32f3/nucleo-f303ze/CMakeLists.txt @@ -0,0 +1,23 @@ +# ############################################################################## +# boards/arm/stm32f3/nucleo-f303ze/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.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. +# +# ############################################################################## + +add_subdirectory(src) diff --git a/boards/arm/stm32/nucleo-f303ze/Kconfig b/boards/arm/stm32f3/nucleo-f303ze/Kconfig similarity index 100% rename from boards/arm/stm32/nucleo-f303ze/Kconfig rename to boards/arm/stm32f3/nucleo-f303ze/Kconfig diff --git a/boards/arm/stm32/nucleo-f303ze/configs/adc/defconfig b/boards/arm/stm32f3/nucleo-f303ze/configs/adc/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f303ze/configs/adc/defconfig rename to boards/arm/stm32f3/nucleo-f303ze/configs/adc/defconfig index 2d1aa57d9d7..f9450ed1b9f 100644 --- a/boards/arm/stm32/nucleo-f303ze/configs/adc/defconfig +++ b/boards/arm/stm32f3/nucleo-f303ze/configs/adc/defconfig @@ -13,7 +13,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f303ze" CONFIG_ARCH_BOARD_NUCLEO_F303ZE=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F303ZE=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f303ze/configs/nsh/defconfig b/boards/arm/stm32f3/nucleo-f303ze/configs/nsh/defconfig similarity index 97% rename from boards/arm/stm32/nucleo-f303ze/configs/nsh/defconfig rename to boards/arm/stm32f3/nucleo-f303ze/configs/nsh/defconfig index 876b7df5a5e..c6f9fe743d0 100644 --- a/boards/arm/stm32/nucleo-f303ze/configs/nsh/defconfig +++ b/boards/arm/stm32f3/nucleo-f303ze/configs/nsh/defconfig @@ -10,7 +10,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f303ze" CONFIG_ARCH_BOARD_NUCLEO_F303ZE=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F303ZE=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f303ze/configs/nxlines_oled/defconfig b/boards/arm/stm32f3/nucleo-f303ze/configs/nxlines_oled/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f303ze/configs/nxlines_oled/defconfig rename to boards/arm/stm32f3/nucleo-f303ze/configs/nxlines_oled/defconfig index 8e5491d82fe..028b18ca152 100644 --- a/boards/arm/stm32/nucleo-f303ze/configs/nxlines_oled/defconfig +++ b/boards/arm/stm32f3/nucleo-f303ze/configs/nxlines_oled/defconfig @@ -13,7 +13,7 @@ CONFIG_ARCH_BOARD="nucleo-f303ze" CONFIG_ARCH_BOARD_COMMON=y CONFIG_ARCH_BOARD_NUCLEO_F303ZE=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F303ZE=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f303ze/include/board.h b/boards/arm/stm32f3/nucleo-f303ze/include/board.h similarity index 99% rename from boards/arm/stm32/nucleo-f303ze/include/board.h rename to boards/arm/stm32f3/nucleo-f303ze/include/board.h index b604725820c..2f7b5950dd0 100644 --- a/boards/arm/stm32/nucleo-f303ze/include/board.h +++ b/boards/arm/stm32f3/nucleo-f303ze/include/board.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303ze/include/board.h + * boards/arm/stm32f3/nucleo-f303ze/include/board.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32f3/nucleo-f303ze/scripts/Make.defs b/boards/arm/stm32f3/nucleo-f303ze/scripts/Make.defs new file mode 100644 index 00000000000..1a1821fb246 --- /dev/null +++ b/boards/arm/stm32f3/nucleo-f303ze/scripts/Make.defs @@ -0,0 +1,41 @@ +############################################################################ +# boards/arm/stm32f3/nucleo-f303ze/scripts/Make.defs +# +# SPDX-License-Identifier: Apache-2.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. +# +############################################################################ + +include $(TOPDIR)/.config +include $(TOPDIR)/tools/Config.mk +include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs + +LDSCRIPT = ld.script +ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) + +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +AFLAGS := $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 diff --git a/boards/arm/stm32/nucleo-f303ze/scripts/ld.script b/boards/arm/stm32f3/nucleo-f303ze/scripts/ld.script similarity index 98% rename from boards/arm/stm32/nucleo-f303ze/scripts/ld.script rename to boards/arm/stm32f3/nucleo-f303ze/scripts/ld.script index c43ec67e0d9..055c0bbe01f 100644 --- a/boards/arm/stm32/nucleo-f303ze/scripts/ld.script +++ b/boards/arm/stm32f3/nucleo-f303ze/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303ze/scripts/ld.script + * boards/arm/stm32f3/nucleo-f303ze/scripts/ld.script * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303ze/src/CMakeLists.txt b/boards/arm/stm32f3/nucleo-f303ze/src/CMakeLists.txt similarity index 96% rename from boards/arm/stm32/nucleo-f303ze/src/CMakeLists.txt rename to boards/arm/stm32f3/nucleo-f303ze/src/CMakeLists.txt index 5c6e0c74cb3..1ad333906e1 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/CMakeLists.txt +++ b/boards/arm/stm32f3/nucleo-f303ze/src/CMakeLists.txt @@ -1,5 +1,5 @@ # ############################################################################## -# boards/arm/stm32/nucleo-f303ze/src/CMakeLists.txt +# boards/arm/stm32f3/nucleo-f303ze/src/CMakeLists.txt # # SPDX-License-Identifier: Apache-2.0 # diff --git a/boards/arm/stm32/nucleo-f303ze/src/Make.defs b/boards/arm/stm32f3/nucleo-f303ze/src/Make.defs similarity index 96% rename from boards/arm/stm32/nucleo-f303ze/src/Make.defs rename to boards/arm/stm32f3/nucleo-f303ze/src/Make.defs index 099d67193b3..57baf0dc88a 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/Make.defs +++ b/boards/arm/stm32f3/nucleo-f303ze/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# boards/arm/stm32/nucleo-f303ze/src/Make.defs +# boards/arm/stm32f3/nucleo-f303ze/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # diff --git a/boards/arm/stm32/nucleo-f303ze/src/nucleo-f303ze.h b/boards/arm/stm32f3/nucleo-f303ze/src/nucleo-f303ze.h similarity index 98% rename from boards/arm/stm32/nucleo-f303ze/src/nucleo-f303ze.h rename to boards/arm/stm32f3/nucleo-f303ze/src/nucleo-f303ze.h index 7f302796b5f..35d4d81fa9a 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/nucleo-f303ze.h +++ b/boards/arm/stm32f3/nucleo-f303ze/src/nucleo-f303ze.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303ze/src/nucleo-f303ze.h + * boards/arm/stm32f3/nucleo-f303ze/src/nucleo-f303ze.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_adc.c b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_adc.c similarity index 99% rename from boards/arm/stm32/nucleo-f303ze/src/stm32_adc.c rename to boards/arm/stm32f3/nucleo-f303ze/src/stm32_adc.c index a5f559fb432..e137704a98a 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_adc.c +++ b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_adc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303ze/src/stm32_adc.c + * boards/arm/stm32f3/nucleo-f303ze/src/stm32_adc.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_autoleds.c b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_autoleds.c similarity index 98% rename from boards/arm/stm32/nucleo-f303ze/src/stm32_autoleds.c rename to boards/arm/stm32f3/nucleo-f303ze/src/stm32_autoleds.c index b990cdd6219..1861cae6b24 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_autoleds.c +++ b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_autoleds.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303ze/src/stm32_autoleds.c + * boards/arm/stm32f3/nucleo-f303ze/src/stm32_autoleds.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_boot.c b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_boot.c similarity index 98% rename from boards/arm/stm32/nucleo-f303ze/src/stm32_boot.c rename to boards/arm/stm32f3/nucleo-f303ze/src/stm32_boot.c index f2c54d36d4e..8984995d203 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_boot.c +++ b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_boot.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303ze/src/stm32_boot.c + * boards/arm/stm32f3/nucleo-f303ze/src/stm32_boot.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_bringup.c similarity index 97% rename from boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c rename to boards/arm/stm32f3/nucleo-f303ze/src/stm32_bringup.c index 697969eec66..3daad9db6c2 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c +++ b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_bringup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c + * boards/arm/stm32f3/nucleo-f303ze/src/stm32_bringup.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_buttons.c b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_buttons.c similarity index 98% rename from boards/arm/stm32/nucleo-f303ze/src/stm32_buttons.c rename to boards/arm/stm32f3/nucleo-f303ze/src/stm32_buttons.c index 9e82309922d..ff143d50418 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_buttons.c +++ b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_buttons.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303ze/src/stm32_buttons.c + * boards/arm/stm32f3/nucleo-f303ze/src/stm32_buttons.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_lcd.c b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_lcd.c similarity index 98% rename from boards/arm/stm32/nucleo-f303ze/src/stm32_lcd.c rename to boards/arm/stm32f3/nucleo-f303ze/src/stm32_lcd.c index cb6b3ffe895..2499bfdbb64 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_lcd.c +++ b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_lcd.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303ze/src/stm32_lcd.c + * boards/arm/stm32f3/nucleo-f303ze/src/stm32_lcd.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_userleds.c b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_userleds.c similarity index 98% rename from boards/arm/stm32/nucleo-f303ze/src/stm32_userleds.c rename to boards/arm/stm32f3/nucleo-f303ze/src/stm32_userleds.c index f2f7522ee69..770c74720d1 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_userleds.c +++ b/boards/arm/stm32f3/nucleo-f303ze/src/stm32_userleds.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f303ze/src/stm32_userleds.c + * boards/arm/stm32f3/nucleo-f303ze/src/stm32_userleds.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32f3/nucleo-f334r8/CMakeLists.txt b/boards/arm/stm32f3/nucleo-f334r8/CMakeLists.txt new file mode 100644 index 00000000000..6822d936f95 --- /dev/null +++ b/boards/arm/stm32f3/nucleo-f334r8/CMakeLists.txt @@ -0,0 +1,23 @@ +# ############################################################################## +# boards/arm/stm32f3/nucleo-f334r8/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.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. +# +# ############################################################################## + +add_subdirectory(src) diff --git a/boards/arm/stm32/nucleo-f334r8/Kconfig b/boards/arm/stm32f3/nucleo-f334r8/Kconfig similarity index 100% rename from boards/arm/stm32/nucleo-f334r8/Kconfig rename to boards/arm/stm32f3/nucleo-f334r8/Kconfig diff --git a/boards/arm/stm32/nucleo-f334r8/configs/adc/defconfig b/boards/arm/stm32f3/nucleo-f334r8/configs/adc/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f334r8/configs/adc/defconfig rename to boards/arm/stm32f3/nucleo-f334r8/configs/adc/defconfig index 8408fa611bf..c5b882ea444 100644 --- a/boards/arm/stm32/nucleo-f334r8/configs/adc/defconfig +++ b/boards/arm/stm32f3/nucleo-f334r8/configs/adc/defconfig @@ -13,7 +13,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f334r8" CONFIG_ARCH_BOARD_NUCLEO_F334R8=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F334R8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f334r8/configs/highpri/defconfig b/boards/arm/stm32f3/nucleo-f334r8/configs/highpri/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f334r8/configs/highpri/defconfig rename to boards/arm/stm32f3/nucleo-f334r8/configs/highpri/defconfig index fd85cdf0d5d..1c1da0ff5ee 100644 --- a/boards/arm/stm32/nucleo-f334r8/configs/highpri/defconfig +++ b/boards/arm/stm32f3/nucleo-f334r8/configs/highpri/defconfig @@ -9,7 +9,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f334r8" CONFIG_ARCH_BOARD_NUCLEO_F334R8=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F334R8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f334r8/configs/nsh/defconfig b/boards/arm/stm32f3/nucleo-f334r8/configs/nsh/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f334r8/configs/nsh/defconfig rename to boards/arm/stm32f3/nucleo-f334r8/configs/nsh/defconfig index 38e98f8d2c5..7a8a8baf3f1 100644 --- a/boards/arm/stm32/nucleo-f334r8/configs/nsh/defconfig +++ b/boards/arm/stm32f3/nucleo-f334r8/configs/nsh/defconfig @@ -11,7 +11,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f334r8" CONFIG_ARCH_BOARD_NUCLEO_F334R8=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F334R8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f334r8/configs/spwm1/defconfig b/boards/arm/stm32f3/nucleo-f334r8/configs/spwm1/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f334r8/configs/spwm1/defconfig rename to boards/arm/stm32f3/nucleo-f334r8/configs/spwm1/defconfig index eabb1afa344..351e8d90ad4 100644 --- a/boards/arm/stm32/nucleo-f334r8/configs/spwm1/defconfig +++ b/boards/arm/stm32f3/nucleo-f334r8/configs/spwm1/defconfig @@ -9,7 +9,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f334r8" CONFIG_ARCH_BOARD_NUCLEO_F334R8=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F334R8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f334r8/configs/spwm2/defconfig b/boards/arm/stm32f3/nucleo-f334r8/configs/spwm2/defconfig similarity index 98% rename from boards/arm/stm32/nucleo-f334r8/configs/spwm2/defconfig rename to boards/arm/stm32f3/nucleo-f334r8/configs/spwm2/defconfig index abe476df3aa..2427abbae0b 100644 --- a/boards/arm/stm32/nucleo-f334r8/configs/spwm2/defconfig +++ b/boards/arm/stm32f3/nucleo-f334r8/configs/spwm2/defconfig @@ -9,7 +9,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f334r8" CONFIG_ARCH_BOARD_NUCLEO_F334R8=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F334R8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/nucleo-f334r8/include/board.h b/boards/arm/stm32f3/nucleo-f334r8/include/board.h similarity index 99% rename from boards/arm/stm32/nucleo-f334r8/include/board.h rename to boards/arm/stm32f3/nucleo-f334r8/include/board.h index e437be709a1..52d5fbd8889 100644 --- a/boards/arm/stm32/nucleo-f334r8/include/board.h +++ b/boards/arm/stm32f3/nucleo-f334r8/include/board.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f334r8/include/board.h + * boards/arm/stm32f3/nucleo-f334r8/include/board.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32f3/nucleo-f334r8/scripts/Make.defs b/boards/arm/stm32f3/nucleo-f334r8/scripts/Make.defs new file mode 100644 index 00000000000..26228f81667 --- /dev/null +++ b/boards/arm/stm32f3/nucleo-f334r8/scripts/Make.defs @@ -0,0 +1,41 @@ +############################################################################ +# boards/arm/stm32f3/nucleo-f334r8/scripts/Make.defs +# +# SPDX-License-Identifier: Apache-2.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. +# +############################################################################ + +include $(TOPDIR)/.config +include $(TOPDIR)/tools/Config.mk +include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs + +LDSCRIPT = ld.script +ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) + +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +AFLAGS := $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 diff --git a/boards/arm/stm32/nucleo-f334r8/scripts/ld.script b/boards/arm/stm32f3/nucleo-f334r8/scripts/ld.script similarity index 98% rename from boards/arm/stm32/nucleo-f334r8/scripts/ld.script rename to boards/arm/stm32f3/nucleo-f334r8/scripts/ld.script index 5f4e9d8ae71..83850802f01 100644 --- a/boards/arm/stm32/nucleo-f334r8/scripts/ld.script +++ b/boards/arm/stm32f3/nucleo-f334r8/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f334r8/scripts/ld.script + * boards/arm/stm32f3/nucleo-f334r8/scripts/ld.script * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt b/boards/arm/stm32f3/nucleo-f334r8/src/CMakeLists.txt similarity index 96% rename from boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt rename to boards/arm/stm32f3/nucleo-f334r8/src/CMakeLists.txt index 30f5bccef47..e56987f9cba 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt +++ b/boards/arm/stm32f3/nucleo-f334r8/src/CMakeLists.txt @@ -1,5 +1,5 @@ # ############################################################################## -# boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt +# boards/arm/stm32f3/nucleo-f334r8/src/CMakeLists.txt # # SPDX-License-Identifier: Apache-2.0 # diff --git a/boards/arm/stm32/nucleo-f334r8/src/Make.defs b/boards/arm/stm32f3/nucleo-f334r8/src/Make.defs similarity index 97% rename from boards/arm/stm32/nucleo-f334r8/src/Make.defs rename to boards/arm/stm32f3/nucleo-f334r8/src/Make.defs index 97dbc7a0f51..a3a09d9253c 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/Make.defs +++ b/boards/arm/stm32f3/nucleo-f334r8/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# boards/arm/stm32/nucleo-f334r8/src/Make.defs +# boards/arm/stm32f3/nucleo-f334r8/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # diff --git a/boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h b/boards/arm/stm32f3/nucleo-f334r8/src/nucleo-f334r8.h similarity index 99% rename from boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h rename to boards/arm/stm32f3/nucleo-f334r8/src/nucleo-f334r8.h index ddcab273b09..b2a0f7c72f4 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h +++ b/boards/arm/stm32f3/nucleo-f334r8/src/nucleo-f334r8.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h + * boards/arm/stm32f3/nucleo-f334r8/src/nucleo-f334r8.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_adc.c b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_adc.c similarity index 99% rename from boards/arm/stm32/nucleo-f334r8/src/stm32_adc.c rename to boards/arm/stm32f3/nucleo-f334r8/src/stm32_adc.c index a369fe2f4fa..d6530730994 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_adc.c +++ b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_adc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f334r8/src/stm32_adc.c + * boards/arm/stm32f3/nucleo-f334r8/src/stm32_adc.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_autoleds.c b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_autoleds.c similarity index 97% rename from boards/arm/stm32/nucleo-f334r8/src/stm32_autoleds.c rename to boards/arm/stm32f3/nucleo-f334r8/src/stm32_autoleds.c index e2088b7ea6f..a108db4e5e3 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_autoleds.c +++ b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_autoleds.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f334r8/src/stm32_autoleds.c + * boards/arm/stm32f3/nucleo-f334r8/src/stm32_autoleds.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_boot.c b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_boot.c similarity index 98% rename from boards/arm/stm32/nucleo-f334r8/src/stm32_boot.c rename to boards/arm/stm32f3/nucleo-f334r8/src/stm32_boot.c index 6387f93c8a3..69051c8f1b3 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_boot.c +++ b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_boot.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f334r8/src/stm32_boot.c + * boards/arm/stm32f3/nucleo-f334r8/src/stm32_boot.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_comp.c b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_comp.c similarity index 98% rename from boards/arm/stm32/nucleo-f334r8/src/stm32_comp.c rename to boards/arm/stm32f3/nucleo-f334r8/src/stm32_comp.c index 1175e6b17ba..cc95203cb1e 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_comp.c +++ b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_comp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f334r8/src/stm32_comp.c + * boards/arm/stm32f3/nucleo-f334r8/src/stm32_comp.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_highpri.c similarity index 99% rename from boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c rename to boards/arm/stm32f3/nucleo-f334r8/src/stm32_highpri.c index 7be598a7747..961fcdd3a3f 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c +++ b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_highpri.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f334r8/src/stm32_highpri.c + * boards/arm/stm32f3/nucleo-f334r8/src/stm32_highpri.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_hrtim.c b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_hrtim.c similarity index 97% rename from boards/arm/stm32/nucleo-f334r8/src/stm32_hrtim.c rename to boards/arm/stm32f3/nucleo-f334r8/src/stm32_hrtim.c index 6b493ee1cbd..6e333274414 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_hrtim.c +++ b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_hrtim.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f334r8/src/stm32_hrtim.c + * boards/arm/stm32f3/nucleo-f334r8/src/stm32_hrtim.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_opamp.c b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_opamp.c similarity index 97% rename from boards/arm/stm32/nucleo-f334r8/src/stm32_opamp.c rename to boards/arm/stm32f3/nucleo-f334r8/src/stm32_opamp.c index cdc526cb427..33a3febc2ab 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_opamp.c +++ b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_opamp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f334r8/src/stm32_opamp.c + * boards/arm/stm32f3/nucleo-f334r8/src/stm32_opamp.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_spwm.c b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_spwm.c similarity index 99% rename from boards/arm/stm32/nucleo-f334r8/src/stm32_spwm.c rename to boards/arm/stm32f3/nucleo-f334r8/src/stm32_spwm.c index 1bb93258e20..3fd7576b012 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_spwm.c +++ b/boards/arm/stm32f3/nucleo-f334r8/src/stm32_spwm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/nucleo-f334r8/src/stm32_spwm.c + * boards/arm/stm32f3/nucleo-f334r8/src/stm32_spwm.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32f3/stm32f334-disco/CMakeLists.txt b/boards/arm/stm32f3/stm32f334-disco/CMakeLists.txt new file mode 100644 index 00000000000..25937ad493c --- /dev/null +++ b/boards/arm/stm32f3/stm32f334-disco/CMakeLists.txt @@ -0,0 +1,23 @@ +# ############################################################################## +# boards/arm/stm32f3/stm32f334-disco/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.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. +# +# ############################################################################## + +add_subdirectory(src) diff --git a/boards/arm/stm32/stm32f334-disco/Kconfig b/boards/arm/stm32f3/stm32f334-disco/Kconfig similarity index 100% rename from boards/arm/stm32/stm32f334-disco/Kconfig rename to boards/arm/stm32f3/stm32f334-disco/Kconfig diff --git a/boards/arm/stm32/stm32f334-disco/configs/buckboost/defconfig b/boards/arm/stm32f3/stm32f334-disco/configs/buckboost/defconfig similarity index 99% rename from boards/arm/stm32/stm32f334-disco/configs/buckboost/defconfig rename to boards/arm/stm32f3/stm32f334-disco/configs/buckboost/defconfig index 2f7c28b1b2a..2736b34ef80 100644 --- a/boards/arm/stm32/stm32f334-disco/configs/buckboost/defconfig +++ b/boards/arm/stm32f3/stm32f334-disco/configs/buckboost/defconfig @@ -12,7 +12,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="stm32f334-disco" CONFIG_ARCH_BOARD_STM32F334_DISCO=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F334C8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/stm32f334-disco/configs/nsh/defconfig b/boards/arm/stm32f3/stm32f334-disco/configs/nsh/defconfig similarity index 98% rename from boards/arm/stm32/stm32f334-disco/configs/nsh/defconfig rename to boards/arm/stm32f3/stm32f334-disco/configs/nsh/defconfig index e7c49036087..7bdc5a61d0f 100644 --- a/boards/arm/stm32/stm32f334-disco/configs/nsh/defconfig +++ b/boards/arm/stm32f3/stm32f334-disco/configs/nsh/defconfig @@ -11,7 +11,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="stm32f334-disco" CONFIG_ARCH_BOARD_STM32F334_DISCO=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F334C8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/stm32f334-disco/configs/powerled/defconfig b/boards/arm/stm32f3/stm32f334-disco/configs/powerled/defconfig similarity index 99% rename from boards/arm/stm32/stm32f334-disco/configs/powerled/defconfig rename to boards/arm/stm32f3/stm32f334-disco/configs/powerled/defconfig index b08e14d40ba..a6bccf5b397 100644 --- a/boards/arm/stm32/stm32f334-disco/configs/powerled/defconfig +++ b/boards/arm/stm32f3/stm32f334-disco/configs/powerled/defconfig @@ -27,7 +27,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="stm32f334-disco" CONFIG_ARCH_BOARD_STM32F334_DISCO=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F334C8=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/stm32f334-disco/include/board.h b/boards/arm/stm32f3/stm32f334-disco/include/board.h similarity index 99% rename from boards/arm/stm32/stm32f334-disco/include/board.h rename to boards/arm/stm32f3/stm32f334-disco/include/board.h index b1b39e94d8f..b4c5ffeca08 100644 --- a/boards/arm/stm32/stm32f334-disco/include/board.h +++ b/boards/arm/stm32f3/stm32f334-disco/include/board.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f334-disco/include/board.h + * boards/arm/stm32f3/stm32f334-disco/include/board.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32f3/stm32f334-disco/scripts/Make.defs b/boards/arm/stm32f3/stm32f334-disco/scripts/Make.defs new file mode 100644 index 00000000000..808988ed8e2 --- /dev/null +++ b/boards/arm/stm32f3/stm32f334-disco/scripts/Make.defs @@ -0,0 +1,41 @@ +############################################################################ +# boards/arm/stm32f3/stm32f334-disco/scripts/Make.defs +# +# SPDX-License-Identifier: Apache-2.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. +# +############################################################################ + +include $(TOPDIR)/.config +include $(TOPDIR)/tools/Config.mk +include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs + +LDSCRIPT = ld.script +ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) + +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +AFLAGS := $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 diff --git a/boards/arm/stm32/stm32f334-disco/scripts/ld.script b/boards/arm/stm32f3/stm32f334-disco/scripts/ld.script similarity index 98% rename from boards/arm/stm32/stm32f334-disco/scripts/ld.script rename to boards/arm/stm32f3/stm32f334-disco/scripts/ld.script index 4a28638fbc2..f5f4236470b 100644 --- a/boards/arm/stm32/stm32f334-disco/scripts/ld.script +++ b/boards/arm/stm32f3/stm32f334-disco/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f334-disco/scripts/ld.script + * boards/arm/stm32f3/stm32f334-disco/scripts/ld.script * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f334-disco/src/CMakeLists.txt b/boards/arm/stm32f3/stm32f334-disco/src/CMakeLists.txt similarity index 96% rename from boards/arm/stm32/stm32f334-disco/src/CMakeLists.txt rename to boards/arm/stm32f3/stm32f334-disco/src/CMakeLists.txt index b3e02b012c8..0f8f031ecba 100644 --- a/boards/arm/stm32/stm32f334-disco/src/CMakeLists.txt +++ b/boards/arm/stm32f3/stm32f334-disco/src/CMakeLists.txt @@ -1,5 +1,5 @@ # ############################################################################## -# boards/arm/stm32/stm32f334-disco/src/CMakeLists.txt +# boards/arm/stm32f3/stm32f334-disco/src/CMakeLists.txt # # SPDX-License-Identifier: Apache-2.0 # diff --git a/boards/arm/stm32/stm32f334-disco/src/Make.defs b/boards/arm/stm32f3/stm32f334-disco/src/Make.defs similarity index 96% rename from boards/arm/stm32/stm32f334-disco/src/Make.defs rename to boards/arm/stm32f3/stm32f334-disco/src/Make.defs index df8d1b44b37..fc16406ada6 100644 --- a/boards/arm/stm32/stm32f334-disco/src/Make.defs +++ b/boards/arm/stm32f3/stm32f334-disco/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# boards/arm/stm32/stm32f334-disco/src/Make.defs +# boards/arm/stm32f3/stm32f334-disco/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_adc.c b/boards/arm/stm32f3/stm32f334-disco/src/stm32_adc.c similarity index 99% rename from boards/arm/stm32/stm32f334-disco/src/stm32_adc.c rename to boards/arm/stm32f3/stm32f334-disco/src/stm32_adc.c index 9d40e86bd6c..82267bb3d83 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_adc.c +++ b/boards/arm/stm32f3/stm32f334-disco/src/stm32_adc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f334-disco/src/stm32_adc.c + * boards/arm/stm32f3/stm32f334-disco/src/stm32_adc.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_autoleds.c b/boards/arm/stm32f3/stm32f334-disco/src/stm32_autoleds.c similarity index 97% rename from boards/arm/stm32/stm32f334-disco/src/stm32_autoleds.c rename to boards/arm/stm32f3/stm32f334-disco/src/stm32_autoleds.c index 3cc43c8ee0a..2adf161687a 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_autoleds.c +++ b/boards/arm/stm32f3/stm32f334-disco/src/stm32_autoleds.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f334-disco/src/stm32_autoleds.c + * boards/arm/stm32f3/stm32f334-disco/src/stm32_autoleds.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_boot.c b/boards/arm/stm32f3/stm32f334-disco/src/stm32_boot.c similarity index 99% rename from boards/arm/stm32/stm32f334-disco/src/stm32_boot.c rename to boards/arm/stm32f3/stm32f334-disco/src/stm32_boot.c index 5aacb0f9f11..0dce4b87b7d 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_boot.c +++ b/boards/arm/stm32f3/stm32f334-disco/src/stm32_boot.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f334-disco/src/stm32_boot.c + * boards/arm/stm32f3/stm32f334-disco/src/stm32_boot.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_comp.c b/boards/arm/stm32f3/stm32f334-disco/src/stm32_comp.c similarity index 98% rename from boards/arm/stm32/stm32f334-disco/src/stm32_comp.c rename to boards/arm/stm32f3/stm32f334-disco/src/stm32_comp.c index d1f45f0ab7a..9f0c52f925b 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_comp.c +++ b/boards/arm/stm32f3/stm32f334-disco/src/stm32_comp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f334-disco/src/stm32_comp.c + * boards/arm/stm32f3/stm32f334-disco/src/stm32_comp.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_hrtim.c b/boards/arm/stm32f3/stm32f334-disco/src/stm32_hrtim.c similarity index 97% rename from boards/arm/stm32/stm32f334-disco/src/stm32_hrtim.c rename to boards/arm/stm32f3/stm32f334-disco/src/stm32_hrtim.c index 381aa7549c3..38885ff50b9 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_hrtim.c +++ b/boards/arm/stm32f3/stm32f334-disco/src/stm32_hrtim.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f334-disco/src/stm32_hrtim.c + * boards/arm/stm32f3/stm32f334-disco/src/stm32_hrtim.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_opamp.c b/boards/arm/stm32f3/stm32f334-disco/src/stm32_opamp.c similarity index 97% rename from boards/arm/stm32/stm32f334-disco/src/stm32_opamp.c rename to boards/arm/stm32f3/stm32f334-disco/src/stm32_opamp.c index 67ba3ad9f67..03f9557d1e1 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_opamp.c +++ b/boards/arm/stm32f3/stm32f334-disco/src/stm32_opamp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f334-disco/src/stm32_opamp.c + * boards/arm/stm32f3/stm32f334-disco/src/stm32_opamp.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c b/boards/arm/stm32f3/stm32f334-disco/src/stm32_powerled.c similarity index 99% rename from boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c rename to boards/arm/stm32f3/stm32f334-disco/src/stm32_powerled.c index 0f7890bd25f..81430e490d8 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c +++ b/boards/arm/stm32f3/stm32f334-disco/src/stm32_powerled.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c + * boards/arm/stm32f3/stm32f334-disco/src/stm32_powerled.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c b/boards/arm/stm32f3/stm32f334-disco/src/stm32_smps.c similarity index 99% rename from boards/arm/stm32/stm32f334-disco/src/stm32_smps.c rename to boards/arm/stm32f3/stm32f334-disco/src/stm32_smps.c index 8c42a9c23cb..9253f274ce9 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c +++ b/boards/arm/stm32f3/stm32f334-disco/src/stm32_smps.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f334-disco/src/stm32_smps.c + * boards/arm/stm32f3/stm32f334-disco/src/stm32_smps.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h b/boards/arm/stm32f3/stm32f334-disco/src/stm32f334-disco.h similarity index 99% rename from boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h rename to boards/arm/stm32f3/stm32f334-disco/src/stm32f334-disco.h index 213f549b427..0aac0ea8e6c 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h +++ b/boards/arm/stm32f3/stm32f334-disco/src/stm32f334-disco.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h + * boards/arm/stm32f3/stm32f334-disco/src/stm32f334-disco.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32f3/stm32f3discovery/CMakeLists.txt b/boards/arm/stm32f3/stm32f3discovery/CMakeLists.txt new file mode 100644 index 00000000000..898b9836865 --- /dev/null +++ b/boards/arm/stm32f3/stm32f3discovery/CMakeLists.txt @@ -0,0 +1,23 @@ +# ############################################################################## +# boards/arm/stm32f3/stm32f3discovery/CMakeLists.txt +# +# SPDX-License-Identifier: Apache-2.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. +# +# ############################################################################## + +add_subdirectory(src) diff --git a/boards/arm/stm32/stm32f3discovery/Kconfig b/boards/arm/stm32f3/stm32f3discovery/Kconfig similarity index 100% rename from boards/arm/stm32/stm32f3discovery/Kconfig rename to boards/arm/stm32f3/stm32f3discovery/Kconfig diff --git a/boards/arm/stm32/stm32f3discovery/configs/nsh/defconfig b/boards/arm/stm32f3/stm32f3discovery/configs/nsh/defconfig similarity index 98% rename from boards/arm/stm32/stm32f3discovery/configs/nsh/defconfig rename to boards/arm/stm32f3/stm32f3discovery/configs/nsh/defconfig index b05c264572a..e05647d329b 100644 --- a/boards/arm/stm32/stm32f3discovery/configs/nsh/defconfig +++ b/boards/arm/stm32f3/stm32f3discovery/configs/nsh/defconfig @@ -12,7 +12,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="stm32f3discovery" CONFIG_ARCH_BOARD_STM32F3_DISCOVERY=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F303VC=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/stm32f3discovery/configs/usbnsh/defconfig b/boards/arm/stm32f3/stm32f3discovery/configs/usbnsh/defconfig similarity index 98% rename from boards/arm/stm32/stm32f3discovery/configs/usbnsh/defconfig rename to boards/arm/stm32f3/stm32f3discovery/configs/usbnsh/defconfig index 11e8b675785..ca4b9b58240 100644 --- a/boards/arm/stm32/stm32f3discovery/configs/usbnsh/defconfig +++ b/boards/arm/stm32f3/stm32f3discovery/configs/usbnsh/defconfig @@ -13,7 +13,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="stm32f3discovery" CONFIG_ARCH_BOARD_STM32F3_DISCOVERY=y CONFIG_ARCH_BUTTONS=y -CONFIG_ARCH_CHIP="stm32" +CONFIG_ARCH_CHIP="stm32f3" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F303VC=y CONFIG_ARCH_CHIP_STM32F3=y diff --git a/boards/arm/stm32/stm32f3discovery/include/board.h b/boards/arm/stm32f3/stm32f3discovery/include/board.h similarity index 99% rename from boards/arm/stm32/stm32f3discovery/include/board.h rename to boards/arm/stm32f3/stm32f3discovery/include/board.h index 2761c0cfb05..0e989224f45 100644 --- a/boards/arm/stm32/stm32f3discovery/include/board.h +++ b/boards/arm/stm32f3/stm32f3discovery/include/board.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f3discovery/include/board.h + * boards/arm/stm32f3/stm32f3discovery/include/board.h * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32f3/stm32f3discovery/scripts/Make.defs b/boards/arm/stm32f3/stm32f3discovery/scripts/Make.defs new file mode 100644 index 00000000000..be421233cda --- /dev/null +++ b/boards/arm/stm32f3/stm32f3discovery/scripts/Make.defs @@ -0,0 +1,41 @@ +############################################################################ +# boards/arm/stm32f3/stm32f3discovery/scripts/Make.defs +# +# SPDX-License-Identifier: Apache-2.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. +# +############################################################################ + +include $(TOPDIR)/.config +include $(TOPDIR)/tools/Config.mk +include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs + +LDSCRIPT = ld.script +ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) + +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +AFLAGS := $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 diff --git a/boards/arm/stm32/stm32f3discovery/scripts/ld.script b/boards/arm/stm32f3/stm32f3discovery/scripts/ld.script similarity index 98% rename from boards/arm/stm32/stm32f3discovery/scripts/ld.script rename to boards/arm/stm32f3/stm32f3discovery/scripts/ld.script index eef42690810..a54ec9fcb66 100644 --- a/boards/arm/stm32/stm32f3discovery/scripts/ld.script +++ b/boards/arm/stm32f3/stm32f3discovery/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f3discovery/scripts/ld.script + * boards/arm/stm32f3/stm32f3discovery/scripts/ld.script * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f3discovery/src/CMakeLists.txt b/boards/arm/stm32f3/stm32f3discovery/src/CMakeLists.txt similarity index 96% rename from boards/arm/stm32/stm32f3discovery/src/CMakeLists.txt rename to boards/arm/stm32f3/stm32f3discovery/src/CMakeLists.txt index a5f1196b826..b630617db14 100644 --- a/boards/arm/stm32/stm32f3discovery/src/CMakeLists.txt +++ b/boards/arm/stm32f3/stm32f3discovery/src/CMakeLists.txt @@ -1,5 +1,5 @@ # ############################################################################## -# boards/arm/stm32/stm32f3discovery/src/CMakeLists.txt +# boards/arm/stm32f3/stm32f3discovery/src/CMakeLists.txt # # SPDX-License-Identifier: Apache-2.0 # diff --git a/boards/arm/stm32/stm32f3discovery/src/Make.defs b/boards/arm/stm32f3/stm32f3discovery/src/Make.defs similarity index 96% rename from boards/arm/stm32/stm32f3discovery/src/Make.defs rename to boards/arm/stm32f3/stm32f3discovery/src/Make.defs index 5ab0f6b49b4..726b069c0ef 100644 --- a/boards/arm/stm32/stm32f3discovery/src/Make.defs +++ b/boards/arm/stm32f3/stm32f3discovery/src/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# boards/arm/stm32/stm32f3discovery/src/Make.defs +# boards/arm/stm32f3/stm32f3discovery/src/Make.defs # # SPDX-License-Identifier: Apache-2.0 # diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_autoleds.c b/boards/arm/stm32f3/stm32f3discovery/src/stm32_autoleds.c similarity index 98% rename from boards/arm/stm32/stm32f3discovery/src/stm32_autoleds.c rename to boards/arm/stm32f3/stm32f3discovery/src/stm32_autoleds.c index fd2d12653cb..a88f93396fb 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_autoleds.c +++ b/boards/arm/stm32f3/stm32f3discovery/src/stm32_autoleds.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f3discovery/src/stm32_autoleds.c + * boards/arm/stm32f3/stm32f3discovery/src/stm32_autoleds.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_boot.c b/boards/arm/stm32f3/stm32f3discovery/src/stm32_boot.c similarity index 98% rename from boards/arm/stm32/stm32f3discovery/src/stm32_boot.c rename to boards/arm/stm32f3/stm32f3discovery/src/stm32_boot.c index fe335712274..88ceb8fb861 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_boot.c +++ b/boards/arm/stm32f3/stm32f3discovery/src/stm32_boot.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f3discovery/src/stm32_boot.c + * boards/arm/stm32f3/stm32f3discovery/src/stm32_boot.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_bringup.c b/boards/arm/stm32f3/stm32f3discovery/src/stm32_bringup.c similarity index 98% rename from boards/arm/stm32/stm32f3discovery/src/stm32_bringup.c rename to boards/arm/stm32f3/stm32f3discovery/src/stm32_bringup.c index b0fc88f9be7..4b4f5a63b73 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_bringup.c +++ b/boards/arm/stm32f3/stm32f3discovery/src/stm32_bringup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f3discovery/src/stm32_bringup.c + * boards/arm/stm32f3/stm32f3discovery/src/stm32_bringup.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_buttons.c b/boards/arm/stm32f3/stm32f3discovery/src/stm32_buttons.c similarity index 98% rename from boards/arm/stm32/stm32f3discovery/src/stm32_buttons.c rename to boards/arm/stm32f3/stm32f3discovery/src/stm32_buttons.c index ba6a7507847..b95f1899118 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_buttons.c +++ b/boards/arm/stm32f3/stm32f3discovery/src/stm32_buttons.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f3discovery/src/stm32_buttons.c + * boards/arm/stm32f3/stm32f3discovery/src/stm32_buttons.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_pwm.c b/boards/arm/stm32f3/stm32f3discovery/src/stm32_pwm.c similarity index 98% rename from boards/arm/stm32/stm32f3discovery/src/stm32_pwm.c rename to boards/arm/stm32f3/stm32f3discovery/src/stm32_pwm.c index d929dcfd8ce..132b6bbdf56 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_pwm.c +++ b/boards/arm/stm32f3/stm32f3discovery/src/stm32_pwm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f3discovery/src/stm32_pwm.c + * boards/arm/stm32f3/stm32f3discovery/src/stm32_pwm.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_spi.c b/boards/arm/stm32f3/stm32f3discovery/src/stm32_spi.c similarity index 99% rename from boards/arm/stm32/stm32f3discovery/src/stm32_spi.c rename to boards/arm/stm32f3/stm32f3discovery/src/stm32_spi.c index b5a17433a87..9b9e324250d 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_spi.c +++ b/boards/arm/stm32f3/stm32f3discovery/src/stm32_spi.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f3discovery/src/stm32_spi.c + * boards/arm/stm32f3/stm32f3discovery/src/stm32_spi.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_usb.c b/boards/arm/stm32f3/stm32f3discovery/src/stm32_usb.c similarity index 98% rename from boards/arm/stm32/stm32f3discovery/src/stm32_usb.c rename to boards/arm/stm32f3/stm32f3discovery/src/stm32_usb.c index 375d66d3408..7084ab7babd 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_usb.c +++ b/boards/arm/stm32f3/stm32f3discovery/src/stm32_usb.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f3discovery/src/stm32_usb.c + * boards/arm/stm32f3/stm32f3discovery/src/stm32_usb.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_userleds.c b/boards/arm/stm32f3/stm32f3discovery/src/stm32_userleds.c similarity index 98% rename from boards/arm/stm32/stm32f3discovery/src/stm32_userleds.c rename to boards/arm/stm32f3/stm32f3discovery/src/stm32_userleds.c index 38ff516b8cb..f38041a78a1 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_userleds.c +++ b/boards/arm/stm32f3/stm32f3discovery/src/stm32_userleds.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f3discovery/src/stm32_userleds.c + * boards/arm/stm32f3/stm32f3discovery/src/stm32_userleds.c * * SPDX-License-Identifier: Apache-2.0 * diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32f3discovery.h b/boards/arm/stm32f3/stm32f3discovery/src/stm32f3discovery.h similarity index 98% rename from boards/arm/stm32/stm32f3discovery/src/stm32f3discovery.h rename to boards/arm/stm32f3/stm32f3discovery/src/stm32f3discovery.h index 44464bcf3a8..79b10628034 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32f3discovery.h +++ b/boards/arm/stm32f3/stm32f3discovery/src/stm32f3discovery.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/stm32/stm32f3discovery/src/stm32f3discovery.h + * boards/arm/stm32f3/stm32f3discovery/src/stm32f3discovery.h * * SPDX-License-Identifier: Apache-2.0 * @@ -33,7 +33,7 @@ #include -#include +#include #include "stm32.h"