diff options
Diffstat (limited to 'os')
-rw-r--r-- | os/common/ports/ARMCMx/compilers/GCC/ld/STM32F031x6.ld | 53 | ||||
-rw-r--r-- | os/common/ports/ARMCMx/compilers/GCC/ld/STM32F042x6.ld | 53 | ||||
-rw-r--r-- | os/hal/boards/ST_NUCLEO32_F031K6/board.h | 8 | ||||
-rw-r--r-- | os/hal/boards/ST_NUCLEO32_F031K6/cfg/board.chcfg | 4 | ||||
-rw-r--r-- | os/hal/boards/ST_NUCLEO32_F042K6/board.h | 8 | ||||
-rw-r--r-- | os/hal/boards/ST_NUCLEO32_F042K6/cfg/board.chcfg | 4 |
6 files changed, 118 insertions, 12 deletions
diff --git a/os/common/ports/ARMCMx/compilers/GCC/ld/STM32F031x6.ld b/os/common/ports/ARMCMx/compilers/GCC/ld/STM32F031x6.ld new file mode 100644 index 000000000..cb479f1b3 --- /dev/null +++ b/os/common/ports/ARMCMx/compilers/GCC/ld/STM32F031x6.ld @@ -0,0 +1,53 @@ +/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio.
+
+ This file is part of ChibiOS.
+
+ ChibiOS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * STM32F031x6 memory setup.
+ */
+MEMORY
+{
+ flash : org = 0x08000000, len = 32k
+ ram0 : org = 0x20000000, len = 4k
+ ram1 : org = 0x00000000, len = 0
+ ram2 : org = 0x00000000, len = 0
+ ram3 : org = 0x00000000, len = 0
+ ram4 : org = 0x00000000, len = 0
+ ram5 : org = 0x00000000, len = 0
+ ram6 : org = 0x00000000, len = 0
+ ram7 : org = 0x00000000, len = 0
+}
+
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
+/* RAM region to be used for the default heap.*/
+REGION_ALIAS("HEAP_RAM", ram0);
+
+INCLUDE rules.ld
diff --git a/os/common/ports/ARMCMx/compilers/GCC/ld/STM32F042x6.ld b/os/common/ports/ARMCMx/compilers/GCC/ld/STM32F042x6.ld new file mode 100644 index 000000000..b3e0f7390 --- /dev/null +++ b/os/common/ports/ARMCMx/compilers/GCC/ld/STM32F042x6.ld @@ -0,0 +1,53 @@ +/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio.
+
+ This file is part of ChibiOS.
+
+ ChibiOS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ ChibiOS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * STM32F042x6 memory setup.
+ */
+MEMORY
+{
+ flash : org = 0x08000000, len = 32k
+ ram0 : org = 0x20000000, len = 6k
+ ram1 : org = 0x00000000, len = 0
+ ram2 : org = 0x00000000, len = 0
+ ram3 : org = 0x00000000, len = 0
+ ram4 : org = 0x00000000, len = 0
+ ram5 : org = 0x00000000, len = 0
+ ram6 : org = 0x00000000, len = 0
+ ram7 : org = 0x00000000, len = 0
+}
+
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
+/* RAM region to be used for the default heap.*/
+REGION_ALIAS("HEAP_RAM", ram0);
+
+INCLUDE rules.ld
diff --git a/os/hal/boards/ST_NUCLEO32_F031K6/board.h b/os/hal/boards/ST_NUCLEO32_F031K6/board.h index 5877d52ec..12867057e 100644 --- a/os/hal/boards/ST_NUCLEO32_F031K6/board.h +++ b/os/hal/boards/ST_NUCLEO32_F031K6/board.h @@ -219,7 +219,7 @@ *
* PA0 - ARD_A0 (input pullup).
* PA1 - ARD_A1 (input pullup).
- * PA2 - VCP_TX (alternate 7).
+ * PA2 - VCP_TX (alternate 1).
* PA3 - ARD_A2 (input pullup).
* PA4 - ARD_A3 (input pullup).
* PA5 - ARD_A4 (input floating).
@@ -232,7 +232,7 @@ * PA12 - ARD_D2 (input pullup).
* PA13 - SWDIO (alternate 0).
* PA14 - SWCLK (alternate 0).
- * PA15 - VCP_RX (alternate 7).
+ * PA15 - VCP_RX (alternate 1).
*/
#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_ARD_A0) | \
PIN_MODE_INPUT(GPIOA_ARD_A1) | \
@@ -316,7 +316,7 @@ PIN_ODR_HIGH(GPIOA_VCP_RX))
#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_ARD_A0, 0) | \
PIN_AFIO_AF(GPIOA_ARD_A1, 0) | \
- PIN_AFIO_AF(GPIOA_VCP_TX, 7) | \
+ PIN_AFIO_AF(GPIOA_VCP_TX, 1) | \
PIN_AFIO_AF(GPIOA_ARD_A2, 0) | \
PIN_AFIO_AF(GPIOA_ARD_A3, 0) | \
PIN_AFIO_AF(GPIOA_ARD_A4, 0) | \
@@ -329,7 +329,7 @@ PIN_AFIO_AF(GPIOA_ARD_D2, 0) | \
PIN_AFIO_AF(GPIOA_SWDIO, 0) | \
PIN_AFIO_AF(GPIOA_SWCLK, 0) | \
- PIN_AFIO_AF(GPIOA_VCP_RX, 7))
+ PIN_AFIO_AF(GPIOA_VCP_RX, 1))
/*
* GPIOB setup:
diff --git a/os/hal/boards/ST_NUCLEO32_F031K6/cfg/board.chcfg b/os/hal/boards/ST_NUCLEO32_F031K6/cfg/board.chcfg index 472d470fd..0ede126ec 100644 --- a/os/hal/boards/ST_NUCLEO32_F031K6/cfg/board.chcfg +++ b/os/hal/boards/ST_NUCLEO32_F031K6/cfg/board.chcfg @@ -39,7 +39,7 @@ Speed="High" Resistor="Floating" Mode="Alternate" - Alternate="7" /> + Alternate="1" /> <pin3 ID="ARD_A2" Type="PushPull" @@ -143,7 +143,7 @@ Speed="Maximum" Resistor="Floating" Mode="Alternate" - Alternate="7" /> + Alternate="1" /> </GPIOA> <GPIOB> <pin0 diff --git a/os/hal/boards/ST_NUCLEO32_F042K6/board.h b/os/hal/boards/ST_NUCLEO32_F042K6/board.h index 21d6a4cdf..2ee3d7946 100644 --- a/os/hal/boards/ST_NUCLEO32_F042K6/board.h +++ b/os/hal/boards/ST_NUCLEO32_F042K6/board.h @@ -219,7 +219,7 @@ *
* PA0 - ARD_A0 (input pullup).
* PA1 - ARD_A1 (input pullup).
- * PA2 - VCP_TX (alternate 7).
+ * PA2 - VCP_TX (alternate 1).
* PA3 - ARD_A2 (input pullup).
* PA4 - ARD_A3 (input pullup).
* PA5 - ARD_A4 (input floating).
@@ -232,7 +232,7 @@ * PA12 - ARD_D2 (input pullup).
* PA13 - SWDIO (alternate 0).
* PA14 - SWCLK (alternate 0).
- * PA15 - VCP_RX (alternate 7).
+ * PA15 - VCP_RX (alternate 1).
*/
#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_ARD_A0) | \
PIN_MODE_INPUT(GPIOA_ARD_A1) | \
@@ -316,7 +316,7 @@ PIN_ODR_HIGH(GPIOA_VCP_RX))
#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_ARD_A0, 0) | \
PIN_AFIO_AF(GPIOA_ARD_A1, 0) | \
- PIN_AFIO_AF(GPIOA_VCP_TX, 7) | \
+ PIN_AFIO_AF(GPIOA_VCP_TX, 1) | \
PIN_AFIO_AF(GPIOA_ARD_A2, 0) | \
PIN_AFIO_AF(GPIOA_ARD_A3, 0) | \
PIN_AFIO_AF(GPIOA_ARD_A4, 0) | \
@@ -329,7 +329,7 @@ PIN_AFIO_AF(GPIOA_ARD_D2, 0) | \
PIN_AFIO_AF(GPIOA_SWDIO, 0) | \
PIN_AFIO_AF(GPIOA_SWCLK, 0) | \
- PIN_AFIO_AF(GPIOA_VCP_RX, 7))
+ PIN_AFIO_AF(GPIOA_VCP_RX, 1))
/*
* GPIOB setup:
diff --git a/os/hal/boards/ST_NUCLEO32_F042K6/cfg/board.chcfg b/os/hal/boards/ST_NUCLEO32_F042K6/cfg/board.chcfg index 90654656d..c6e219907 100644 --- a/os/hal/boards/ST_NUCLEO32_F042K6/cfg/board.chcfg +++ b/os/hal/boards/ST_NUCLEO32_F042K6/cfg/board.chcfg @@ -39,7 +39,7 @@ Speed="High" Resistor="Floating" Mode="Alternate" - Alternate="7" /> + Alternate="1" /> <pin3 ID="ARD_A2" Type="PushPull" @@ -143,7 +143,7 @@ Speed="Maximum" Resistor="Floating" Mode="Alternate" - Alternate="7" /> + Alternate="1" /> </GPIOA> <GPIOB> <pin0 |