File tree Expand file tree Collapse file tree 20 files changed +198
-73
lines changed
cmsis/TARGET_STM/TARGET_STM32F4
TARGET_MTS_DRAGONFLY_F411RE
hal/TARGET_STM/TARGET_STM32F4
TARGET_MTS_DRAGONFLY_F411RE Expand file tree Collapse file tree 20 files changed +198
-73
lines changed Original file line number Diff line number Diff line change 28
28
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29
29
30
30
; STM32F411RE: 512 KB FLASH (0x80000) + 128 KB SRAM (0x20000)
31
- LR_IROM1 0x08000000 0x80000 { ; load region size_region
31
+ ; FIRST 64 KB FLASH FOR BOOTLOADER
32
+ ; REST 448 KB FLASH FOR APPLICATION
33
+ LR_IROM1 0x08010000 0x70000 { ; load region size_region
32
34
33
- ER_IROM1 0x08000000 0x80000 { ; load address = execution address
35
+ ER_IROM1 0x08010000 0x70000 { ; load address = execution address
34
36
*.o (RESET, +First)
35
37
*(InRoot$$Sections)
36
38
.ANY (+RO)
Original file line number Diff line number Diff line change 28
28
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29
29
30
30
; STM32F411RE: 512 KB FLASH (0x80000) + 128 KB SRAM (0x20000)
31
- LR_IROM1 0x08000000 0x80000 { ; load region size_region
31
+ ; FIRST 64 KB FLASH FOR BOOTLOADER
32
+ ; REST 448 KB FLASH FOR APPLICATION
33
+ LR_IROM1 0x08010000 0x70000 { ; load region size_region
32
34
33
- ER_IROM1 0x08000000 0x80000 { ; load address = execution address
35
+ ER_IROM1 0x08010000 0x70000 { ; load address = execution address
34
36
*.o (RESET, +First)
35
37
*(InRoot$$Sections)
36
38
.ANY (+RO)
Original file line number Diff line number Diff line change 3
3
/* Linker script to configure memory regions. */
4
4
MEMORY
5
5
{
6
- FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
6
+ /* First 64kB of flash reserved for bootloader */
7
+ /* Other 448kB for application */
8
+ FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 448K
7
9
/* CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K */
8
10
RAM (rwx) : ORIGIN = 0x20000198, LENGTH = 128k - 0x198
9
11
}
Original file line number Diff line number Diff line change 1
1
/* [ROM = 512kb = 0x80000] */
2
- define symbol __intvec_start__ = 0x08000000 ;
3
- define symbol __region_ROM_start__ = 0x08000000 ;
2
+ define symbol __intvec_start__ = 0x08010000 ;
3
+ define symbol __region_ROM_start__ = 0x08010000 ;
4
4
define symbol __region_ROM_end__ = 0x0807FFFF;
5
5
6
6
/* [RAM = 128kb = 0x20000] Vector table dynamic copy: 102 vectors = 408 bytes (0x198) to be reserved in RAM */
@@ -15,9 +15,10 @@ define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM_end__]
15
15
define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
16
16
17
17
/* Stack and Heap */
18
- /*Heap 1/4 of ram and stack 1/8*/
19
- define symbol __size_cstack__ = 0x4000;
20
- define symbol __size_heap__ = 0x8000;
18
+ /* Stack: 4kB - 408B for vector table */
19
+ /* Heap: 96kB */
20
+ define symbol __size_cstack__ = 0xe68;
21
+ define symbol __size_heap__ = 0x18000;
21
22
define block CSTACK with alignment = 8, size = __size_cstack__ { };
22
23
define block HEAP with alignment = 8, size = __size_heap__ { };
23
24
define block STACKHEAP with fixed order { block HEAP, block CSTACK };
Original file line number Diff line number Diff line change 31
31
#include "cmsis_nvic.h"
32
32
33
33
#define NVIC_RAM_VECTOR_ADDRESS (0x20000000) // Vectors positioned at start of RAM
34
- #define NVIC_FLASH_VECTOR_ADDRESS (0x08000000 ) // Initial vector position in flash
34
+ #define NVIC_FLASH_VECTOR_ADDRESS (FLASH_BASE | VECT_TAB_OFFSET ) // Initial vector position in flash
35
35
36
36
void NVIC_SetVector (IRQn_Type IRQn , uint32_t vector ) {
37
37
uint32_t * vectors = (uint32_t * )SCB -> VTOR ;
Original file line number Diff line number Diff line change 124
124
/*!< Uncomment the following line if you need to relocate your vector Table in
125
125
Internal SRAM. */
126
126
/* #define VECT_TAB_SRAM */
127
+ #ifndef VECT_TAB_OFFSET
127
128
#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
128
129
This value must be a multiple of 0x200. */
130
+ #endif
129
131
/******************************************************************************/
130
132
131
133
/**
Original file line number Diff line number Diff line change 28
28
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29
29
30
30
; STM32F411RE: 512 KB FLASH (0x80000) + 128 KB SRAM (0x20000)
31
- LR_IROM1 0x08000000 0x80000 { ; load region size_region
31
+ ; FIRST 64 KB FLASH FOR BOOTLOADER
32
+ ; REST 448 KB FLASH FOR APPLICATION
33
+ LR_IROM1 0x08010000 0x70000 { ; load region size_region
32
34
33
- ER_IROM1 0x08000000 0x80000 { ; load address = execution address
35
+ ER_IROM1 0x08010000 0x70000 { ; load address = execution address
34
36
*.o (RESET, +First)
35
37
*(InRoot$$Sections)
36
38
.ANY (+RO)
Original file line number Diff line number Diff line change 28
28
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29
29
30
30
; STM32F411RE: 512 KB FLASH (0x80000) + 128 KB SRAM (0x20000)
31
- LR_IROM1 0x08000000 0x80000 { ; load region size_region
31
+ ; FIRST 64 KB FLASH FOR BOOTLOADER
32
+ ; REST 448 KB FLASH FOR APPLICATION
33
+ LR_IROM1 0x08010000 0x70000 { ; load region size_region
32
34
33
- ER_IROM1 0x08000000 0x80000 { ; load address = execution address
35
+ ER_IROM1 0x08010000 0x70000 { ; load address = execution address
34
36
*.o (RESET, +First)
35
37
*(InRoot$$Sections)
36
38
.ANY (+RO)
Original file line number Diff line number Diff line change 1
1
/* Linker script to configure memory regions. */
2
2
MEMORY
3
3
{
4
- FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
5
- RAM (rwx) : ORIGIN = 0x20000198, LENGTH = 128k - 0x198
4
+ /* First 64kB of flash reserved for bootloader */
5
+ /* Other 448kB for application */
6
+ FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 448K
7
+ RAM (rwx) : ORIGIN = 0x20000198, LENGTH = 128k - 0x198
6
8
}
7
9
8
10
/* Linker script to place sections and symbol values. Should be used together
Original file line number Diff line number Diff line change 1
1
/* [ROM = 512kb = 0x80000] */
2
2
define symbol __intvec_start__ = 0x08000000;
3
- define symbol __region_ROM_start__ = 0x08000000 ;
3
+ define symbol __region_ROM_start__ = 0x08010000 ;
4
4
define symbol __region_ROM_end__ = 0x0807FFFF;
5
5
6
6
/* [RAM = 128kb = 0x20000] Vector table dynamic copy: 102 vectors = 408 bytes (0x198) to be reserved in RAM */
Original file line number Diff line number Diff line change 31
31
#include "cmsis_nvic.h"
32
32
33
33
#define NVIC_RAM_VECTOR_ADDRESS (0x20000000) // Vectors positioned at start of RAM
34
- #define NVIC_FLASH_VECTOR_ADDRESS (0x08000000 ) // Initial vector position in flash
34
+ #define NVIC_FLASH_VECTOR_ADDRESS (FLASH_BASE | VECT_TAB_OFFSET ) // Initial vector position in flash
35
35
36
36
void NVIC_SetVector (IRQn_Type IRQn , uint32_t vector ) {
37
37
uint32_t * vectors = (uint32_t * )SCB -> VTOR ;
Original file line number Diff line number Diff line change 125
125
/*!< Uncomment the following line if you need to relocate your vector Table in
126
126
Internal SRAM. */
127
127
/* #define VECT_TAB_SRAM */
128
+ #ifndef VECT_TAB_OFFSET
128
129
#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
129
130
This value must be a multiple of 0x200. */
131
+ #endif
130
132
/******************************************************************************/
131
133
132
134
/**
Original file line number Diff line number Diff line change @@ -150,13 +150,24 @@ typedef enum {
150
150
LED2 = D3 ,
151
151
LED3 = D3 ,
152
152
LED4 = D3 ,
153
- USER_BUTTON = PC_13 ,
154
- SERIAL_TX = PB_6 ,
155
- SERIAL_RX = PB_7 ,
156
- USBTX = SERIAL_TX ,
157
- USBRX = SERIAL_RX ,
153
+ SERIAL_TX = D1 ,
154
+ SERIAL_RX = D0 ,
155
+ SERIAL_RTS = A1 ,
156
+ SERIAL_CTS = A0 ,
157
+ SERIAL_DCD = D5 ,
158
+ SERIAL_DSR = D8 ,
159
+ SERIAL_DTR = D4 ,
160
+ SERIAL_RI = D9 ,
161
+ USBTX = PB_6 ,
162
+ USBRX = PB_7 ,
158
163
RADIO_TX = PC_7 ,
159
164
RADIO_RX = PC_6 ,
165
+ RADIO_RTS = PB_10 ,
166
+ RADIO_CTS = PB_12 ,
167
+ RADIO_DCD = D5 ,
168
+ RADIO_DSR = D8 ,
169
+ RADIO_DTR = D4 ,
170
+ RADIO_RI = D9 ,
160
171
I2C_SCL = D15 ,
161
172
I2C_SDA = D14 ,
162
173
SPI_MOSI = PC_12 ,
Original file line number Diff line number Diff line change @@ -46,9 +46,9 @@ typedef enum {
46
46
UART_6 = (int )USART6_BASE
47
47
} UARTName ;
48
48
49
- #define STDIO_UART_TX PA_2
50
- #define STDIO_UART_RX PA_3
51
- #define STDIO_UART UART_2
49
+ #define STDIO_UART_TX PA_9
50
+ #define STDIO_UART_RX PA_10
51
+ #define STDIO_UART UART_1
52
52
53
53
typedef enum {
54
54
SPI_1 = (int )SPI1_BASE ,
Original file line number Diff line number Diff line change @@ -122,48 +122,79 @@ typedef enum {
122
122
PH_1 = 0x71 ,
123
123
124
124
// Generic signals namings
125
- DOUT = PA_2 ,
126
- DIN = PA_3 ,
127
- AD0 = PB_1 ,
128
- AD1 = PB_0 ,
129
- AD2 = PA_5 ,
130
- AD3 = PA_4 ,
131
- AD4 = PA_7 ,
132
- AD5 = PC_1 ,
133
- AD6 = PA_1 ,
134
- DIO0 = PB_1 ,
135
- DIO1 = PB_0 ,
136
- DIO2 = PA_5 ,
137
- DIO3 = PA_4 ,
138
- DIO4 = PA_7 ,
139
- DIO5 = PC_1 ,
140
- DIO6 = PA_1 ,
141
- DO8 = PA_6 ,
142
- DI8 = PA_11 ,
143
- PWM0 = PA_8 ,
144
- PWM1 = PC_9 ,
145
- NCTS = PA_0 ,
146
- RTS = PA_1 ,
147
- NDTR = PA_11 ,
148
- RSSI = PA_8 ,
149
- SLEEPRQ = PA_11 ,
150
- ON_SLEEP = PA_12 ,
151
- ASSOCIATE = PC_1 ,
152
-
153
- LED1 = PA_2 ,
154
- LED2 = PA_2 ,
155
- LED3 = PA_2 ,
156
- LED4 = PA_2 ,
157
- SERIAL_TX = PA_9 ,
158
- SERIAL_RX = PA_10 ,
159
- USBTX = PA_2 ,
160
- USBRX = PA_3 ,
125
+ XBEE_DOUT = PA_2 ,
126
+ XBEE_DIN = PA_3 ,
127
+ XBEE_AD0 = PB_1 ,
128
+ XBEE_AD1 = PB_0 ,
129
+ XBEE_AD2 = PA_5 ,
130
+ XBEE_AD3 = PA_4 ,
131
+ XBEE_AD4 = PA_7 ,
132
+ XBEE_AD5 = PC_1 ,
133
+ XBEE_AD6 = PA_1 ,
134
+ XBEE_DIO0 = PB_1 ,
135
+ XBEE_DIO1 = PB_0 ,
136
+ XBEE_DIO2 = PA_5 ,
137
+ XBEE_DIO3 = PA_4 ,
138
+ XBEE_DIO4 = PA_7 ,
139
+ XBEE_DIO5 = PC_1 ,
140
+ XBEE_DIO6 = PA_1 ,
141
+ XBEE_DO8 = PA_6 ,
142
+ XBEE_DI8 = PA_11 ,
143
+ XBEE_PWM0 = PA_8 ,
144
+ XBEE_PWM1 = PC_9 ,
145
+ XBEE_CTS = PA_0 ,
146
+ XBEE_RTS = PA_1 ,
147
+ XBEE_DTR = PA_11 ,
148
+ XBEE_RSSI = PA_8 ,
149
+ XBEE_SLEEPRQ = PA_11 ,
150
+ XBEE_ON_SLEEP = PC_13 ,
151
+ XBEE_ASSOCIATE = PC_1 ,
152
+ XBEE_USB_RES = PA_12 ,
153
+
154
+ // needed for mbed to build tests
155
+ LED1 = PA_0 ,
156
+
157
+ // XBEE_DOUT/DIN, RS232 port on UDK board
158
+ SERIAL_TX = PA_2 ,
159
+ SERIAL_RX = PA_3 ,
160
+
161
+ // DB_TX/RX, USB port on UDK board
162
+ DB_TX = PA_9 ,
163
+ DB_RX = PA_10 ,
164
+ USBTX = PA_9 ,
165
+ USBRX = PA_10 ,
166
+
167
+ // Multiplexed with XBEE pins
161
168
I2C_SCL = PA_8 ,
162
169
I2C_SDA = PC_9 ,
163
- SPI_MOSI = PA_7 ,
164
- SPI_MISO = PA_6 ,
165
- SPI_SCK = PA_5 ,
166
- SPI_CS = PA_4 ,
170
+ SPI1_MOSI = PA_7 ,
171
+ SPI1_MISO = PA_6 ,
172
+ SPI1_SCK = PA_5 ,
173
+ SPI1_CS = PA_4 ,
174
+
175
+ // SPI flash
176
+ SPI3_MOSI = PC_12 ,
177
+ SPI3_MISO = PC_11 ,
178
+ SPI3_SCK = PC_10 ,
179
+ SPI3_CS = PC_6 ,
180
+ FLASH_HOLD = PC_7 ,
181
+ FLASH_WP = PC_8 ,
182
+
183
+ // LoRa
184
+ LORA_RESET = PC_0 ,
185
+ LORA_RXCTL = PC_2 ,
186
+ LORA_TXCTL = PC_3 ,
187
+ LORA_DIO0 = PB_5 ,
188
+ LORA_DIO1 = PB_6 ,
189
+ LORA_DIO2 = PB_7 ,
190
+ LORA_DIO3 = PB_8 ,
191
+ LORA_DIO4 = PB_9 ,
192
+ LORA_DIO5 = PB_10 ,
193
+ // LoRa/SPI2
194
+ LORA_NSS = PB_12 ,
195
+ LORA_SCK = PB_13 ,
196
+ LORA_MISO = PB_14 ,
197
+ LORA_MOSI = PB_15 ,
167
198
168
199
// Not connected
169
200
NC = (int )0xFFFFFFFF
Original file line number Diff line number Diff line change 593
593
</option >
594
594
<option >
595
595
<name >OCOutputOverride</name >
596
- <state >0 </state >
596
+ <state >1 </state >
597
597
</option >
598
598
<option >
599
599
<name >OOCOutputFile</name >
600
- <state >{{name}} .bin</state >
600
+ <state >application .bin</state >
601
601
</option >
602
602
<option >
603
603
<name >OOCCommandLineProducer</name >
627
627
<archiveVersion >1</archiveVersion >
628
628
<data >
629
629
<prebuild ></prebuild >
630
- <postbuild ></postbuild >
630
+ <postbuild >"$PROJ_DIR$\post-build.bat" "$TARGET_DIR$" </postbuild >
631
631
</data >
632
632
</settings >
633
633
<settings >
711
711
</option >
712
712
<option >
713
713
<name >IlinkIcfOverride</name >
714
- <state >0 </state >
714
+ <state >1 </state >
715
715
</option >
716
716
<option >
717
717
<name >IlinkIcfFile</name >
Original file line number Diff line number Diff line change 28
28
29
29
TOOLS = join (ROOT , "workspace_tools" )
30
30
TOOLS_DATA = join (TOOLS , "data" )
31
+ TOOLS_BOOTLOADERS = join (TOOLS , "bootloaders" )
31
32
32
33
# mbed libraries
33
34
MBED_BASE = join (LIB_DIR , "mbed" )
You can’t perform that action at this time.
0 commit comments