mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
More progress on the Wildfire STM32 port
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5121 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -3294,5 +3294,10 @@
|
|||||||
script).
|
script).
|
||||||
* configs/fire-stm32v2: Configuration for the M3 Wildfire board. I
|
* configs/fire-stm32v2: Configuration for the M3 Wildfire board. I
|
||||||
don't know very much about this board other than is has an
|
don't know very much about this board other than is has an
|
||||||
STM32F103VET chip, LCD, touchscreen, and ENC28J60 network.
|
STM32F103VET6 chip, LCD, touchscreen, and ENC28J60 network. Very
|
||||||
|
little is in place on the initial check-in.
|
||||||
|
* configs/shenzhou: Coding for the Shenzhou board port is complete,
|
||||||
|
but tested has been deferred until I get the right tools.
|
||||||
|
* arch/arc/include/stm32/chip.h and arch/arm/src/stm32/chip.h:
|
||||||
|
Add support for the STM32F103VET6.
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,8 @@
|
|||||||
* the chip datasheet.
|
* the chip datasheet.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* STM32 F100 Value Line ************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_CHIP_STM32F100C8) || defined(CONFIG_ARCH_CHIP_STM32F100CB) \
|
#if defined(CONFIG_ARCH_CHIP_STM32F100C8) || defined(CONFIG_ARCH_CHIP_STM32F100CB) \
|
||||||
|| defined(CONFIG_ARCH_CHIP_STM32F100R8) || defined(CONFIG_ARCH_CHIP_STM32F100RB) \
|
|| defined(CONFIG_ARCH_CHIP_STM32F100R8) || defined(CONFIG_ARCH_CHIP_STM32F100RB) \
|
||||||
|| defined(CONFIG_ARCH_CHIP_STM32F100V8) || defined(CONFIG_ARCH_CHIP_STM32F100VB)
|
|| defined(CONFIG_ARCH_CHIP_STM32F100V8) || defined(CONFIG_ARCH_CHIP_STM32F100VB)
|
||||||
@@ -87,34 +89,10 @@
|
|||||||
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
||||||
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
||||||
|
|
||||||
#elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6)
|
/* STM32 F103 High Density Family ***************************************************/
|
||||||
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
/* STM32F103RC, STM32F103RD, and STM32F103RE are all provided in 64 pin packages and differ
|
||||||
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
* only in the available FLASH and SRAM.
|
||||||
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
|
*/
|
||||||
# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
|
|
||||||
# undef CONFIG_STM32_VALUELINE /* STM32F100x */
|
|
||||||
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
|
|
||||||
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
|
|
||||||
# undef CONFIG_STM32_STM32F40XX /* STM32F405xx and STM32407xx families */
|
|
||||||
# define STM32_NFSMC 1 /* FSMC */
|
|
||||||
# define STM32_NATIM 1 /* One advanced timer TIM1 */
|
|
||||||
# define STM32_NGTIM 4 /* 16-bit generall timers TIM2,3,4,5 with DMA */
|
|
||||||
# define STM32_NBTIM 0 /* No basic timers */
|
|
||||||
# define STM32_NDMA 2 /* DMA1-2 */
|
|
||||||
# define STM32_NSPI 2 /* SPI1-2 */
|
|
||||||
# define STM32_NI2S 0 /* No I2S (?) */
|
|
||||||
# define STM32_NUSART 3 /* USART1-3 */
|
|
||||||
# define STM32_NI2C 2 /* I2C1-2 */
|
|
||||||
# define STM32_NCAN 1 /* CAN1 */
|
|
||||||
# define STM32_NSDIO 1 /* SDIO */
|
|
||||||
# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */
|
|
||||||
# define STM32_NGPIO 112 /* GPIOA-G */
|
|
||||||
# define STM32_NADC 1 /* ADC1 */
|
|
||||||
# define STM32_NDAC 0 /* No DAC */
|
|
||||||
# define STM32_NCRC 0 /* No CRC */
|
|
||||||
# define STM32_NETHERNET 0 /* No ethernet */
|
|
||||||
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
|
||||||
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
|
||||||
|
|
||||||
#elif defined(CONFIG_ARCH_CHIP_STM32F103RET6)
|
#elif defined(CONFIG_ARCH_CHIP_STM32F103RET6)
|
||||||
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
||||||
@@ -145,7 +123,11 @@
|
|||||||
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
||||||
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
||||||
|
|
||||||
#elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6)
|
/* STM32F103VC, STM32F103VD, and STM32F103VE are all provided in 100 pin packages and differ
|
||||||
|
* only in the available FLASH and SRAM.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6) || defined(CONFIG_ARCH_CHIP_STM32F103VET6)
|
||||||
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
||||||
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
||||||
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
|
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
|
||||||
@@ -174,6 +156,40 @@
|
|||||||
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
||||||
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
||||||
|
|
||||||
|
/* STM32F103ZC, STM32F103ZD, and STM32F103ZE are all provided in 144 pin packages and differ
|
||||||
|
* only in the available FLASH and SRAM.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6)
|
||||||
|
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
||||||
|
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
||||||
|
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
|
||||||
|
# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
|
||||||
|
# undef CONFIG_STM32_VALUELINE /* STM32F100x */
|
||||||
|
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
|
||||||
|
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
|
||||||
|
# undef CONFIG_STM32_STM32F40XX /* STM32F405xx and STM32407xx families */
|
||||||
|
# define STM32_NFSMC 1 /* FSMC */
|
||||||
|
# define STM32_NATIM 1 /* One advanced timer TIM1 */
|
||||||
|
# define STM32_NGTIM 4 /* 16-bit generall timers TIM2,3,4,5 with DMA */
|
||||||
|
# define STM32_NBTIM 0 /* No basic timers */
|
||||||
|
# define STM32_NDMA 2 /* DMA1-2 */
|
||||||
|
# define STM32_NSPI 2 /* SPI1-2 */
|
||||||
|
# define STM32_NI2S 0 /* No I2S (?) */
|
||||||
|
# define STM32_NUSART 3 /* USART1-3 */
|
||||||
|
# define STM32_NI2C 2 /* I2C1-2 */
|
||||||
|
# define STM32_NCAN 1 /* CAN1 */
|
||||||
|
# define STM32_NSDIO 1 /* SDIO */
|
||||||
|
# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */
|
||||||
|
# define STM32_NGPIO 112 /* GPIOA-G */
|
||||||
|
# define STM32_NADC 1 /* ADC1 */
|
||||||
|
# define STM32_NDAC 0 /* No DAC */
|
||||||
|
# define STM32_NCRC 0 /* No CRC */
|
||||||
|
# define STM32_NETHERNET 0 /* No ethernet */
|
||||||
|
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
||||||
|
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
||||||
|
|
||||||
|
/* STM32 F105/F107 Connectivity Line *******************************************************/
|
||||||
#elif defined(CONFIG_ARCH_CHIP_STM32F105VBT7)
|
#elif defined(CONFIG_ARCH_CHIP_STM32F105VBT7)
|
||||||
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
||||||
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
||||||
@@ -232,6 +248,7 @@
|
|||||||
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
||||||
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
||||||
|
|
||||||
|
/* STM32 F2 Family ******************************************************************/
|
||||||
#elif defined(CONFIG_ARCH_CHIP_STM32F207IG) /* UFBGA-176 1024Kb FLASH 128Kb SRAM */
|
#elif defined(CONFIG_ARCH_CHIP_STM32F207IG) /* UFBGA-176 1024Kb FLASH 128Kb SRAM */
|
||||||
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
|
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
|
||||||
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
||||||
@@ -263,6 +280,7 @@
|
|||||||
# define STM32_NRNG 1 /* Random number generator (RNG) */
|
# define STM32_NRNG 1 /* Random number generator (RNG) */
|
||||||
# define STM32_NDCMI 1 /* Digital camera interface (DCMI) */
|
# define STM32_NDCMI 1 /* Digital camera interface (DCMI) */
|
||||||
|
|
||||||
|
/* STM23 F4 Family ******************************************************************/
|
||||||
#elif defined(CONFIG_ARCH_CHIP_STM32F405RG) /* LQFP 64 10x10x1.4 1024Kb FLASH 192Kb SRAM */
|
#elif defined(CONFIG_ARCH_CHIP_STM32F405RG) /* LQFP 64 10x10x1.4 1024Kb FLASH 192Kb SRAM */
|
||||||
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
|
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
|
||||||
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
||||||
|
|||||||
@@ -48,24 +48,51 @@
|
|||||||
|
|
||||||
/* Include the chip pin configuration file */
|
/* Include the chip pin configuration file */
|
||||||
|
|
||||||
|
/* STM32 F1 Family ******************************************************************/
|
||||||
#if defined(CONFIG_STM32_STM32F10XX)
|
#if defined(CONFIG_STM32_STM32F10XX)
|
||||||
|
|
||||||
|
/* STM32F100 Value Line */
|
||||||
|
|
||||||
# if defined(CONFIG_STM32_VALUELINE)
|
# if defined(CONFIG_STM32_VALUELINE)
|
||||||
# include "chip/stm32f100_pinmap.h"
|
# include "chip/stm32f100_pinmap.h"
|
||||||
# elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6)
|
|
||||||
# include "chip/stm32f103ze_pinmap.h"
|
/* STM32 F103 High Density Family */
|
||||||
|
/* STM32F103RC, STM32F103RD, and STM32F103RE are all provided in 64 pin packages and differ
|
||||||
|
* only in the available FLASH and SRAM.
|
||||||
|
*/
|
||||||
|
|
||||||
# elif defined(CONFIG_ARCH_CHIP_STM32F103RET6)
|
# elif defined(CONFIG_ARCH_CHIP_STM32F103RET6)
|
||||||
# include "chip/stm32f103re_pinmap.h"
|
# include "chip/stm32f103re_pinmap.h"
|
||||||
# elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6)
|
|
||||||
|
/* STM32F103VC, STM32F103VD, and STM32F103VE are all provided in 100 pin packages and differ
|
||||||
|
* only in the available FLASH and SRAM.
|
||||||
|
*/
|
||||||
|
|
||||||
|
# elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6) || defined(CONFIG_ARCH_CHIP_STM32F103VET6)
|
||||||
# include "chip/stm32f103vc_pinmap.h"
|
# include "chip/stm32f103vc_pinmap.h"
|
||||||
|
|
||||||
|
/* STM32F103ZC, STM32F103ZD, and STM32F103ZE are all provided in 144 pin packages and differ
|
||||||
|
* only in the available FLASH and SRAM.
|
||||||
|
*/
|
||||||
|
# elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6)
|
||||||
|
# include "chip/stm32f103ze_pinmap.h"
|
||||||
|
|
||||||
|
/* STM32 F105/F107 Connectivity Line */
|
||||||
|
|
||||||
# elif defined(CONFIG_ARCH_CHIP_STM32F105VBT7)
|
# elif defined(CONFIG_ARCH_CHIP_STM32F105VBT7)
|
||||||
# include "chip/stm32f105vb_pinmap.h"
|
# include "chip/stm32f105vb_pinmap.h"
|
||||||
|
|
||||||
# elif defined(CONFIG_ARCH_CHIP_STM32F107VC)
|
# elif defined(CONFIG_ARCH_CHIP_STM32F107VC)
|
||||||
# include "chip/stm32f107vc_pinmap.h"
|
# include "chip/stm32f107vc_pinmap.h"
|
||||||
# else
|
# else
|
||||||
# error "Unsupported STM32F10XXX chip"
|
# error "Unsupported STM32F10XXX chip"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
/* STM32 F2 Family ******************************************************************/
|
||||||
#elif defined(CONFIG_STM32_STM32F20XX)
|
#elif defined(CONFIG_STM32_STM32F20XX)
|
||||||
# include "chip/stm32f20xxx_pinmap.h"
|
# include "chip/stm32f20xxx_pinmap.h"
|
||||||
|
|
||||||
|
/* STM32 F4 Family ******************************************************************/
|
||||||
#elif defined(CONFIG_STM32_STM32F40XX)
|
#elif defined(CONFIG_STM32_STM32F40XX)
|
||||||
# include "chip/stm32f40xxx_pinmap.h"
|
# include "chip/stm32f40xxx_pinmap.h"
|
||||||
#else
|
#else
|
||||||
|
|||||||
+2
-2
@@ -132,13 +132,13 @@ config ARCH_BOARD_EZ80F910200ZCO
|
|||||||
|
|
||||||
config ARCH_BOARD_FIRE_STM32V2
|
config ARCH_BOARD_FIRE_STM32V2
|
||||||
bool "M3 Wildfire STM32v2 board"
|
bool "M3 Wildfire STM32v2 board"
|
||||||
depends on ARCH_CHIP_STM32F103VET
|
depends on ARCH_CHIP_STM32F103VET6
|
||||||
select ARCH_HAVE_LEDS
|
select ARCH_HAVE_LEDS
|
||||||
select ARCH_HAVE_BUTTONS
|
select ARCH_HAVE_BUTTONS
|
||||||
select ARCH_HAVE_IRQBUTTONS
|
select ARCH_HAVE_IRQBUTTONS
|
||||||
---help---
|
---help---
|
||||||
A configuration for the M3 Wildfile board. This board is based on the
|
A configuration for the M3 Wildfile board. This board is based on the
|
||||||
STM32F103VET chip.
|
STM32F103VET6 chip.
|
||||||
|
|
||||||
config ARCH_BOARD_HYMINI_STM32V
|
config ARCH_BOARD_HYMINI_STM32V
|
||||||
bool "HY-Mini STM32v board"
|
bool "HY-Mini STM32v board"
|
||||||
|
|||||||
+1
-1
@@ -1545,7 +1545,7 @@ configs/ez80f0910200zco
|
|||||||
|
|
||||||
configs/fire-stm32v2
|
configs/fire-stm32v2
|
||||||
A configuration for the M3 Wildfire STM32 board. This board is based on the
|
A configuration for the M3 Wildfire STM32 board. This board is based on the
|
||||||
STM32F103VET chip.
|
STM32F103VET6 chip.
|
||||||
|
|
||||||
configs/hymini-stm32v
|
configs/hymini-stm32v
|
||||||
A configuration for the HY-Mini STM32v board. This board is based on the
|
A configuration for the HY-Mini STM32v board. This board is based on the
|
||||||
|
|||||||
+766
-727
File diff suppressed because it is too large
Load Diff
@@ -219,6 +219,14 @@
|
|||||||
* 46 PE15 PE15-FSMC_D12 2.4" TFT + Touchscreen
|
* 46 PE15 PE15-FSMC_D12 2.4" TFT + Touchscreen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(CONFIG_STM32_SPI1) && defined(CONFIG_STM32_SPI1_REMAP)
|
||||||
|
# error "SPI1 requires CONFIG_STM32_SPI1_REMAP=n"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_STM32_I2C1) && defined(CONFIG_STM32_I2C1_REMAP)
|
||||||
|
# error "SPI1 requires CONFIG_STM32_I2C1_REMAP=n"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* AT24C02
|
/* AT24C02
|
||||||
*
|
*
|
||||||
* --- ------ -------------- -------------------------------------------------------------------
|
* --- ------ -------------- -------------------------------------------------------------------
|
||||||
@@ -229,6 +237,10 @@
|
|||||||
* 93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02
|
* 93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(CONFIG_STM32_I2C1) && defined(CONFIG_STM32_I2C1_REMAP)
|
||||||
|
# error "SPI1 requires CONFIG_STM32_I2C1_REMAP=n"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Potentiometer/ADC
|
/* Potentiometer/ADC
|
||||||
*
|
*
|
||||||
* --- ------ -------------- -------------------------------------------------------------------
|
* --- ------ -------------- -------------------------------------------------------------------
|
||||||
@@ -236,7 +248,7 @@
|
|||||||
* --- ------ -------------- -------------------------------------------------------------------
|
* --- ------ -------------- -------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* 16 PC1 PC1/ADC123-IN11 Potentiometer (R16)
|
* 16 PC1 PC1/ADC123-IN11 Potentiometer (R16)
|
||||||
* 24 PA1 PC1/ADC123-IN11
|
* 24 PA1 PC1/ADC123-IN1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* USARTs
|
/* USARTs
|
||||||
@@ -245,12 +257,20 @@
|
|||||||
* PIN NAME SIGNAL NOTES
|
* PIN NAME SIGNAL NOTES
|
||||||
* --- ------ -------------- -------------------------------------------------------------------
|
* --- ------ -------------- -------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* 25 PA2 PA2-US2-TX MAX3232, DB9 D7
|
* 68 PA9 PA9-US1-TX MAX3232, DB9 D8, Requires CONFIG_STM32_USART1_REMAP
|
||||||
* 26 PA3 PA3-US2-RX MAX3232, DB9 D7
|
* 69 PA10 PA10-US1-RX MAX3232, DB9 D8, Requires CONFIG_STM32_USART1_REMAP
|
||||||
* 68 PA9 PA9-US1-TX MAX3232, DB9 D8
|
* 25 PA2 PA2-US2-TX MAX3232, DB9 D7, Requires !CONFIG_STM32_USART2_REMAP
|
||||||
* 69 PA10 PA10-US1-RX MAX3232, DB9 D8
|
* 26 PA3 PA3-US2-RX MAX3232, DB9 D7, Requires !CONFIG_STM32_USART2_REMAP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(CONFIG_STM32_USART1) && !defined(CONFIG_STM32_USART1_REMAP)
|
||||||
|
# errror "USART1 requires CONFIG_STM32_USART1_REMAP=y"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_STM32_USART2) && defined()
|
||||||
|
# errror "USART2 requires CONFIG_STM32_USART2_REMAP=n"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ENC28J60
|
/* ENC28J60
|
||||||
*
|
*
|
||||||
* --- ------ -------------- -------------------------------------------------------------------
|
* --- ------ -------------- -------------------------------------------------------------------
|
||||||
@@ -260,6 +280,10 @@
|
|||||||
* 29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH
|
* 29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(CONFIG_STM32_SPI1) && defined(CONFIG_STM32_SPI1_REMAP)
|
||||||
|
# error "SPI1 requires CONFIG_STM32_SPI1_REMAP=n"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* MP3
|
/* MP3
|
||||||
*
|
*
|
||||||
* --- ------ -------------- -------------------------------------------------------------------
|
* --- ------ -------------- -------------------------------------------------------------------
|
||||||
@@ -299,6 +323,10 @@
|
|||||||
* 96 PB9 PB9-CAN-TX CAN tranceiver, Header 2H
|
* 96 PB9 PB9-CAN-TX CAN tranceiver, Header 2H
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(CONFIG_STM32_CAN1) && !defined(CONFIG_STM32_CAN1_REMAP1)
|
||||||
|
# error "SPI1 requires CONFIG_STM32_CAN1_REMAP1=y"
|
||||||
|
#endif
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|||||||
@@ -0,0 +1,196 @@
|
|||||||
|
############################################################################
|
||||||
|
# configs/fire-stm32v2/nsh/Make.defs
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||||
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
include ${TOPDIR}/.config
|
||||||
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
|
||||||
|
# Setup for the selected toolchain
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_STM32_CODESOURCERYW),y)
|
||||||
|
# CodeSourcery under Windows
|
||||||
|
CROSSDEV = arm-none-eabi-
|
||||||
|
ARCROSSDEV = arm-none-eabi-
|
||||||
|
WINTOOL = y
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_STM32_CODESOURCERYL),y)
|
||||||
|
# CodeSourcery under Linux
|
||||||
|
CROSSDEV = arm-none-eabi-
|
||||||
|
ARCROSSDEV = arm-none-eabi-
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
MAXOPTIMIZATION = -O2
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_STM32_ATOLLIC_LITE),y)
|
||||||
|
# Atollic toolchain under Windows
|
||||||
|
CROSSDEV = arm-atollic-eabi-
|
||||||
|
ARCROSSDEV =
|
||||||
|
WINTOOL = y
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_STM32_ATOLLIC_PRO),y)
|
||||||
|
# Atollic toolchain under Windows
|
||||||
|
CROSSDEV = arm-atollic-eabi-
|
||||||
|
ARCROSSDEV = arm-atollic-eabi-
|
||||||
|
WINTOOL = y
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_STM32_DEVKITARM),y)
|
||||||
|
# devkitARM under Windows
|
||||||
|
CROSSDEV = arm-eabi-
|
||||||
|
ARCROSSDEV = arm-eabi-
|
||||||
|
WINTOOL = y
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_STM32_RAISONANCE),y)
|
||||||
|
# Raisonance RIDE7 under Windows
|
||||||
|
CROSSDEV = arm-none-eabi-
|
||||||
|
ARCROSSDEV = arm-none-eabi-
|
||||||
|
WINTOOL = y
|
||||||
|
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_STM32_BUILDROOT),y)
|
||||||
|
# NuttX buildroot under Linux or Cygwin
|
||||||
|
CROSSDEV = arm-elf-
|
||||||
|
ARCROSSDEV = arm-elf-
|
||||||
|
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
||||||
|
MAXOPTIMIZATION = -Os
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Pick the linker script
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_STM32_DFU),y)
|
||||||
|
LDSCRIPT = ld.script.dfu
|
||||||
|
else
|
||||||
|
LDSCRIPT = ld.script
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(WINTOOL),y)
|
||||||
|
# Windows-native toolchains
|
||||||
|
DIRLINK = $(TOPDIR)/tools/winlink.sh
|
||||||
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||||
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
|
MAXOPTIMIZATION = -O2
|
||||||
|
else
|
||||||
|
# Linux/Cygwin-native toolchain
|
||||||
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
|
endif
|
||||||
|
|
||||||
|
CC = $(CROSSDEV)gcc
|
||||||
|
CXX = $(CROSSDEV)g++
|
||||||
|
CPP = $(CROSSDEV)gcc -E
|
||||||
|
LD = $(CROSSDEV)ld
|
||||||
|
AR = $(ARCROSSDEV)ar rcs
|
||||||
|
NM = $(ARCROSSDEV)nm
|
||||||
|
OBJCOPY = $(CROSSDEV)objcopy
|
||||||
|
OBJDUMP = $(CROSSDEV)objdump
|
||||||
|
|
||||||
|
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
|
||||||
|
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
|
||||||
|
|
||||||
|
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
|
||||||
|
ARCHOPTIMIZATION = -g
|
||||||
|
else
|
||||||
|
ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||||
|
endif
|
||||||
|
|
||||||
|
ARCHCFLAGS = -fno-builtin
|
||||||
|
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
|
||||||
|
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||||
|
ARCHWARNINGSXX = -Wall -Wshadow
|
||||||
|
ARCHDEFINES =
|
||||||
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
|
|
||||||
|
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||||
|
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||||
|
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||||
|
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||||
|
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||||
|
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||||
|
|
||||||
|
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||||
|
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld -no-check-sections
|
||||||
|
LDNXFLATFLAGS = -e main -s 2048
|
||||||
|
|
||||||
|
OBJEXT = .o
|
||||||
|
LIBEXT = .a
|
||||||
|
EXEEXT =
|
||||||
|
|
||||||
|
ifneq ($(CROSSDEV),arm-elf-)
|
||||||
|
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
|
LDFLAGS += -g
|
||||||
|
endif
|
||||||
|
|
||||||
|
define PREPROCESS
|
||||||
|
@echo "CPP: $1->$2"
|
||||||
|
@$(CPP) $(CPPFLAGS) $1 -o $2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define COMPILE
|
||||||
|
@echo "CC: $1"
|
||||||
|
@$(CC) -c $(CFLAGS) $1 -o $2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define COMPILEXX
|
||||||
|
@echo "CXX: $1"
|
||||||
|
@$(CXX) -c $(CXXFLAGS) $1 -o $2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define ASSEMBLE
|
||||||
|
@echo "AS: $1"
|
||||||
|
@$(CC) -c $(AFLAGS) $1 -o $2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define ARCHIVE
|
||||||
|
echo "AR: $2"; \
|
||||||
|
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
|
||||||
|
endef
|
||||||
|
|
||||||
|
define CLEAN
|
||||||
|
@rm -f *.o *.a
|
||||||
|
endef
|
||||||
|
|
||||||
|
HOSTCC = gcc
|
||||||
|
HOSTINCLUDES = -I.
|
||||||
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
|
HOSTLDFLAGS =
|
||||||
|
|
||||||
Executable
+78
@@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# configs/fire-stm32v2/nsh/setenv.sh
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||||
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ "$_" = "$0" ] ; then
|
||||||
|
echo "You must source this script, not run it!" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
WD=`pwd`
|
||||||
|
if [ ! -x "setenv.sh" ]; then
|
||||||
|
echo "This script must be executed from the top-level NuttX build directory"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${PATH_ORIG}" ]; then
|
||||||
|
export PATH_ORIG="${PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This the Cygwin path to the location where I installed the RIDE
|
||||||
|
# toolchain under windows. You will also have to edit this if you install
|
||||||
|
# the RIDE toolchain in any other location
|
||||||
|
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin"
|
||||||
|
|
||||||
|
# This the Cygwin path to the location where I installed the CodeSourcery
|
||||||
|
# toolchain under windows. You will also have to edit this if you install
|
||||||
|
# the CodeSourcery toolchain in any other location
|
||||||
|
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
|
||||||
|
|
||||||
|
# These are the Cygwin paths to the locations where I installed the Atollic
|
||||||
|
# toolchain under windows. You will also have to edit this if you install
|
||||||
|
# the Atollic toolchain in any other location. /usr/bin is added before
|
||||||
|
# the Atollic bin path because there is are binaries named gcc.exe and g++.exe
|
||||||
|
# at those locations as well.
|
||||||
|
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin"
|
||||||
|
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin"
|
||||||
|
|
||||||
|
# This the Cygwin path to the location where I build the buildroot
|
||||||
|
# toolchain.
|
||||||
|
#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
|
||||||
|
|
||||||
|
# This is the path to the tools/ subdirectory
|
||||||
|
export TOOLS_DIR="${WD}/configs/fire-stm32v2/tools"
|
||||||
|
|
||||||
|
# Add the path to the toolchain to the PATH variable
|
||||||
|
export PATH="${TOOLCHAIN_BIN}:${TOOLS_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||||
|
|
||||||
|
echo "PATH : ${PATH}"
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* configs/fire-stm32v2/scripts/ld.script
|
||||||
|
*
|
||||||
|
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||||
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
* the documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
* used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* The STM32F103VET6 has 512Kb of FLASH beginning at address 0x0800:0000 and
|
||||||
|
* 64Kb of SRAM beginning at address 0x2000:0000. When booting from FLASH,
|
||||||
|
* FLASH memory is aliased to address 0x0000:0000 where the code expects to
|
||||||
|
* begin execution by jumping to the entry point in the 0x0800:0000 address
|
||||||
|
* range.
|
||||||
|
*/
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
flash (rx) : ORIGIN = 0x08000000, LENGTH = 512K
|
||||||
|
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||||
|
}
|
||||||
|
|
||||||
|
OUTPUT_ARCH(arm)
|
||||||
|
ENTRY(_stext)
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text : {
|
||||||
|
_stext = ABSOLUTE(.);
|
||||||
|
*(.vectors)
|
||||||
|
*(.text .text.*)
|
||||||
|
*(.fixup)
|
||||||
|
*(.gnu.warning)
|
||||||
|
*(.rodata .rodata.*)
|
||||||
|
*(.gnu.linkonce.t.*)
|
||||||
|
*(.glue_7)
|
||||||
|
*(.glue_7t)
|
||||||
|
*(.got)
|
||||||
|
*(.gcc_except_table)
|
||||||
|
*(.gnu.linkonce.r.*)
|
||||||
|
_etext = ABSOLUTE(.);
|
||||||
|
} > flash
|
||||||
|
|
||||||
|
_eronly = ABSOLUTE(.);
|
||||||
|
|
||||||
|
/* The STM32F103Z has 64Kb of SRAM beginning at the following address */
|
||||||
|
|
||||||
|
.data : {
|
||||||
|
_sdata = ABSOLUTE(.);
|
||||||
|
*(.data .data.*)
|
||||||
|
*(.gnu.linkonce.d.*)
|
||||||
|
CONSTRUCTORS
|
||||||
|
_edata = ABSOLUTE(.);
|
||||||
|
} > sram AT > flash
|
||||||
|
|
||||||
|
.ARM.extab : {
|
||||||
|
*(.ARM.extab*)
|
||||||
|
} >sram
|
||||||
|
|
||||||
|
__exidx_start = ABSOLUTE(.);
|
||||||
|
.ARM.exidx : {
|
||||||
|
*(.ARM.exidx*)
|
||||||
|
} >sram
|
||||||
|
__exidx_end = ABSOLUTE(.);
|
||||||
|
|
||||||
|
.bss : {
|
||||||
|
_sbss = ABSOLUTE(.);
|
||||||
|
*(.bss .bss.*)
|
||||||
|
*(.gnu.linkonce.b.*)
|
||||||
|
*(COMMON)
|
||||||
|
_ebss = ABSOLUTE(.);
|
||||||
|
} > sram
|
||||||
|
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
.comment 0 : { *(.comment) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_info 0 : { *(.debug_info) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* configs/fire-stm32v2/scripts/ld.script.dfu
|
||||||
|
*
|
||||||
|
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||||
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
* the documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
* used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* The STM32F103VET6 has 512Kb of FLASH beginning at address 0x0800:0000 and
|
||||||
|
* 64Kb of SRAM beginning at address 0x2000:0000. Here we assume that the
|
||||||
|
* STM3210E-EVAL's DFU bootloader is being used. In that case, the corrct
|
||||||
|
* load .text load address is 0x08003000 (leaving 464Kb).
|
||||||
|
*/
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
flash (rx) : ORIGIN = 0x08003000, LENGTH = 464K
|
||||||
|
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||||
|
}
|
||||||
|
|
||||||
|
OUTPUT_ARCH(arm)
|
||||||
|
ENTRY(_stext)
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text : {
|
||||||
|
_stext = ABSOLUTE(.);
|
||||||
|
*(.vectors)
|
||||||
|
*(.text .text.*)
|
||||||
|
*(.fixup)
|
||||||
|
*(.gnu.warning)
|
||||||
|
*(.rodata .rodata.*)
|
||||||
|
*(.gnu.linkonce.t.*)
|
||||||
|
*(.glue_7)
|
||||||
|
*(.glue_7t)
|
||||||
|
*(.got)
|
||||||
|
*(.gcc_except_table)
|
||||||
|
*(.gnu.linkonce.r.*)
|
||||||
|
_etext = ABSOLUTE(.);
|
||||||
|
} > flash
|
||||||
|
|
||||||
|
_eronly = ABSOLUTE(.);
|
||||||
|
|
||||||
|
/* The STM32F103Z has 64Kb of SRAM beginning at the following address */
|
||||||
|
|
||||||
|
.data : {
|
||||||
|
_sdata = ABSOLUTE(.);
|
||||||
|
*(.data .data.*)
|
||||||
|
*(.gnu.linkonce.d.*)
|
||||||
|
CONSTRUCTORS
|
||||||
|
_edata = ABSOLUTE(.);
|
||||||
|
} > sram AT > flash
|
||||||
|
|
||||||
|
.ARM.extab : {
|
||||||
|
*(.ARM.extab*)
|
||||||
|
} >sram
|
||||||
|
|
||||||
|
__exidx_start = ABSOLUTE(.);
|
||||||
|
.ARM.exidx : {
|
||||||
|
*(.ARM.exidx*)
|
||||||
|
} >sram
|
||||||
|
__exidx_end = ABSOLUTE(.);
|
||||||
|
|
||||||
|
.bss : {
|
||||||
|
_sbss = ABSOLUTE(.);
|
||||||
|
*(.bss .bss.*)
|
||||||
|
*(.gnu.linkonce.b.*)
|
||||||
|
*(COMMON)
|
||||||
|
_ebss = ABSOLUTE(.);
|
||||||
|
} > sram
|
||||||
|
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
.comment 0 : { *(.comment) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_info 0 : { *(.debug_info) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user