aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-08-09 10:07:11 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-08-09 10:07:11 +0000
commit0752e9d7e973161c32e4b667c7a8d06c68b0a9eb (patch)
treeffef0d84a300ba2e30aac20b3e89393d0d5e7bb1
parent45b489851878769402af4a353fa2b759c815be39 (diff)
downloadChibiOS-0752e9d7e973161c32e4b667c7a8d06c68b0a9eb.tar.gz
ChibiOS-0752e9d7e973161c32e4b667c7a8d06c68b0a9eb.tar.bz2
ChibiOS-0752e9d7e973161c32e4b667c7a8d06c68b0a9eb.zip
I2C. Syncing with trunk (step 1)
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3214 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--boards/ST_STM3220G_EVAL/board.c58
-rw-r--r--boards/ST_STM3220G_EVAL/board.h245
-rw-r--r--boards/ST_STM3220G_EVAL/board.mk5
-rw-r--r--boards/ST_STM32L_DISCOVERY/board.c12
-rw-r--r--boards/ST_STM32L_DISCOVERY/board.h28
-rw-r--r--demos/ARM7-AT91SAM7S-FATFS-GCC/Makefile16
-rw-r--r--demos/ARM7-AT91SAM7S-FATFS-GCC/ch.ld111
-rw-r--r--demos/ARM7-AT91SAM7S-GCC/Makefile16
-rw-r--r--demos/ARM7-AT91SAM7S-GCC/ch.ld99
-rw-r--r--demos/ARM7-AT91SAM7X-FATFS-GCC/Makefile16
-rw-r--r--demos/ARM7-AT91SAM7X-FATFS-GCC/ch.ld111
-rw-r--r--demos/ARM7-AT91SAM7X-GCC/Makefile16
-rw-r--r--demos/ARM7-AT91SAM7X-GCC/ch.ld104
-rw-r--r--demos/ARM7-AT91SAM7X-LWIP-GCC/Makefile14
-rw-r--r--demos/ARM7-AT91SAM7X-LWIP-GCC/ch.ld104
-rw-r--r--demos/ARM7-AT91SAM7X-UIP-GCC/Makefile18
-rw-r--r--demos/ARM7-AT91SAM7X-UIP-GCC/ch.ld104
-rw-r--r--demos/ARM7-LPC214x-FATFS-GCC/Makefile16
-rw-r--r--demos/ARM7-LPC214x-FATFS-GCC/ch.ld107
-rw-r--r--demos/ARM7-LPC214x-FATFS-GCC/main.c4
-rw-r--r--demos/ARM7-LPC214x-G++/Makefile16
-rw-r--r--demos/ARM7-LPC214x-G++/ch.ld107
-rw-r--r--demos/ARM7-LPC214x-GCC/Makefile16
-rw-r--r--demos/ARM7-LPC214x-GCC/ch.ld107
-rw-r--r--demos/ARMCM0-LPC1114-LPCXPRESSO/Makefile8
-rw-r--r--demos/ARMCM0-LPC1114-LPCXPRESSO/ch.ld130
-rw-r--r--demos/ARMCM3-LPC1343-LPCXPRESSO/Makefile8
-rw-r--r--demos/ARMCM3-LPC1343-LPCXPRESSO/ch.ld130
-rw-r--r--demos/ARMCM3-STM32F100-DISCOVERY/Makefile12
-rw-r--r--demos/ARMCM3-STM32F100-DISCOVERY/ch.ld130
-rw-r--r--demos/ARMCM3-STM32F103-FATFS/Makefile12
-rw-r--r--demos/ARMCM3-STM32F103-FATFS/ch.ld130
-rw-r--r--demos/ARMCM3-STM32F103-G++/Makefile12
-rw-r--r--demos/ARMCM3-STM32F103-G++/ch.ld130
-rw-r--r--demos/ARMCM3-STM32F103/Makefile12
-rw-r--r--demos/ARMCM3-STM32F103/ch.ld130
-rw-r--r--demos/ARMCM3-STM32F103ZG-FATFS/Makefile14
-rw-r--r--demos/ARMCM3-STM32F103ZG-FATFS/ch.ld130
-rw-r--r--demos/ARMCM3-STM32F107/Makefile14
-rw-r--r--demos/ARMCM3-STM32F107/ch.ld130
-rw-r--r--demos/ARMCM3-STM32L152-DISCOVERY/Makefile10
-rw-r--r--demos/ARMCM3-STM32L152-DISCOVERY/ch.ld130
-rw-r--r--demos/ARMCM3-STM32L152-DISCOVERY/halconf.h4
-rw-r--r--docs/Doxyfile_chm13
-rw-r--r--docs/Doxyfile_html13
-rw-r--r--docs/rsc/header_chm.html2
-rw-r--r--docs/rsc/header_html.html2
-rw-r--r--readme.txt42
-rw-r--r--testhal/LPC11xx/IRQ_STORM/Makefile10
-rw-r--r--testhal/LPC11xx/IRQ_STORM/ch.ld130
-rw-r--r--testhal/LPC13xx/IRQ_STORM/Makefile10
-rw-r--r--testhal/LPC13xx/IRQ_STORM/ch.ld130
-rw-r--r--testhal/STM32/ADC/ch.ld130
-rw-r--r--testhal/STM32/CAN/ch.ld130
-rw-r--r--testhal/STM32/GPT/ch.ld130
-rw-r--r--testhal/STM32/GPT/openocd.bat3
-rw-r--r--testhal/STM32/GPT/openocd.cfg13
-rw-r--r--testhal/STM32/I2C/ch.ld130
-rw-r--r--testhal/STM32/IRQ_STORM/ch.ld130
-rw-r--r--testhal/STM32/PWM-ICU/Makefile204
-rw-r--r--testhal/STM32/PWM-ICU/ch.ld130
-rw-r--r--testhal/STM32/SDIO/ch.ld130
-rw-r--r--testhal/STM32/SPI/Makefile204
-rw-r--r--testhal/STM32/SPI/ch.ld130
-rw-r--r--testhal/STM32/UART/Makefile204
-rw-r--r--testhal/STM32/UART/ch.ld130
-rw-r--r--testhal/STM32/USB_CDC/ch.ld130
-rw-r--r--testhal/STM32/USB_MSC/ch.ld130
-rw-r--r--testhal/STM32F1xx/ADC/Makefile (renamed from testhal/STM32/CAN/Makefile)14
-rw-r--r--testhal/STM32F1xx/ADC/chconf.h (renamed from testhal/STM32/ADC/chconf.h)0
-rw-r--r--testhal/STM32F1xx/ADC/halconf.h (renamed from testhal/STM32/ADC/halconf.h)0
-rw-r--r--testhal/STM32F1xx/ADC/main.c (renamed from testhal/STM32/ADC/main.c)0
-rw-r--r--testhal/STM32F1xx/ADC/mcuconf.h (renamed from testhal/STM32/ADC/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/ADC/readme.txt (renamed from testhal/STM32/ADC/readme.txt)0
-rw-r--r--testhal/STM32F1xx/CAN/Makefile (renamed from testhal/STM32/GPT/Makefile)14
-rw-r--r--testhal/STM32F1xx/CAN/chconf.h (renamed from testhal/STM32/CAN/chconf.h)0
-rw-r--r--testhal/STM32F1xx/CAN/halconf.h (renamed from testhal/STM32/CAN/halconf.h)0
-rw-r--r--testhal/STM32F1xx/CAN/main.c (renamed from testhal/STM32/CAN/main.c)0
-rw-r--r--testhal/STM32F1xx/CAN/mcuconf.h (renamed from testhal/STM32/CAN/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/CAN/readme.txt (renamed from testhal/STM32/CAN/readme.txt)0
-rw-r--r--testhal/STM32F1xx/GPT/Makefile (renamed from testhal/STM32/IRQ_STORM/Makefile)14
-rw-r--r--testhal/STM32F1xx/GPT/chconf.h (renamed from testhal/STM32/GPT/chconf.h)0
-rw-r--r--testhal/STM32F1xx/GPT/halconf.h (renamed from testhal/STM32/GPT/halconf.h)0
-rw-r--r--testhal/STM32F1xx/GPT/main.c (renamed from testhal/STM32/GPT/main.c)0
-rw-r--r--testhal/STM32F1xx/GPT/mcuconf.h (renamed from testhal/STM32/GPT/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/GPT/readme.txt (renamed from testhal/STM32/GPT/readme.txt)0
-rw-r--r--testhal/STM32F1xx/GPT/run (renamed from testhal/STM32/GPT/run)0
-rw-r--r--testhal/STM32F1xx/I2C/Makefile (renamed from testhal/STM32/I2C/Makefile)0
-rw-r--r--testhal/STM32F1xx/I2C/chconf.h (renamed from testhal/STM32/I2C/chconf.h)0
-rw-r--r--testhal/STM32F1xx/I2C/halconf.h (renamed from testhal/STM32/I2C/halconf.h)0
-rw-r--r--testhal/STM32F1xx/I2C/i2c_pns.c (renamed from testhal/STM32/I2C/i2c_pns.c)0
-rw-r--r--testhal/STM32F1xx/I2C/i2c_pns.h (renamed from testhal/STM32/I2C/i2c_pns.h)0
-rw-r--r--testhal/STM32F1xx/I2C/lis3.c (renamed from testhal/STM32/I2C/lis3.c)0
-rw-r--r--testhal/STM32F1xx/I2C/lis3.h (renamed from testhal/STM32/I2C/lis3.h)0
-rw-r--r--testhal/STM32F1xx/I2C/main.c (renamed from testhal/STM32/I2C/main.c)0
-rw-r--r--testhal/STM32F1xx/I2C/main.h (renamed from testhal/STM32/I2C/main.h)0
-rw-r--r--testhal/STM32F1xx/I2C/max1236.c (renamed from testhal/STM32/I2C/max1236.c)0
-rw-r--r--testhal/STM32F1xx/I2C/max1236.h (renamed from testhal/STM32/I2C/max1236.h)0
-rw-r--r--testhal/STM32F1xx/I2C/mcuconf.h (renamed from testhal/STM32/I2C/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/I2C/tmp75.c (renamed from testhal/STM32/I2C/tmp75.c)0
-rw-r--r--testhal/STM32F1xx/I2C/tmp75.h (renamed from testhal/STM32/I2C/tmp75.h)0
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/Makefile204
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/chconf.h (renamed from testhal/STM32/IRQ_STORM/chconf.h)0
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/halconf.h (renamed from testhal/STM32/IRQ_STORM/halconf.h)0
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/main.c (renamed from testhal/STM32/IRQ_STORM/main.c)0
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/mcuconf.h (renamed from testhal/STM32/IRQ_STORM/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/readme.txt (renamed from testhal/STM32/IRQ_STORM/readme.txt)0
-rw-r--r--testhal/STM32F1xx/PWM-ICU/Makefile (renamed from testhal/STM32/ADC/Makefile)11
-rw-r--r--testhal/STM32F1xx/PWM-ICU/chconf.h (renamed from testhal/STM32/PWM-ICU/chconf.h)0
-rw-r--r--testhal/STM32F1xx/PWM-ICU/halconf.h (renamed from testhal/STM32/PWM-ICU/halconf.h)0
-rw-r--r--testhal/STM32F1xx/PWM-ICU/main.c (renamed from testhal/STM32/PWM-ICU/main.c)0
-rw-r--r--testhal/STM32F1xx/PWM-ICU/mcuconf.h (renamed from testhal/STM32/PWM-ICU/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/PWM-ICU/readme.txt (renamed from testhal/STM32/PWM-ICU/readme.txt)0
-rw-r--r--testhal/STM32F1xx/SDIO/Makefile (renamed from testhal/STM32/SDIO/Makefile)11
-rw-r--r--testhal/STM32F1xx/SDIO/chconf.h (renamed from testhal/STM32/SDIO/chconf.h)0
-rw-r--r--testhal/STM32F1xx/SDIO/halconf.h (renamed from testhal/STM32/SDIO/halconf.h)0
-rw-r--r--testhal/STM32F1xx/SDIO/main.c (renamed from testhal/STM32/SDIO/main.c)0
-rw-r--r--testhal/STM32F1xx/SDIO/mcuconf.h (renamed from testhal/STM32/SDIO/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/SDIO/readme.txt (renamed from testhal/STM32/SDIO/readme.txt)0
-rw-r--r--testhal/STM32F1xx/SPI/Makefile204
-rw-r--r--testhal/STM32F1xx/SPI/chconf.h (renamed from testhal/STM32/SPI/chconf.h)0
-rw-r--r--testhal/STM32F1xx/SPI/halconf.h (renamed from testhal/STM32/SPI/halconf.h)0
-rw-r--r--testhal/STM32F1xx/SPI/main.c (renamed from testhal/STM32/SPI/main.c)0
-rw-r--r--testhal/STM32F1xx/SPI/mcuconf.h (renamed from testhal/STM32/SPI/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/SPI/readme.txt (renamed from testhal/STM32/SPI/readme.txt)0
-rw-r--r--testhal/STM32F1xx/UART/Makefile204
-rw-r--r--testhal/STM32F1xx/UART/chconf.h (renamed from testhal/STM32/UART/chconf.h)0
-rw-r--r--testhal/STM32F1xx/UART/halconf.h (renamed from testhal/STM32/UART/halconf.h)0
-rw-r--r--testhal/STM32F1xx/UART/main.c (renamed from testhal/STM32/UART/main.c)0
-rw-r--r--testhal/STM32F1xx/UART/mcuconf.h (renamed from testhal/STM32/UART/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/UART/readme.txt (renamed from testhal/STM32/UART/readme.txt)0
-rw-r--r--testhal/STM32F1xx/USB_CDC/Makefile (renamed from testhal/STM32/USB_CDC/Makefile)14
-rw-r--r--testhal/STM32F1xx/USB_CDC/chconf.h (renamed from testhal/STM32/USB_CDC/chconf.h)0
-rw-r--r--testhal/STM32F1xx/USB_CDC/halconf.h (renamed from testhal/STM32/USB_CDC/halconf.h)0
-rw-r--r--testhal/STM32F1xx/USB_CDC/main.c (renamed from testhal/STM32/USB_CDC/main.c)0
-rw-r--r--testhal/STM32F1xx/USB_CDC/mcuconf.h (renamed from testhal/STM32/USB_CDC/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/USB_MSC/Makefile (renamed from testhal/STM32/USB_MSC/Makefile)14
-rw-r--r--testhal/STM32F1xx/USB_MSC/chconf.h (renamed from testhal/STM32/USB_MSC/chconf.h)0
-rw-r--r--testhal/STM32F1xx/USB_MSC/halconf.h (renamed from testhal/STM32/USB_MSC/halconf.h)0
-rw-r--r--testhal/STM32F1xx/USB_MSC/main.c (renamed from testhal/STM32/USB_MSC/main.c)0
-rw-r--r--testhal/STM32F1xx/USB_MSC/mcuconf.h (renamed from testhal/STM32/USB_MSC/mcuconf.h)0
-rw-r--r--todo.txt6
142 files changed, 1186 insertions, 4660 deletions
diff --git a/boards/ST_STM3220G_EVAL/board.c b/boards/ST_STM3220G_EVAL/board.c
new file mode 100644
index 000000000..efb8ef566
--- /dev/null
+++ b/boards/ST_STM3220G_EVAL/board.c
@@ -0,0 +1,58 @@
+/*
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
+ 2011 Giovanni Di Sirio.
+
+ This file is part of ChibiOS/RT.
+
+ ChibiOS/RT 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/RT 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/>.
+*/
+
+#include "ch.h"
+#include "hal.h"
+
+/**
+ * @brief PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ * This variable is used by the HAL when initializing the PAL driver.
+ */
+#if HAL_USE_PAL || defined(__DOXYGEN__)
+const PALConfig pal_default_config =
+{
+ {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
+ {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
+ {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
+ {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
+ {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
+ {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
+ {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
+ {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
+ {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
+};
+#endif
+
+/*
+ * Early initialization code.
+ * This initialization must be performed just after stack setup and before
+ * any other initialization.
+ */
+void __early_init(void) {
+
+ stm32_clock_init();
+}
+
+/*
+ * Board-specific initialization code.
+ */
+void boardInit(void) {
+}
diff --git a/boards/ST_STM3220G_EVAL/board.h b/boards/ST_STM3220G_EVAL/board.h
new file mode 100644
index 000000000..e10a5203c
--- /dev/null
+++ b/boards/ST_STM3220G_EVAL/board.h
@@ -0,0 +1,245 @@
+/*
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
+ 2011 Giovanni Di Sirio.
+
+ This file is part of ChibiOS/RT.
+
+ ChibiOS/RT 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/RT 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/>.
+*/
+
+#ifndef _BOARD_H_
+#define _BOARD_H_
+
+/*
+ * Setup for STMicroelectronics STM3220G-EVAL board.
+ */
+
+/*
+ * Board identifier.
+ */
+#define BOARD_ST_STM3220G_EVAL
+#define BOARD_NAME "ST STM3220G-EVAL"
+
+/*
+ * Board frequencies.
+ * NOTE: The HSE crystal is not fitted by default on the board.
+ */
+#define STM32_LSECLK 32768
+#define STM32_HSECLK 25000000
+
+/*
+ * MCU type as defined in the ST header file stm32f2xx.h.
+ */
+#define STM32F2XX
+
+/*
+ * IO pins assignments.
+ */
+
+#define GPIOA_WAKEUP_BUTTON 0
+
+#define GPIOB_ETHER_INT 14
+#define GPIOB_NAND_INT 15
+
+#define GPIOC_TAMPER_BUTTON 0
+#define GPIOC_LED4 7
+
+#define GPIOF_POT 9
+
+#define GPIOG_LED1 6
+#define GPIOG_LED2 8
+#define GPIOG_USER_BUTTON 15
+
+#define GPIOH_EXPANDER_INT 12
+#define GPIOH_SD_DETECT 13
+
+#define GPIOI_LED3 9
+
+/*
+ * I/O ports initial setup, this configuration is established soon after reset
+ * in the initialization code.
+ * Please refer to the STM32 Reference Manual for details.
+ */
+#define PIN_MODE_INPUT(n) (0 << ((n) * 2))
+#define PIN_MODE_OUTPUT(n) (1 << ((n) * 2))
+#define PIN_MODE_ALTERNATE(n) (2 << ((n) * 2))
+#define PIN_MODE_ANALOG(n) (3 << ((n) * 2))
+#define PIN_OTYPE_PUSHPULL(n) (0 << (n))
+#define PIN_OTYPE_OPENDRAIN(n) (1 << (n))
+#define PIN_OSPEED_2M(n) (0 << ((n) * 2))
+#define PIN_OSPEED_25M(n) (1 << ((n) * 2))
+#define PIN_OSPEED_50M(n) (2 << ((n) * 2))
+#define PIN_OSPEED_100M(n) (3 << ((n) * 2))
+#define PIN_PUDR_FLOATING(n) (0 << ((n) * 2))
+#define PIN_PUDR_PULLUP(n) (1 << ((n) * 2))
+#define PIN_PUDR_PULLDOWN(n) (2 << ((n) * 2))
+#define PIN_AFIO_AF0(n) (0 << ((n % 8) * 4))
+#define PIN_AFIO_AF1(n) (1 << ((n % 8) * 4))
+#define PIN_AFIO_AF2(n) (2 << ((n % 8) * 4))
+#define PIN_AFIO_AF3(n) (3 << ((n % 8) * 4))
+#define PIN_AFIO_AF4(n) (4 << ((n % 8) * 4))
+#define PIN_AFIO_AF5(n) (5 << ((n % 8) * 4))
+#define PIN_AFIO_AF6(n) (6 << ((n % 8) * 4))
+#define PIN_AFIO_AF7(n) (7 << ((n % 8) * 4))
+#define PIN_AFIO_AF8(n) (8 << ((n % 8) * 4))
+#define PIN_AFIO_AF9(n) (9 << ((n % 8) * 4))
+#define PIN_AFIO_AF10(n) (10 << ((n % 8) * 4))
+#define PIN_AFIO_AF11(n) (11 << ((n % 8) * 4))
+#define PIN_AFIO_AF12(n) (12 << ((n % 8) * 4))
+#define PIN_AFIO_AF13(n) (13 << ((n % 8) * 4))
+#define PIN_AFIO_AF14(n) (14 << ((n % 8) * 4))
+#define PIN_AFIO_AF15(n) (15 << ((n % 8) * 4))
+
+/*
+ * Port A setup.
+ * All input with pull-up except:
+ * PA8 - MCO 1 (alternate 0).
+ * PA13 - JTMS/SWDAT (alternate 0).
+ * PA14 - JTCK/SWCLK (alternate 0).
+ * PA15 - JTDI (alternate 0).
+ */
+#define VAL_GPIOA_MODER (PIN_MODE_ALTERNATE(8) | \
+ PIN_MODE_ALTERNATE(13) | \
+ PIN_MODE_ALTERNATE(14) | \
+ PIN_MODE_ALTERNATE(15))
+#define VAL_GPIOA_OTYPER 0x00000000
+#define VAL_GPIOA_OSPEEDR 0xFFFFFFFF
+#define VAL_GPIOA_PUPDR (PIN_PUDR_FLOATING(13) | \
+ PIN_PUDR_FLOATING(14) | \
+ PIN_PUDR_FLOATING(15))
+#define VAL_GPIOA_ODR 0xFFFFFFFF
+#define VAL_GPIOA_AFRL 0x00000000
+#define VAL_GPIOA_AFRH 0x00000000
+
+/*
+ * Port B setup.
+ * All input with pull-up except:
+ * PB3 - JTDO (alternate 0).
+ * PB4 - JNTRST (alternate 0).
+ */
+#define VAL_GPIOB_MODER (PIN_MODE_ALTERNATE(3) | \
+ PIN_MODE_ALTERNATE(4))
+#define VAL_GPIOB_OTYPER 0x00000000
+#define VAL_GPIOB_OSPEEDR 0xFFFFFFFF
+#define VAL_GPIOB_PUPDR (~(PIN_PUDR_FLOATING(3) | \
+ PIN_PUDR_FLOATING(4)))
+#define VAL_GPIOB_ODR 0xFFFFFFFF
+#define VAL_GPIOB_AFRL 0x00000000
+#define VAL_GPIOB_AFRH 0x00000000
+
+/*
+ * Port C setup.
+ * All input with pull-up except:
+ * PC9 - MCO2 (alternate 0).
+ * PC10 - USART3_TX (alternate 7).
+ * PC11 - USART3_RX (alternate 7).
+ * PC14 - OSC32_INT (input floating).
+ * PC15 - OSC32_OUT (input floating).
+ */
+#define VAL_GPIOC_MODER (PIN_MODE_ALTERNATE(9) | \
+ PIN_MODE_ALTERNATE(10) | \
+ PIN_MODE_ALTERNATE(11))
+#define VAL_GPIOC_OTYPER 0x00000000
+#define VAL_GPIOC_OSPEEDR 0xFFFFFFFF
+#define VAL_GPIOC_PUPDR (~(PIN_PUDR_PULLUP(11) | \
+ PIN_PUDR_FLOATING(14) | \
+ PIN_PUDR_FLOATING(15)))
+#define VAL_GPIOC_ODR 0xFFFFFFFF
+#define VAL_GPIOC_AFRL 0x00000000
+#define VAL_GPIOC_AFRH (PIN_AFIO_AF7(10) | \
+ PIN_AFIO_AF7(11))
+
+/*
+ * Port D setup.
+ * All input with pull-up.
+ */
+#define VAL_GPIOD_MODER 0x00000000
+#define VAL_GPIOD_OTYPER 0x00000000
+#define VAL_GPIOD_OSPEEDR 0xFFFFFFFF
+#define VAL_GPIOD_PUPDR 0xFFFFFFFF
+#define VAL_GPIOD_ODR 0xFFFFFFFF
+#define VAL_GPIOD_AFRL 0x00000000
+#define VAL_GPIOD_AFRH 0x00000000
+
+/*
+ * Port E setup.
+ * All input with pull-up.
+ */
+#define VAL_GPIOE_MODER 0x00000000
+#define VAL_GPIOE_OTYPER 0x00000000
+#define VAL_GPIOE_OSPEEDR 0xFFFFFFFF
+#define VAL_GPIOE_PUPDR 0xFFFFFFFF
+#define VAL_GPIOE_ODR 0xFFFFFFFF
+#define VAL_GPIOE_AFRL 0x00000000
+#define VAL_GPIOE_AFRH 0x00000000
+
+/*
+ * Port F setup.
+ * All input with pull-up.
+ */
+#define VAL_GPIOF_MODER 0x00000000
+#define VAL_GPIOF_OTYPER 0x00000000
+#define VAL_GPIOF_OSPEEDR 0xFFFFFFFF
+#define VAL_GPIOF_PUPDR 0xFFFFFFFF
+#define VAL_GPIOF_ODR 0xFFFFFFFF
+#define VAL_GPIOF_AFRL 0x00000000
+#define VAL_GPIOF_AFRH 0x00000000
+
+/*
+ * Port G setup.
+ * All input with pull-up.
+ */
+#define VAL_GPIOG_MODER (PIN_MODE_OUTPUT(GPIOG_LED1))
+#define VAL_GPIOG_OTYPER 0x00000000
+#define VAL_GPIOG_OSPEEDR 0xFFFFFFFF
+#define VAL_GPIOG_PUPDR (~(PIN_PUDR_FLOATING(GPIOG_LED1)))
+#define VAL_GPIOG_ODR 0xFFFFFFBF
+#define VAL_GPIOG_AFRL 0x00000000
+#define VAL_GPIOG_AFRH 0x00000000
+
+/*
+ * Port H setup.
+ * All input with pull-up.
+ */
+#define VAL_GPIOH_MODER 0x00000000
+#define VAL_GPIOH_OTYPER 0x00000000
+#define VAL_GPIOH_OSPEEDR 0xFFFFFFFF
+#define VAL_GPIOH_PUPDR 0xFFFFFFFF
+#define VAL_GPIOH_ODR 0xFFFFFFFF
+#define VAL_GPIOH_AFRL 0x00000000
+#define VAL_GPIOH_AFRH 0x00000000
+
+/*
+ * Port I setup.
+ * All input with pull-up.
+ */
+#define VAL_GPIOI_MODER 0x00000000
+#define VAL_GPIOI_OTYPER 0x00000000
+#define VAL_GPIOI_OSPEEDR 0xFFFFFFFF
+#define VAL_GPIOI_PUPDR 0xFFFFFFFF
+#define VAL_GPIOI_ODR 0xFFFFFFFF
+#define VAL_GPIOI_AFRL 0x00000000
+#define VAL_GPIOI_AFRH 0x00000000
+
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
+#endif /* _BOARD_H_ */
diff --git a/boards/ST_STM3220G_EVAL/board.mk b/boards/ST_STM3220G_EVAL/board.mk
new file mode 100644
index 000000000..3121594a6
--- /dev/null
+++ b/boards/ST_STM3220G_EVAL/board.mk
@@ -0,0 +1,5 @@
+# List of all the board related files.
+BOARDSRC = ${CHIBIOS}/boards/ST_STM3220G_EVAL/board.c
+
+# Required include directories
+BOARDINC = ${CHIBIOS}/boards/ST_STM3220G_EVAL
diff --git a/boards/ST_STM32L_DISCOVERY/board.c b/boards/ST_STM32L_DISCOVERY/board.c
index 37015943a..4a93dada2 100644
--- a/boards/ST_STM32L_DISCOVERY/board.c
+++ b/boards/ST_STM32L_DISCOVERY/board.c
@@ -29,12 +29,12 @@
#if HAL_USE_PAL || defined(__DOXYGEN__)
const PALConfig pal_default_config =
{
- {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR},
- {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR},
- {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR},
- {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR},
- {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR},
- {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR}
+ {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
+ {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
+ {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
+ {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
+ {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
+ {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}
};
#endif
diff --git a/boards/ST_STM32L_DISCOVERY/board.h b/boards/ST_STM32L_DISCOVERY/board.h
index ddad89b5e..d95480c15 100644
--- a/boards/ST_STM32L_DISCOVERY/board.h
+++ b/boards/ST_STM32L_DISCOVERY/board.h
@@ -69,6 +69,22 @@
#define PIN_PUDR_FLOATING(n) (0 << ((n) * 2))
#define PIN_PUDR_PULLUP(n) (1 << ((n) * 2))
#define PIN_PUDR_PULLDOWN(n) (2 << ((n) * 2))
+#define PIN_AFIO_AF0(n) (0 << ((n % 8) * 4))
+#define PIN_AFIO_AF1(n) (1 << ((n % 8) * 4))
+#define PIN_AFIO_AF2(n) (2 << ((n % 8) * 4))
+#define PIN_AFIO_AF3(n) (3 << ((n % 8) * 4))
+#define PIN_AFIO_AF4(n) (4 << ((n % 8) * 4))
+#define PIN_AFIO_AF5(n) (5 << ((n % 8) * 4))
+#define PIN_AFIO_AF6(n) (6 << ((n % 8) * 4))
+#define PIN_AFIO_AF7(n) (7 << ((n % 8) * 4))
+#define PIN_AFIO_AF8(n) (8 << ((n % 8) * 4))
+#define PIN_AFIO_AF9(n) (9 << ((n % 8) * 4))
+#define PIN_AFIO_AF10(n) (10 << ((n % 8) * 4))
+#define PIN_AFIO_AF11(n) (11 << ((n % 8) * 4))
+#define PIN_AFIO_AF12(n) (12 << ((n % 8) * 4))
+#define PIN_AFIO_AF13(n) (13 << ((n % 8) * 4))
+#define PIN_AFIO_AF14(n) (14 << ((n % 8) * 4))
+#define PIN_AFIO_AF15(n) (15 << ((n % 8) * 4))
/*
* Port A setup.
@@ -89,6 +105,8 @@
PIN_PUDR_FLOATING(14) | \
PIN_PUDR_FLOATING(15)))
#define VAL_GPIOA_ODR 0xFFFFFFFF
+#define VAL_GPIOA_AFRL 0x00000000
+#define VAL_GPIOA_AFRH 0x00000000
/*
* Port B setup.
@@ -109,6 +127,8 @@
PIN_PUDR_FLOATING(GPIOB_LED4) | \
PIN_PUDR_FLOATING(GPIOB_LED3)))
#define VAL_GPIOB_ODR 0xFFFFFF3F
+#define VAL_GPIOB_AFRL 0x00000000
+#define VAL_GPIOB_AFRH 0x00000000
/*
* Port C setup.
@@ -122,6 +142,8 @@
#define VAL_GPIOC_PUPDR (~(PIN_PUDR_FLOATING(15) | \
PIN_PUDR_FLOATING(14)))
#define VAL_GPIOC_ODR 0xFFFFFFFF
+#define VAL_GPIOC_AFRL 0x00000000
+#define VAL_GPIOC_AFRH 0x00000000
/*
* Port D setup.
@@ -132,6 +154,8 @@
#define VAL_GPIOD_OSPEEDR 0xFFFFFFFF
#define VAL_GPIOD_PUPDR 0xFFFFFFFF
#define VAL_GPIOD_ODR 0xFFFFFFFF
+#define VAL_GPIOD_AFRL 0x00000000
+#define VAL_GPIOD_AFRH 0x00000000
/*
* Port E setup.
@@ -142,6 +166,8 @@
#define VAL_GPIOE_OSPEEDR 0xFFFFFFFF
#define VAL_GPIOE_PUPDR 0xFFFFFFFF
#define VAL_GPIOE_ODR 0xFFFFFFFF
+#define VAL_GPIOE_AFRL 0x00000000
+#define VAL_GPIOE_AFRH 0x00000000
/*
* Port H setup.
@@ -152,6 +178,8 @@
#define VAL_GPIOH_OSPEEDR 0xFFFFFFFF
#define VAL_GPIOH_PUPDR 0xFFFFFFFF
#define VAL_GPIOH_ODR 0xFFFFFFFF
+#define VAL_GPIOH_AFRL 0x00000000
+#define VAL_GPIOH_AFRH 0x00000000
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
diff --git a/demos/ARM7-AT91SAM7S-FATFS-GCC/Makefile b/demos/ARM7-AT91SAM7S-FATFS-GCC/Makefile
index 531e2506a..2a2c9e910 100644
--- a/demos/ARM7-AT91SAM7S-FATFS-GCC/Makefile
+++ b/demos/ARM7-AT91SAM7S-FATFS-GCC/Makefile
@@ -39,19 +39,19 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_SAM7_P256/board.mk
include $(CHIBIOS)/os/hal/platforms/AT91SAM7/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARM/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
include $(CHIBIOS)/ext/fatfs/fatfs.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/AT91SAM7S256.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -90,14 +90,12 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM) \
- $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/vectors.s
+ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) \
$(FATFSINC) \
- $(CHIBIOS)/os/various \
- $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7
+ $(CHIBIOS)/os/various
#
# Project, sources and paths
diff --git a/demos/ARM7-AT91SAM7S-FATFS-GCC/ch.ld b/demos/ARM7-AT91SAM7S-FATFS-GCC/ch.ld
deleted file mode 100644
index b999dac9a..000000000
--- a/demos/ARM7-AT91SAM7S-FATFS-GCC/ch.ld
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * AT91SAM7X256 memory setup.
- */
-__und_stack_size__ = 0x0004;
-__abt_stack_size__ = 0x0004;
-__fiq_stack_size__ = 0x0010;
-__irq_stack_size__ = 0x0080;
-__svc_stack_size__ = 0x0004;
-__sys_stack_size__ = 0x0400;
-__stacks_total_size__ = __und_stack_size__ + __abt_stack_size__ + __fiq_stack_size__ + __irq_stack_size__ + __svc_stack_size__ + __sys_stack_size__;
-
-MEMORY
-{
- flash : org = 0x100000, len = 256k
- ram : org = 0x200020, len = 64k - 0x20
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- _text = .;
- KEEP(*(vectors))
- *(.text)
- *(.text.*);
- *(.rodata);
- *(.rodata.*);
- *(.glue_7t);
- *(.glue_7);
- *(.gcc*);
- *(.ctors);
- *(.dtors);
- . = ALIGN(4);
- _etext = .;
- } > flash
-
- .ARM.extab : {*(.ARM.extab* .gnu.linkonce.armextab.*)}
-
- __exidx_start = .;
- .ARM.exidx : {*(.ARM.exidx* .gnu.linkonce.armexidx.*)} > flash
- __exidx_end = .;
-
- .eh_frame_hdr : {*(.eh_frame_hdr)}
-
- .eh_frame : ONLY_IF_RO {*(.eh_frame)}
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- _data = .;
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- _edata = .;
- } > ram AT > flash
-
- .bss :
- {
- _bss_start = .;
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- _bss_end = .;
- } > ram
-
- /DISCARD/ :
- {
- *(.eh_*)
- }
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARM7-AT91SAM7S-GCC/Makefile b/demos/ARM7-AT91SAM7S-GCC/Makefile
index 515224c81..fb169d6e1 100644
--- a/demos/ARM7-AT91SAM7S-GCC/Makefile
+++ b/demos/ARM7-AT91SAM7S-GCC/Makefile
@@ -39,18 +39,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_SAM7_P256/board.mk
include $(CHIBIOS)/os/hal/platforms/AT91SAM7/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARM/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/AT91SAM7S256.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -86,13 +86,11 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM) \
- $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/vectors.s
+ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) \
- $(CHIBIOS)/os/various \
- $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7
+ $(CHIBIOS)/os/various
#
# Project, sources and paths
diff --git a/demos/ARM7-AT91SAM7S-GCC/ch.ld b/demos/ARM7-AT91SAM7S-GCC/ch.ld
deleted file mode 100644
index e26268451..000000000
--- a/demos/ARM7-AT91SAM7S-GCC/ch.ld
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * AT91SAM7X256 memory setup.
- */
-__und_stack_size__ = 0x0004;
-__abt_stack_size__ = 0x0004;
-__fiq_stack_size__ = 0x0010;
-__irq_stack_size__ = 0x0080;
-__svc_stack_size__ = 0x0004;
-__sys_stack_size__ = 0x0400;
-__stacks_total_size__ = __und_stack_size__ + __abt_stack_size__ + __fiq_stack_size__ + __irq_stack_size__ + __svc_stack_size__ + __sys_stack_size__;
-
-MEMORY
-{
- flash : org = 0x100000, len = 256k
- ram : org = 0x200020, len = 64k - 0x20
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- _text = .;
- KEEP(*(vectors))
- *(.text)
- *(.text.*);
- *(.rodata);
- *(.rodata.*);
- *(.glue_7t);
- *(.glue_7);
- *(.gcc*);
- *(.ctors);
- *(.dtors);
- . = ALIGN(4);
- _etext = .;
- } > flash
-
- _textdata = _etext;
-
- .data :
- {
- _data = .;
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- _edata = .;
- } > ram AT > flash
-
- .bss :
- {
- _bss_start = .;
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- _bss_end = .;
- } > ram
-
- /DISCARD/ :
- {
- *(.eh_*)
- }
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARM7-AT91SAM7X-FATFS-GCC/Makefile b/demos/ARM7-AT91SAM7X-FATFS-GCC/Makefile
index 6553ef548..4b8fc0650 100644
--- a/demos/ARM7-AT91SAM7X-FATFS-GCC/Makefile
+++ b/demos/ARM7-AT91SAM7X-FATFS-GCC/Makefile
@@ -39,19 +39,19 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_SAM7_EX256/board.mk
include $(CHIBIOS)/os/hal/platforms/AT91SAM7/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARM/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
include $(CHIBIOS)/ext/fatfs/fatfs.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/AT91SAM7X256.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -90,14 +90,12 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM) \
- $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/vectors.s
+ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) \
$(FATFSINC) \
- $(CHIBIOS)/os/various \
- $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7
+ $(CHIBIOS)/os/various
#
# Project, sources and paths
diff --git a/demos/ARM7-AT91SAM7X-FATFS-GCC/ch.ld b/demos/ARM7-AT91SAM7X-FATFS-GCC/ch.ld
deleted file mode 100644
index b999dac9a..000000000
--- a/demos/ARM7-AT91SAM7X-FATFS-GCC/ch.ld
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * AT91SAM7X256 memory setup.
- */
-__und_stack_size__ = 0x0004;
-__abt_stack_size__ = 0x0004;
-__fiq_stack_size__ = 0x0010;
-__irq_stack_size__ = 0x0080;
-__svc_stack_size__ = 0x0004;
-__sys_stack_size__ = 0x0400;
-__stacks_total_size__ = __und_stack_size__ + __abt_stack_size__ + __fiq_stack_size__ + __irq_stack_size__ + __svc_stack_size__ + __sys_stack_size__;
-
-MEMORY
-{
- flash : org = 0x100000, len = 256k
- ram : org = 0x200020, len = 64k - 0x20
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- _text = .;
- KEEP(*(vectors))
- *(.text)
- *(.text.*);
- *(.rodata);
- *(.rodata.*);
- *(.glue_7t);
- *(.glue_7);
- *(.gcc*);
- *(.ctors);
- *(.dtors);
- . = ALIGN(4);
- _etext = .;
- } > flash
-
- .ARM.extab : {*(.ARM.extab* .gnu.linkonce.armextab.*)}
-
- __exidx_start = .;
- .ARM.exidx : {*(.ARM.exidx* .gnu.linkonce.armexidx.*)} > flash
- __exidx_end = .;
-
- .eh_frame_hdr : {*(.eh_frame_hdr)}
-
- .eh_frame : ONLY_IF_RO {*(.eh_frame)}
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- _data = .;
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- _edata = .;
- } > ram AT > flash
-
- .bss :
- {
- _bss_start = .;
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- _bss_end = .;
- } > ram
-
- /DISCARD/ :
- {
- *(.eh_*)
- }
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARM7-AT91SAM7X-GCC/Makefile b/demos/ARM7-AT91SAM7X-GCC/Makefile
index e6480eb1c..2fae31137 100644
--- a/demos/ARM7-AT91SAM7X-GCC/Makefile
+++ b/demos/ARM7-AT91SAM7X-GCC/Makefile
@@ -39,18 +39,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_SAM7_EX256/board.mk
include $(CHIBIOS)/os/hal/platforms/AT91SAM7/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARM/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/AT91SAM7X256.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -86,13 +86,11 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM) \
- $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/vectors.s
+ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) \
- $(CHIBIOS)/os/various \
- $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7
+ $(CHIBIOS)/os/various
#
# Project, sources and paths
diff --git a/demos/ARM7-AT91SAM7X-GCC/ch.ld b/demos/ARM7-AT91SAM7X-GCC/ch.ld
deleted file mode 100644
index 9308935be..000000000
--- a/demos/ARM7-AT91SAM7X-GCC/ch.ld
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * AT91SAM7X256 memory setup.
- */
-__und_stack_size__ = 0x0004;
-__abt_stack_size__ = 0x0004;
-__fiq_stack_size__ = 0x0010;
-__irq_stack_size__ = 0x0080;
-__svc_stack_size__ = 0x0004;
-__sys_stack_size__ = 0x0400;
-__stacks_total_size__ = __und_stack_size__ + __abt_stack_size__ + __fiq_stack_size__ + __irq_stack_size__ + __svc_stack_size__ + __sys_stack_size__;
-
-MEMORY
-{
- flash : org = 0x100000, len = 256k
- ram : org = 0x200020, len = 64k - 0x20
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- _text = .;
- KEEP(*(vectors))
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- *(.ctors)
- *(.dtors)
- } > flash
-
- .ARM.extab : {*(.ARM.extab* .gnu.linkonce.armextab.*)}
-
- __exidx_start = .;
- .ARM.exidx : {*(.ARM.exidx* .gnu.linkonce.armexidx.*)} > flash
- __exidx_end = .;
-
- .eh_frame_hdr : {*(.eh_frame_hdr)}
-
- .eh_frame : ONLY_IF_RO {*(.eh_frame)}
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- _data = .;
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- _edata = .;
- } > ram AT > flash
-
- .bss :
- {
- _bss_start = .;
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- _bss_end = .;
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/Makefile b/demos/ARM7-AT91SAM7X-LWIP-GCC/Makefile
index b181251e7..3f1aaa275 100644
--- a/demos/ARM7-AT91SAM7X-LWIP-GCC/Makefile
+++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/Makefile
@@ -39,19 +39,19 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_SAM7_EX256/board.mk
include $(CHIBIOS)/os/hal/platforms/AT91SAM7/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARM/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
include ./lwip/lwip.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/AT91SAM7X256.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -95,13 +95,11 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM) \
- $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/vectors.s
+ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) $(LWINC) \
$(CHIBIOS)/os/various \
- $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7 \
./lwip
#
diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/ch.ld b/demos/ARM7-AT91SAM7X-LWIP-GCC/ch.ld
deleted file mode 100644
index 9308935be..000000000
--- a/demos/ARM7-AT91SAM7X-LWIP-GCC/ch.ld
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * AT91SAM7X256 memory setup.
- */
-__und_stack_size__ = 0x0004;
-__abt_stack_size__ = 0x0004;
-__fiq_stack_size__ = 0x0010;
-__irq_stack_size__ = 0x0080;
-__svc_stack_size__ = 0x0004;
-__sys_stack_size__ = 0x0400;
-__stacks_total_size__ = __und_stack_size__ + __abt_stack_size__ + __fiq_stack_size__ + __irq_stack_size__ + __svc_stack_size__ + __sys_stack_size__;
-
-MEMORY
-{
- flash : org = 0x100000, len = 256k
- ram : org = 0x200020, len = 64k - 0x20
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- _text = .;
- KEEP(*(vectors))
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- *(.ctors)
- *(.dtors)
- } > flash
-
- .ARM.extab : {*(.ARM.extab* .gnu.linkonce.armextab.*)}
-
- __exidx_start = .;
- .ARM.exidx : {*(.ARM.exidx* .gnu.linkonce.armexidx.*)} > flash
- __exidx_end = .;
-
- .eh_frame_hdr : {*(.eh_frame_hdr)}
-
- .eh_frame : ONLY_IF_RO {*(.eh_frame)}
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- _data = .;
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- _edata = .;
- } > ram AT > flash
-
- .bss :
- {
- _bss_start = .;
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- _bss_end = .;
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARM7-AT91SAM7X-UIP-GCC/Makefile b/demos/ARM7-AT91SAM7X-UIP-GCC/Makefile
index bad6e49f8..c1724acc9 100644
--- a/demos/ARM7-AT91SAM7X-UIP-GCC/Makefile
+++ b/demos/ARM7-AT91SAM7X-UIP-GCC/Makefile
@@ -39,18 +39,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_SAM7_EX256/board.mk
include $(CHIBIOS)/os/hal/platforms/AT91SAM7/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARM/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/AT91SAM7X256.ld
+
# List of the required uIP source files.
USRC = $(CHIBIOS)/ext/uip-1.0/uip/uip_arp.c \
$(CHIBIOS)/ext/uip-1.0/uip/psock.c \
@@ -99,14 +99,14 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM) \
- $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/vectors.s
+ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) \
$(CHIBIOS)/os/various \
- $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7 \
- ./web $(CHIBIOS)/ext/uip-1.0/uip $(CHIBIOS)/ext/uip-1.0/apps/webserver
+ $(CHIBIOS)/ext/uip-1.0/uip \
+ $(CHIBIOS)/ext/uip-1.0/apps/webserver \
+ ./web
#
# Project, sources and paths
diff --git a/demos/ARM7-AT91SAM7X-UIP-GCC/ch.ld b/demos/ARM7-AT91SAM7X-UIP-GCC/ch.ld
deleted file mode 100644
index 9308935be..000000000
--- a/demos/ARM7-AT91SAM7X-UIP-GCC/ch.ld
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * AT91SAM7X256 memory setup.
- */
-__und_stack_size__ = 0x0004;
-__abt_stack_size__ = 0x0004;
-__fiq_stack_size__ = 0x0010;
-__irq_stack_size__ = 0x0080;
-__svc_stack_size__ = 0x0004;
-__sys_stack_size__ = 0x0400;
-__stacks_total_size__ = __und_stack_size__ + __abt_stack_size__ + __fiq_stack_size__ + __irq_stack_size__ + __svc_stack_size__ + __sys_stack_size__;
-
-MEMORY
-{
- flash : org = 0x100000, len = 256k
- ram : org = 0x200020, len = 64k - 0x20
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- _text = .;
- KEEP(*(vectors))
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- *(.ctors)
- *(.dtors)
- } > flash
-
- .ARM.extab : {*(.ARM.extab* .gnu.linkonce.armextab.*)}
-
- __exidx_start = .;
- .ARM.exidx : {*(.ARM.exidx* .gnu.linkonce.armexidx.*)} > flash
- __exidx_end = .;
-
- .eh_frame_hdr : {*(.eh_frame_hdr)}
-
- .eh_frame : ONLY_IF_RO {*(.eh_frame)}
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- _data = .;
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- _edata = .;
- } > ram AT > flash
-
- .bss :
- {
- _bss_start = .;
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- _bss_end = .;
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARM7-LPC214x-FATFS-GCC/Makefile b/demos/ARM7-LPC214x-FATFS-GCC/Makefile
index d69954793..bb3b93ed4 100644
--- a/demos/ARM7-LPC214x-FATFS-GCC/Makefile
+++ b/demos/ARM7-LPC214x-FATFS-GCC/Makefile
@@ -39,19 +39,19 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT = ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_LPC_P2148/board.mk
include $(CHIBIOS)/os/hal/platforms/LPC214x/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARM/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARM/LPC214x/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
include $(CHIBIOS)/ext/fatfs/fatfs.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/LPC2148.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -91,14 +91,12 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM) \
- $(CHIBIOS)/os/ports/GCC/ARM/LPC214x/vectors.s
+ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) \
$(FATFSINC) \
- $(CHIBIOS)/os/various \
- $(CHIBIOS)/os/ports/GCC/ARM/LPC214x
+ $(CHIBIOS)/os/various
#
# Project, sources and paths
diff --git a/demos/ARM7-LPC214x-FATFS-GCC/ch.ld b/demos/ARM7-LPC214x-FATFS-GCC/ch.ld
deleted file mode 100644
index 40683d14e..000000000
--- a/demos/ARM7-LPC214x-FATFS-GCC/ch.ld
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * LPC2148 memory setup.
- */
-__und_stack_size__ = 0x0004;
-__abt_stack_size__ = 0x0004;
-__fiq_stack_size__ = 0x0010;
-__irq_stack_size__ = 0x0080;
-__svc_stack_size__ = 0x0004;
-__sys_stack_size__ = 0x0400;
-__stacks_total_size__ = __und_stack_size__ + __abt_stack_size__ + __fiq_stack_size__ + __irq_stack_size__ + __svc_stack_size__ + __sys_stack_size__;
-
-MEMORY
-{
- flash : org = 0x00000000, len = 512k - 12k
- ram : org = 0x40000200, len = 32k - 0x200 - 288
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-__dma_start__ = 0x7FD00000;
-__dma_size__ = 8k;
-__dma_end__ = 0x7FD00000 + __dma_size__;
-
-SECTIONS
-{
- . = 0;
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- _text = .;
- KEEP(*(vectors))
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- *(.ctors)
- *(.dtors)
- } > flash
-
- .ARM.extab : {*(.ARM.extab* .gnu.linkonce.armextab.*)}
-
- __exidx_start = .;
- .ARM.exidx : {*(.ARM.exidx* .gnu.linkonce.armexidx.*)} > flash
- __exidx_end = .;
-
- .eh_frame_hdr : {*(.eh_frame_hdr)}
-
- .eh_frame : ONLY_IF_RO {*(.eh_frame)}
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- _data = .;
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- _edata = .;
- } > ram AT > flash
-
- .bss :
- {
- _bss_start = .;
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- _bss_end = .;
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARM7-LPC214x-FATFS-GCC/main.c b/demos/ARM7-LPC214x-FATFS-GCC/main.c
index bb8c012af..b5d7e82d6 100644
--- a/demos/ARM7-LPC214x-FATFS-GCC/main.c
+++ b/demos/ARM7-LPC214x-FATFS-GCC/main.c
@@ -273,8 +273,8 @@ int main(void) {
evtInit(&evt, MS2ST(500)); /* Initializes an event timer object. */
evtStart(&evt); /* Starts the event timer. */
chEvtRegister(&evt.et_es, &el0, 0); /* Registers on the timer event source. */
- chEvtRegister(&MMCD1.mmc_inserted_event, &el1, 1);
- chEvtRegister(&MMCD1.mmc_removed_event, &el2, 2);
+ chEvtRegister(&MMCD1.inserted_event, &el1, 1);
+ chEvtRegister(&MMCD1.removed_event, &el2, 2);
while (TRUE)// chThdSleepMilliseconds(50);
chEvtDispatch(evhndl, chEvtWaitOne(ALL_EVENTS));
return 0;
diff --git a/demos/ARM7-LPC214x-G++/Makefile b/demos/ARM7-LPC214x-G++/Makefile
index 118ec0cae..5d5723568 100644
--- a/demos/ARM7-LPC214x-G++/Makefile
+++ b/demos/ARM7-LPC214x-G++/Makefile
@@ -39,18 +39,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT = ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_LPC_P2148/board.mk
include $(CHIBIOS)/os/hal/platforms/LPC214x/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARM/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARM/LPC214x/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/LPC2148.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -86,13 +86,11 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM) \
- $(CHIBIOS)/os/ports/GCC/ARM/LPC214x/vectors.s
+ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) \
- $(CHIBIOS)/os/various \
- $(CHIBIOS)/os/ports/GCC/ARM/LPC214x
+ $(CHIBIOS)/os/various
#
# Project, sources and paths
diff --git a/demos/ARM7-LPC214x-G++/ch.ld b/demos/ARM7-LPC214x-G++/ch.ld
deleted file mode 100644
index 40683d14e..000000000
--- a/demos/ARM7-LPC214x-G++/ch.ld
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * LPC2148 memory setup.
- */
-__und_stack_size__ = 0x0004;
-__abt_stack_size__ = 0x0004;
-__fiq_stack_size__ = 0x0010;
-__irq_stack_size__ = 0x0080;
-__svc_stack_size__ = 0x0004;
-__sys_stack_size__ = 0x0400;
-__stacks_total_size__ = __und_stack_size__ + __abt_stack_size__ + __fiq_stack_size__ + __irq_stack_size__ + __svc_stack_size__ + __sys_stack_size__;
-
-MEMORY
-{
- flash : org = 0x00000000, len = 512k - 12k
- ram : org = 0x40000200, len = 32k - 0x200 - 288
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-__dma_start__ = 0x7FD00000;
-__dma_size__ = 8k;
-__dma_end__ = 0x7FD00000 + __dma_size__;
-
-SECTIONS
-{
- . = 0;
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- _text = .;
- KEEP(*(vectors))
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- *(.ctors)
- *(.dtors)
- } > flash
-
- .ARM.extab : {*(.ARM.extab* .gnu.linkonce.armextab.*)}
-
- __exidx_start = .;
- .ARM.exidx : {*(.ARM.exidx* .gnu.linkonce.armexidx.*)} > flash
- __exidx_end = .;
-
- .eh_frame_hdr : {*(.eh_frame_hdr)}
-
- .eh_frame : ONLY_IF_RO {*(.eh_frame)}
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- _data = .;
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- _edata = .;
- } > ram AT > flash
-
- .bss :
- {
- _bss_start = .;
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- _bss_end = .;
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARM7-LPC214x-GCC/Makefile b/demos/ARM7-LPC214x-GCC/Makefile
index ac9a4d653..67116791e 100644
--- a/demos/ARM7-LPC214x-GCC/Makefile
+++ b/demos/ARM7-LPC214x-GCC/Makefile
@@ -39,18 +39,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT = ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_LPC_P2148/board.mk
include $(CHIBIOS)/os/hal/platforms/LPC214x/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARM/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARM/LPC214x/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/LPC2148.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -86,13 +86,11 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM) \
- $(CHIBIOS)/os/ports/GCC/ARM/LPC214x/vectors.s
+ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) \
- $(CHIBIOS)/os/various \
- $(CHIBIOS)/os/ports/GCC/ARM/LPC214x
+ $(CHIBIOS)/os/various
#
# Project, sources and paths
diff --git a/demos/ARM7-LPC214x-GCC/ch.ld b/demos/ARM7-LPC214x-GCC/ch.ld
deleted file mode 100644
index 40683d14e..000000000
--- a/demos/ARM7-LPC214x-GCC/ch.ld
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * LPC2148 memory setup.
- */
-__und_stack_size__ = 0x0004;
-__abt_stack_size__ = 0x0004;
-__fiq_stack_size__ = 0x0010;
-__irq_stack_size__ = 0x0080;
-__svc_stack_size__ = 0x0004;
-__sys_stack_size__ = 0x0400;
-__stacks_total_size__ = __und_stack_size__ + __abt_stack_size__ + __fiq_stack_size__ + __irq_stack_size__ + __svc_stack_size__ + __sys_stack_size__;
-
-MEMORY
-{
- flash : org = 0x00000000, len = 512k - 12k
- ram : org = 0x40000200, len = 32k - 0x200 - 288
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-__dma_start__ = 0x7FD00000;
-__dma_size__ = 8k;
-__dma_end__ = 0x7FD00000 + __dma_size__;
-
-SECTIONS
-{
- . = 0;
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- _text = .;
- KEEP(*(vectors))
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- *(.ctors)
- *(.dtors)
- } > flash
-
- .ARM.extab : {*(.ARM.extab* .gnu.linkonce.armextab.*)}
-
- __exidx_start = .;
- .ARM.exidx : {*(.ARM.exidx* .gnu.linkonce.armexidx.*)} > flash
- __exidx_end = .;
-
- .eh_frame_hdr : {*(.eh_frame_hdr)}
-
- .eh_frame : ONLY_IF_RO {*(.eh_frame)}
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- _data = .;
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- _edata = .;
- } > ram AT > flash
-
- .bss :
- {
- _bss_start = .;
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- _bss_end = .;
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARMCM0-LPC1114-LPCXPRESSO/Makefile b/demos/ARMCM0-LPC1114-LPCXPRESSO/Makefile
index 7ed1b6e78..8f455c75f 100644
--- a/demos/ARMCM0-LPC1114-LPCXPRESSO/Makefile
+++ b/demos/ARMCM0-LPC1114-LPCXPRESSO/Makefile
@@ -47,9 +47,6 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
# Imported source files
CHIBIOS = ../..
include $(CHIBIOS)/boards/EA_LPCXPRESSO_BB_1114/board.mk
@@ -59,6 +56,9 @@ include $(CHIBIOS)/os/ports/GCC/ARMCMx/LPC11xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/LPC1114.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -69,7 +69,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/demos/ARMCM0-LPC1114-LPCXPRESSO/ch.ld b/demos/ARMCM0-LPC1114-LPCXPRESSO/ch.ld
deleted file mode 100644
index cfc5ff3b6..000000000
--- a/demos/ARMCM0-LPC1114-LPCXPRESSO/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * LPC1114 memory setup.
- */
-__main_stack_size__ = 0x0100;
-__process_stack_size__ = 0x0100;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x00000000, len = 32k
- ram : org = 0x10000000, len = 8k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARMCM3-LPC1343-LPCXPRESSO/Makefile b/demos/ARMCM3-LPC1343-LPCXPRESSO/Makefile
index dc3cc484f..f544b4f57 100644
--- a/demos/ARMCM3-LPC1343-LPCXPRESSO/Makefile
+++ b/demos/ARMCM3-LPC1343-LPCXPRESSO/Makefile
@@ -47,9 +47,6 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
# Imported source files
CHIBIOS = ../..
include $(CHIBIOS)/boards/EA_LPCXPRESSO_BB_1343/board.mk
@@ -59,6 +56,9 @@ include $(CHIBIOS)/os/ports/GCC/ARMCMx/LPC13xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/LPC1343.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -69,7 +69,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/demos/ARMCM3-LPC1343-LPCXPRESSO/ch.ld b/demos/ARMCM3-LPC1343-LPCXPRESSO/ch.ld
deleted file mode 100644
index 703f09ca4..000000000
--- a/demos/ARMCM3-LPC1343-LPCXPRESSO/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * LPC1343 memory setup.
- */
-__main_stack_size__ = 0x0100;
-__process_stack_size__ = 0x0100;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x00000000, len = 32k
- ram : org = 0x10000000, len = 8k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARMCM3-STM32F100-DISCOVERY/Makefile b/demos/ARMCM3-STM32F100-DISCOVERY/Makefile
index 792a57e5f..b34f9edf1 100644
--- a/demos/ARMCM3-STM32F100-DISCOVERY/Makefile
+++ b/demos/ARMCM3-STM32F100-DISCOVERY/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/ST_STM32VL_DISCOVERY/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F100xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
diff --git a/demos/ARMCM3-STM32F100-DISCOVERY/ch.ld b/demos/ARMCM3-STM32F100-DISCOVERY/ch.ld
deleted file mode 100644
index 83ea62bd5..000000000
--- a/demos/ARMCM3-STM32F100-DISCOVERY/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F100xB memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 8k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARMCM3-STM32F103-FATFS/Makefile b/demos/ARMCM3-STM32F103-FATFS/Makefile
index 5e7ac0c65..0d31e021a 100644
--- a/demos/ARMCM3-STM32F103-FATFS/Makefile
+++ b/demos/ARMCM3-STM32F103-FATFS/Makefile
@@ -52,19 +52,19 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
include $(CHIBIOS)/ext/fatfs/fatfs.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
diff --git a/demos/ARMCM3-STM32F103-FATFS/ch.ld b/demos/ARMCM3-STM32F103-FATFS/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/demos/ARMCM3-STM32F103-FATFS/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARMCM3-STM32F103-G++/Makefile b/demos/ARMCM3-STM32F103-G++/Makefile
index 9dba58699..e88957c87 100644
--- a/demos/ARMCM3-STM32F103-G++/Makefile
+++ b/demos/ARMCM3-STM32F103-G++/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
diff --git a/demos/ARMCM3-STM32F103-G++/ch.ld b/demos/ARMCM3-STM32F103-G++/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/demos/ARMCM3-STM32F103-G++/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARMCM3-STM32F103/Makefile b/demos/ARMCM3-STM32F103/Makefile
index 74f23b072..4d4ba0246 100644
--- a/demos/ARMCM3-STM32F103/Makefile
+++ b/demos/ARMCM3-STM32F103/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
diff --git a/demos/ARMCM3-STM32F103/ch.ld b/demos/ARMCM3-STM32F103/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/demos/ARMCM3-STM32F103/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARMCM3-STM32F103ZG-FATFS/Makefile b/demos/ARMCM3-STM32F103ZG-FATFS/Makefile
index 36b6c20c4..2485c272c 100644
--- a/demos/ARMCM3-STM32F103ZG-FATFS/Makefile
+++ b/demos/ARMCM3-STM32F103ZG-FATFS/Makefile
@@ -52,19 +52,19 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/ST_STM3210E_EVAL/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
include $(CHIBIOS)/ext/fatfs/fatfs.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xG.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -78,7 +78,7 @@ CSRC = $(PORTSRC) \
$(CHIBIOS)/os/various/syscalls.c \
$(CHIBIOS)/os/various/shell.c \
$(CHIBIOS)/os/various/chprintf.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/demos/ARMCM3-STM32F103ZG-FATFS/ch.ld b/demos/ARMCM3-STM32F103ZG-FATFS/ch.ld
deleted file mode 100644
index 363ddce9f..000000000
--- a/demos/ARMCM3-STM32F103ZG-FATFS/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103xG memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 1m
- ram : org = 0x20000000, len = 96k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARMCM3-STM32F107/Makefile b/demos/ARMCM3-STM32F107/Makefile
index 9a7631be9..90607b250 100644
--- a/demos/ARMCM3-STM32F107/Makefile
+++ b/demos/ARMCM3-STM32F107/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P107/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F107xC.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -74,7 +74,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/demos/ARMCM3-STM32F107/ch.ld b/demos/ARMCM3-STM32F107/ch.ld
deleted file mode 100644
index 1381b8b1c..000000000
--- a/demos/ARMCM3-STM32F107/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F107 memory setup.
- */
-__main_stack_size__ = 0x0200;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 256k
- ram : org = 0x20000000, len = 64k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARMCM3-STM32L152-DISCOVERY/Makefile b/demos/ARMCM3-STM32L152-DISCOVERY/Makefile
index 65ba0eece..603ceb433 100644
--- a/demos/ARMCM3-STM32L152-DISCOVERY/Makefile
+++ b/demos/ARMCM3-STM32L152-DISCOVERY/Makefile
@@ -52,10 +52,7 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../..
include $(CHIBIOS)/boards/ST_STM32L_DISCOVERY/board.mk
include $(CHIBIOS)/os/hal/platforms/STM32L1xx/platform.mk
@@ -64,6 +61,9 @@ include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32L1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32L152xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -74,7 +74,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/demos/ARMCM3-STM32L152-DISCOVERY/ch.ld b/demos/ARMCM3-STM32L152-DISCOVERY/ch.ld
deleted file mode 100644
index 51237c594..000000000
--- a/demos/ARMCM3-STM32L152-DISCOVERY/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32L1152xB memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 16k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/demos/ARMCM3-STM32L152-DISCOVERY/halconf.h b/demos/ARMCM3-STM32L152-DISCOVERY/halconf.h
index f575e536f..3895ff70a 100644
--- a/demos/ARMCM3-STM32L152-DISCOVERY/halconf.h
+++ b/demos/ARMCM3-STM32L152-DISCOVERY/halconf.h
@@ -115,7 +115,7 @@
* @brief Enables the SERIAL over USB subsystem.
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL_USB FALSE
+#define HAL_USE_SERIAL_USB TRUE
#endif
/**
@@ -136,7 +136,7 @@
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB FALSE
+#define HAL_USE_USB TRUE
#endif
/*===========================================================================*/
diff --git a/docs/Doxyfile_chm b/docs/Doxyfile_chm
index f6580b758..085a4d06a 100644
--- a/docs/Doxyfile_chm
+++ b/docs/Doxyfile_chm
@@ -647,10 +647,11 @@ INPUT = ../docs/src \
../os/kernel/templates \
../os/ports \
../os/ports/GCC/ARM \
- ../os/ports/GCC/ARM\LPC214x \
- ../os/ports/GCC/ARM\AT91SAM7 \
+ ../os/ports/GCC/ARM/LPC214x \
+ ../os/ports/GCC/ARM/AT91SAM7 \
../os/ports/GCC/ARMCMx \
- ../os/ports/GCC/ARMCMx/STM32 \
+ ../os/ports/GCC/ARMCMx/STM32F1xx \
+ ../os/ports/GCC/ARMCMx/STM32L1xx \
../os/ports/GCC/ARMCMx/LPC11xx \
../os/ports/GCC/ARMCMx/LPC13xx \
../os/ports/GCC/PPC \
@@ -679,7 +680,8 @@ INPUT = ../docs/src \
../os/hal/platforms/LPC214x/platform.dox \
../os/hal/platforms/MSP430/platform.dox \
../os/hal/platforms/SPC56x/platform.dox \
- ../os/hal/platforms/STM32/platform.dox \
+ ../os/hal/platforms/STM32F1xx/platform.dox \
+ ../os/hal/platforms/STM32L1xx/platform.dox \
../os/hal/platforms/STM8L/platform.dox \
../os/hal/platforms/STM8S/platform.dox \
../os/various \
@@ -742,7 +744,8 @@ RECURSIVE = NO
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
-EXCLUDE = ../os/hal/platforms/STM32/stm32f10x.h \
+EXCLUDE = ../os/hal/platforms/STM32F1xx/stm32f10x.h \
+ ../os/hal/platforms/STM32L1xx/stm32l10x.h \
../os/hal/platforms/STM8/stm8s.h \
../os/hal/platforms/STM8/stm8s_type.h \
../os/hal/platforms/LPC11xx/LPC11xx.h \
diff --git a/docs/Doxyfile_html b/docs/Doxyfile_html
index 0d2e6e31b..7e85cd9ed 100644
--- a/docs/Doxyfile_html
+++ b/docs/Doxyfile_html
@@ -647,10 +647,11 @@ INPUT = ../docs/src \
../os/kernel/templates \
../os/ports \
../os/ports/GCC/ARM \
- ../os/ports/GCC/ARM\LPC214x \
- ../os/ports/GCC/ARM\AT91SAM7 \
+ ../os/ports/GCC/ARM/LPC214x \
+ ../os/ports/GCC/ARM/AT91SAM7 \
../os/ports/GCC/ARMCMx \
- ../os/ports/GCC/ARMCMx/STM32 \
+ ../os/ports/GCC/ARMCMx/STM32F1xx \
+ ../os/ports/GCC/ARMCMx/STM32L1xx \
../os/ports/GCC/ARMCMx/LPC11xx \
../os/ports/GCC/ARMCMx/LPC13xx \
../os/ports/GCC/PPC \
@@ -679,7 +680,8 @@ INPUT = ../docs/src \
../os/hal/platforms/LPC214x/platform.dox \
../os/hal/platforms/MSP430/platform.dox \
../os/hal/platforms/SPC56x/platform.dox \
- ../os/hal/platforms/STM32/platform.dox \
+ ../os/hal/platforms/STM32F1xx/platform.dox \
+ ../os/hal/platforms/STM32L1xx/platform.dox \
../os/hal/platforms/STM8L/platform.dox \
../os/hal/platforms/STM8S/platform.dox \
../os/various \
@@ -742,7 +744,8 @@ RECURSIVE = NO
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
-EXCLUDE = ../os/hal/platforms/STM32/stm32f10x.h \
+EXCLUDE = ../os/hal/platforms/STM32F1xx/stm32f10x.h \
+ ../os/hal/platforms/STM32L1xx/stm32l10x.h \
../os/hal/platforms/STM8/stm8s.h \
../os/hal/platforms/STM8/stm8s_type.h \
../os/hal/platforms/LPC11xx/LPC11xx.h \
diff --git a/docs/rsc/header_chm.html b/docs/rsc/header_chm.html
index 7900d8bf2..a27feac41 100644
--- a/docs/rsc/header_chm.html
+++ b/docs/rsc/header_chm.html
@@ -13,7 +13,7 @@
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
- <div id="projectname">ChibiOS/RT&#160;<span id="projectnumber">2.3.1</span></div>
+ <div id="projectname">ChibiOS/RT&#160;<span id="projectnumber">2.3.3</span></div>
</td>
</tr>
</tbody>
diff --git a/docs/rsc/header_html.html b/docs/rsc/header_html.html
index 8e3887f51..46b76b597 100644
--- a/docs/rsc/header_html.html
+++ b/docs/rsc/header_html.html
@@ -20,7 +20,7 @@ $(document).ready(initResizable);
<tbody>
<tr style="height: 92px;">
<td style="padding-left: 0.5em;">
- <div id="projectname">ChibiOS/RT<br><span id="projectnumber">2.3.1</span></div>
+ <div id="projectname">ChibiOS/RT<br><span id="projectnumber">2.3.3</span></div>
</td>
<td style="padding-left: 3em;">
<script type="text/javascript"><!--
diff --git a/readme.txt b/readme.txt
index 177cde14b..143eb69bb 100644
--- a/readme.txt
+++ b/readme.txt
@@ -61,16 +61,21 @@
+--test/ - Kernel test suite source code.
| +--coverage/ - Code coverage project.
+--testhal/ - HAL integration test demos.
- +--LPC11xx/ - LPC11xx HAL test demos.
- +--LPC13xx/ - LPC13xx HAL test demos.
- +--STM32/ - STM32 HAL test demos.
- +--STM8S/ - STM8S HAL test demos.
+ | +--LPC11xx/ - LPC11xx HAL test demos.
+ | +--LPC13xx/ - LPC13xx HAL test demos.
+ | +--STM32/ - STM32 HAL test demos.
+ | +--STM8S/ - STM8S HAL test demos.
+ +--tools - Various tools.
+ +--eclipse - Eclipse enhancements.
*****************************************************************************
*** Releases ***
*****************************************************************************
*** 2.3.3 ***
+- FIX: Fixed wrong check on CH_DBG_ENABLE_STACK_CHECK setting (bug 3387671)
+ (backported to 2.2.7).
+- FIX: Fixed wrong APB1 frequency check (bug 3361039)(backported to 2.2.7).
- FIX: Fixed missing state in shell demos (bug 3351556)(backported to 2.2.7).
- FIX: Fixed race condition in Cortex-Mx ports (bug 3317500)(backported
to 2.2.6).
@@ -84,14 +89,37 @@
(backported to 2.2.4).
- FIX: Fixed timeout problem in the lwIP interface layer (bug 3302420)
(backported to 2.2.4).
+- NEW: Added the new CMSIS 2.1 headers, now CMSIS resides into a shared
+ location: ./os/ports/common/ARMCMx/CMSIS. Old CMSIS files have been
+ removed from the various platforms.
+- NEW: Removed all the ch.ld files from the ARMCMx demos, now the makefiles
+ point to common ld files under the various ports. Less duplication and
+ easier maintenance.
+- NEW: Improved stack checking and reorganized memory map for the Cortex-Mx
+ demos. Now stacks are allocated at the start of the RAM, an overflow of the
+ exception stack now triggers an exception (it could went unnoticed before).
+ The process stack is organized to be checked on context switch like other
+ threads. Now all threads have an explicit stack boundary pointer.
+ (documentation to be updated)
+ (change to be ported to IAR and Keil ports)
+- NEW: Added debug plugin for Eclipse under ./tools/eclipse (backported to
+ 2.2.7).
+- NEW: The debug macros chDbgCheck() and chDbgAssert() now can be externally
+ redefined. The macro chDbgCheck() no more includes the line number in the
+ description because incompatibility with the Cosmic compiler (backported to
+ 2.2.7).
+- NEW: Added provisional support for STM32L1xx and STM32F2xx. Because of this
+ some directories related to the STM32 have been renamed, your makefiles may
+ require adjustments.
+ (change to be ported to IAR and Keil build files)
- NEW: Added a custom rule to the various rules.mk files, now it is possible
to add an user rule into the Makefiles.
- NEW: Improvements to the trace buffer, now it stores a full thread pointer
and event time, changed names to debug variables by adding the "dbg_"
- prefix.
+ prefix (backported to 2.2.7).
- NEW: Added a new functionality to the registry subsystem, now it is possible
to associate a name to the threads using chRegSetThreadName. The main and
- idle threads have their name assigned by default.
+ idle threads have their name assigned by default (backported to 2.2.7).
- NEW: Added TIM8 support to the STM32 GPT, ICU and PWM drivers.
- NEW: Updated the STM32 header file to the latest version 3.5.0 and fixed
it in order to correct several bugs related to the XL family.
@@ -438,7 +466,7 @@
(backported to 2.0.6).
- FIX: Incorrect AT91SAM7X initialization, thanks Leszek (bug 3075354)
(backported to 2.0.5).
-- FIX: Fixed race condition in function chSchGoSleepTimeoutS(), thanks Balázs
+- FIX: Fixed race condition in function chSchGoSleepTimeoutS(), thanks Bal�zs
(bug 3074984)(backported to 2.0.5).
- FIX: Fixed race condition in threads creation (bug 3069854)(backported
to 2.0.5).
diff --git a/testhal/LPC11xx/IRQ_STORM/Makefile b/testhal/LPC11xx/IRQ_STORM/Makefile
index 2f65b9fe4..d5c1b4cbd 100644
--- a/testhal/LPC11xx/IRQ_STORM/Makefile
+++ b/testhal/LPC11xx/IRQ_STORM/Makefile
@@ -47,10 +47,7 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/EA_LPCXPRESSO_BB_1114/board.mk
include $(CHIBIOS)/os/hal/platforms/LPC11xx/platform.mk
@@ -59,6 +56,9 @@ include $(CHIBIOS)/os/ports/GCC/ARMCMx/LPC11xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/LPC1114.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -69,7 +69,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/LPC11xx/IRQ_STORM/ch.ld b/testhal/LPC11xx/IRQ_STORM/ch.ld
deleted file mode 100644
index cfc5ff3b6..000000000
--- a/testhal/LPC11xx/IRQ_STORM/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * LPC1114 memory setup.
- */
-__main_stack_size__ = 0x0100;
-__process_stack_size__ = 0x0100;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x00000000, len = 32k
- ram : org = 0x10000000, len = 8k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/LPC13xx/IRQ_STORM/Makefile b/testhal/LPC13xx/IRQ_STORM/Makefile
index 6d904e8a8..cb53a7761 100644
--- a/testhal/LPC13xx/IRQ_STORM/Makefile
+++ b/testhal/LPC13xx/IRQ_STORM/Makefile
@@ -47,10 +47,7 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/EA_LPCXPRESSO_BB_1343/board.mk
include $(CHIBIOS)/os/hal/platforms/LPC13xx/platform.mk
@@ -59,6 +56,9 @@ include $(CHIBIOS)/os/ports/GCC/ARMCMx/LPC13xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/LPC1343.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -69,7 +69,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/LPC13xx/IRQ_STORM/ch.ld b/testhal/LPC13xx/IRQ_STORM/ch.ld
deleted file mode 100644
index 703f09ca4..000000000
--- a/testhal/LPC13xx/IRQ_STORM/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * LPC1343 memory setup.
- */
-__main_stack_size__ = 0x0100;
-__process_stack_size__ = 0x0100;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x00000000, len = 32k
- ram : org = 0x10000000, len = 8k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/ADC/ch.ld b/testhal/STM32/ADC/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/ADC/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/CAN/ch.ld b/testhal/STM32/CAN/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/CAN/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/GPT/ch.ld b/testhal/STM32/GPT/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/GPT/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/GPT/openocd.bat b/testhal/STM32/GPT/openocd.bat
deleted file mode 100644
index a8b306318..000000000
--- a/testhal/STM32/GPT/openocd.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@echo off
-start /MIN openocd.exe
-start telnet 127.0.0.1 4444
diff --git a/testhal/STM32/GPT/openocd.cfg b/testhal/STM32/GPT/openocd.cfg
deleted file mode 100644
index f40febe66..000000000
--- a/testhal/STM32/GPT/openocd.cfg
+++ /dev/null
@@ -1,13 +0,0 @@
-#daemon configuration
-telnet_port 4444
-gdb_port 3333
-
-# GDB can also flash my flash!
-gdb_memory_map enable
-gdb_flash_program enable
-gdb_breakpoint_override hard
-
-set WORKAREASIZE 0x5000
-
-source [find interface/olimex-arm-usb-ocd.cfg]
-source [find target/stm32.cfg]
diff --git a/testhal/STM32/I2C/ch.ld b/testhal/STM32/I2C/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/I2C/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/IRQ_STORM/ch.ld b/testhal/STM32/IRQ_STORM/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/IRQ_STORM/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/PWM-ICU/Makefile b/testhal/STM32/PWM-ICU/Makefile
deleted file mode 100644
index a5c76f1c8..000000000
--- a/testhal/STM32/PWM-ICU/Makefile
+++ /dev/null
@@ -1,204 +0,0 @@
-##############################################################################
-# Build global options
-# NOTE: Can be overridden externally.
-#
-
-# Compiler options here.
-ifeq ($(USE_OPT),)
- USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
-endif
-
-# C++ specific options here (added to USE_OPT).
-ifeq ($(USE_CPPOPT),)
- USE_CPPOPT = -fno-rtti
-endif
-
-# Enable this if you want the linker to remove unused code and data
-ifeq ($(USE_LINK_GC),)
- USE_LINK_GC = yes
-endif
-
-# If enabled, this option allows to compile the application in THUMB mode.
-ifeq ($(USE_THUMB),)
- USE_THUMB = yes
-endif
-
-# Enable register caching optimization (read documentation).
-ifeq ($(USE_CURRP_CACHING),)
- USE_CURRP_CACHING = no
-endif
-
-#
-# Build global options
-##############################################################################
-
-##############################################################################
-# Architecture or project specific options
-#
-
-# Enable this if you really want to use the STM FWLib.
-ifeq ($(USE_FWLIB),)
- USE_FWLIB = no
-endif
-
-#
-# Architecture or project specific options
-##############################################################################
-
-##############################################################################
-# Project, sources and paths
-#
-
-# Define project name here
-PROJECT = ch
-
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
-CHIBIOS = ../../..
-include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
-include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
-include $(CHIBIOS)/os/kernel/kernel.mk
-#include $(CHIBIOS)/test/test.mk
-
-# C sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CSRC = $(PORTSRC) \
- $(KERNSRC) \
- $(TESTSRC) \
- $(HALSRC) \
- $(PLATFORMSRC) \
- $(BOARDSRC) \
- $(CHIBIOS)/os/various/evtimer.c \
- $(CHIBIOS)/os/various/syscalls.c \
- main.c
-
-# C++ sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CPPSRC =
-
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
-ASMSRC = $(PORTASM)
-
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC) \
- $(CHIBIOS)/os/various
-
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
-
-MCU = cortex-m3
-
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-CP = $(TRGT)objcopy
-AS = $(TRGT)gcc -x assembler-with-cpp
-OD = $(TRGT)objdump
-HEX = $(CP) -O ihex
-BIN = $(CP) -O binary
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
-CWARN = -Wall -Wextra -Wstrict-prototypes
-
-# Define C++ warning options here
-CPPWARN = -Wall -Wextra
-
-#
-# Compiler settings
-##############################################################################
-
-##############################################################################
-# Start of default section
-#
-
-# List all default C defines here, like -D_DEBUG=1
-DDEFS =
-
-# List all default ASM defines here, like -D_DEBUG=1
-DADEFS =
-
-# List all default directories to look for include files here
-DINCDIR =
-
-# List the default directory to look for the libraries here
-DLIBDIR =
-
-# List all default libraries here
-DLIBS =
-
-#
-# End of default section
-##############################################################################
-
-##############################################################################
-# Start of user section
-#
-
-# List all user C define here, like -D_DEBUG=1
-UDEFS =
-
-# Define ASM defines here
-UADEFS =
-
-# List all user directories here
-UINCDIR =
-
-# List the user directory to look for the libraries here
-ULIBDIR =
-
-# List all user libraries here
-ULIBS =
-
-#
-# End of user defines
-##############################################################################
-
-ifeq ($(USE_FWLIB),yes)
- include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
- CSRC += $(STM32SRC)
- INCDIR += $(STM32INC)
- USE_OPT += -DUSE_STDPERIPH_DRIVER
-endif
-
-include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
diff --git a/testhal/STM32/PWM-ICU/ch.ld b/testhal/STM32/PWM-ICU/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/PWM-ICU/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/SDIO/ch.ld b/testhal/STM32/SDIO/ch.ld
deleted file mode 100644
index 363ddce9f..000000000
--- a/testhal/STM32/SDIO/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103xG memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 1m
- ram : org = 0x20000000, len = 96k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/SPI/Makefile b/testhal/STM32/SPI/Makefile
deleted file mode 100644
index a5c76f1c8..000000000
--- a/testhal/STM32/SPI/Makefile
+++ /dev/null
@@ -1,204 +0,0 @@
-##############################################################################
-# Build global options
-# NOTE: Can be overridden externally.
-#
-
-# Compiler options here.
-ifeq ($(USE_OPT),)
- USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
-endif
-
-# C++ specific options here (added to USE_OPT).
-ifeq ($(USE_CPPOPT),)
- USE_CPPOPT = -fno-rtti
-endif
-
-# Enable this if you want the linker to remove unused code and data
-ifeq ($(USE_LINK_GC),)
- USE_LINK_GC = yes
-endif
-
-# If enabled, this option allows to compile the application in THUMB mode.
-ifeq ($(USE_THUMB),)
- USE_THUMB = yes
-endif
-
-# Enable register caching optimization (read documentation).
-ifeq ($(USE_CURRP_CACHING),)
- USE_CURRP_CACHING = no
-endif
-
-#
-# Build global options
-##############################################################################
-
-##############################################################################
-# Architecture or project specific options
-#
-
-# Enable this if you really want to use the STM FWLib.
-ifeq ($(USE_FWLIB),)
- USE_FWLIB = no
-endif
-
-#
-# Architecture or project specific options
-##############################################################################
-
-##############################################################################
-# Project, sources and paths
-#
-
-# Define project name here
-PROJECT = ch
-
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
-CHIBIOS = ../../..
-include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
-include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
-include $(CHIBIOS)/os/kernel/kernel.mk
-#include $(CHIBIOS)/test/test.mk
-
-# C sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CSRC = $(PORTSRC) \
- $(KERNSRC) \
- $(TESTSRC) \
- $(HALSRC) \
- $(PLATFORMSRC) \
- $(BOARDSRC) \
- $(CHIBIOS)/os/various/evtimer.c \
- $(CHIBIOS)/os/various/syscalls.c \
- main.c
-
-# C++ sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CPPSRC =
-
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
-ASMSRC = $(PORTASM)
-
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC) \
- $(CHIBIOS)/os/various
-
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
-
-MCU = cortex-m3
-
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-CP = $(TRGT)objcopy
-AS = $(TRGT)gcc -x assembler-with-cpp
-OD = $(TRGT)objdump
-HEX = $(CP) -O ihex
-BIN = $(CP) -O binary
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
-CWARN = -Wall -Wextra -Wstrict-prototypes
-
-# Define C++ warning options here
-CPPWARN = -Wall -Wextra
-
-#
-# Compiler settings
-##############################################################################
-
-##############################################################################
-# Start of default section
-#
-
-# List all default C defines here, like -D_DEBUG=1
-DDEFS =
-
-# List all default ASM defines here, like -D_DEBUG=1
-DADEFS =
-
-# List all default directories to look for include files here
-DINCDIR =
-
-# List the default directory to look for the libraries here
-DLIBDIR =
-
-# List all default libraries here
-DLIBS =
-
-#
-# End of default section
-##############################################################################
-
-##############################################################################
-# Start of user section
-#
-
-# List all user C define here, like -D_DEBUG=1
-UDEFS =
-
-# Define ASM defines here
-UADEFS =
-
-# List all user directories here
-UINCDIR =
-
-# List the user directory to look for the libraries here
-ULIBDIR =
-
-# List all user libraries here
-ULIBS =
-
-#
-# End of user defines
-##############################################################################
-
-ifeq ($(USE_FWLIB),yes)
- include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
- CSRC += $(STM32SRC)
- INCDIR += $(STM32INC)
- USE_OPT += -DUSE_STDPERIPH_DRIVER
-endif
-
-include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
diff --git a/testhal/STM32/SPI/ch.ld b/testhal/STM32/SPI/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/SPI/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/UART/Makefile b/testhal/STM32/UART/Makefile
deleted file mode 100644
index a5c76f1c8..000000000
--- a/testhal/STM32/UART/Makefile
+++ /dev/null
@@ -1,204 +0,0 @@
-##############################################################################
-# Build global options
-# NOTE: Can be overridden externally.
-#
-
-# Compiler options here.
-ifeq ($(USE_OPT),)
- USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
-endif
-
-# C++ specific options here (added to USE_OPT).
-ifeq ($(USE_CPPOPT),)
- USE_CPPOPT = -fno-rtti
-endif
-
-# Enable this if you want the linker to remove unused code and data
-ifeq ($(USE_LINK_GC),)
- USE_LINK_GC = yes
-endif
-
-# If enabled, this option allows to compile the application in THUMB mode.
-ifeq ($(USE_THUMB),)
- USE_THUMB = yes
-endif
-
-# Enable register caching optimization (read documentation).
-ifeq ($(USE_CURRP_CACHING),)
- USE_CURRP_CACHING = no
-endif
-
-#
-# Build global options
-##############################################################################
-
-##############################################################################
-# Architecture or project specific options
-#
-
-# Enable this if you really want to use the STM FWLib.
-ifeq ($(USE_FWLIB),)
- USE_FWLIB = no
-endif
-
-#
-# Architecture or project specific options
-##############################################################################
-
-##############################################################################
-# Project, sources and paths
-#
-
-# Define project name here
-PROJECT = ch
-
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
-CHIBIOS = ../../..
-include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
-include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
-include $(CHIBIOS)/os/kernel/kernel.mk
-#include $(CHIBIOS)/test/test.mk
-
-# C sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CSRC = $(PORTSRC) \
- $(KERNSRC) \
- $(TESTSRC) \
- $(HALSRC) \
- $(PLATFORMSRC) \
- $(BOARDSRC) \
- $(CHIBIOS)/os/various/evtimer.c \
- $(CHIBIOS)/os/various/syscalls.c \
- main.c
-
-# C++ sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CPPSRC =
-
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
-ASMSRC = $(PORTASM)
-
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC) \
- $(CHIBIOS)/os/various
-
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
-
-MCU = cortex-m3
-
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-CP = $(TRGT)objcopy
-AS = $(TRGT)gcc -x assembler-with-cpp
-OD = $(TRGT)objdump
-HEX = $(CP) -O ihex
-BIN = $(CP) -O binary
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
-CWARN = -Wall -Wextra -Wstrict-prototypes
-
-# Define C++ warning options here
-CPPWARN = -Wall -Wextra
-
-#
-# Compiler settings
-##############################################################################
-
-##############################################################################
-# Start of default section
-#
-
-# List all default C defines here, like -D_DEBUG=1
-DDEFS =
-
-# List all default ASM defines here, like -D_DEBUG=1
-DADEFS =
-
-# List all default directories to look for include files here
-DINCDIR =
-
-# List the default directory to look for the libraries here
-DLIBDIR =
-
-# List all default libraries here
-DLIBS =
-
-#
-# End of default section
-##############################################################################
-
-##############################################################################
-# Start of user section
-#
-
-# List all user C define here, like -D_DEBUG=1
-UDEFS =
-
-# Define ASM defines here
-UADEFS =
-
-# List all user directories here
-UINCDIR =
-
-# List the user directory to look for the libraries here
-ULIBDIR =
-
-# List all user libraries here
-ULIBS =
-
-#
-# End of user defines
-##############################################################################
-
-ifeq ($(USE_FWLIB),yes)
- include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
- CSRC += $(STM32SRC)
- INCDIR += $(STM32INC)
- USE_OPT += -DUSE_STDPERIPH_DRIVER
-endif
-
-include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
diff --git a/testhal/STM32/UART/ch.ld b/testhal/STM32/UART/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/UART/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/USB_CDC/ch.ld b/testhal/STM32/USB_CDC/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/USB_CDC/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/USB_MSC/ch.ld b/testhal/STM32/USB_MSC/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/USB_MSC/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT 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/RT 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/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/CAN/Makefile b/testhal/STM32F1xx/ADC/Makefile
index a5c76f1c8..f93aeb073 100644
--- a/testhal/STM32/CAN/Makefile
+++ b/testhal/STM32F1xx/ADC/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
#include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -74,7 +74,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/ADC/chconf.h b/testhal/STM32F1xx/ADC/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/ADC/chconf.h
+++ b/testhal/STM32F1xx/ADC/chconf.h
diff --git a/testhal/STM32/ADC/halconf.h b/testhal/STM32F1xx/ADC/halconf.h
index b42f9088b..b42f9088b 100644
--- a/testhal/STM32/ADC/halconf.h
+++ b/testhal/STM32F1xx/ADC/halconf.h
diff --git a/testhal/STM32/ADC/main.c b/testhal/STM32F1xx/ADC/main.c
index 214f28b5f..214f28b5f 100644
--- a/testhal/STM32/ADC/main.c
+++ b/testhal/STM32F1xx/ADC/main.c
diff --git a/testhal/STM32/ADC/mcuconf.h b/testhal/STM32F1xx/ADC/mcuconf.h
index 558c0773d..558c0773d 100644
--- a/testhal/STM32/ADC/mcuconf.h
+++ b/testhal/STM32F1xx/ADC/mcuconf.h
diff --git a/testhal/STM32/ADC/readme.txt b/testhal/STM32F1xx/ADC/readme.txt
index e0cf0adea..e0cf0adea 100644
--- a/testhal/STM32/ADC/readme.txt
+++ b/testhal/STM32F1xx/ADC/readme.txt
diff --git a/testhal/STM32/GPT/Makefile b/testhal/STM32F1xx/CAN/Makefile
index a5c76f1c8..f93aeb073 100644
--- a/testhal/STM32/GPT/Makefile
+++ b/testhal/STM32F1xx/CAN/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
#include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -74,7 +74,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/CAN/chconf.h b/testhal/STM32F1xx/CAN/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/CAN/chconf.h
+++ b/testhal/STM32F1xx/CAN/chconf.h
diff --git a/testhal/STM32/CAN/halconf.h b/testhal/STM32F1xx/CAN/halconf.h
index a7ae76b45..a7ae76b45 100644
--- a/testhal/STM32/CAN/halconf.h
+++ b/testhal/STM32F1xx/CAN/halconf.h
diff --git a/testhal/STM32/CAN/main.c b/testhal/STM32F1xx/CAN/main.c
index ce52ee67a..ce52ee67a 100644
--- a/testhal/STM32/CAN/main.c
+++ b/testhal/STM32F1xx/CAN/main.c
diff --git a/testhal/STM32/CAN/mcuconf.h b/testhal/STM32F1xx/CAN/mcuconf.h
index 558c0773d..558c0773d 100644
--- a/testhal/STM32/CAN/mcuconf.h
+++ b/testhal/STM32F1xx/CAN/mcuconf.h
diff --git a/testhal/STM32/CAN/readme.txt b/testhal/STM32F1xx/CAN/readme.txt
index 3b92f4fa3..3b92f4fa3 100644
--- a/testhal/STM32/CAN/readme.txt
+++ b/testhal/STM32F1xx/CAN/readme.txt
diff --git a/testhal/STM32/IRQ_STORM/Makefile b/testhal/STM32F1xx/GPT/Makefile
index a5c76f1c8..f93aeb073 100644
--- a/testhal/STM32/IRQ_STORM/Makefile
+++ b/testhal/STM32F1xx/GPT/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
#include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -74,7 +74,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/GPT/chconf.h b/testhal/STM32F1xx/GPT/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/GPT/chconf.h
+++ b/testhal/STM32F1xx/GPT/chconf.h
diff --git a/testhal/STM32/GPT/halconf.h b/testhal/STM32F1xx/GPT/halconf.h
index b4361f9b9..b4361f9b9 100644
--- a/testhal/STM32/GPT/halconf.h
+++ b/testhal/STM32F1xx/GPT/halconf.h
diff --git a/testhal/STM32/GPT/main.c b/testhal/STM32F1xx/GPT/main.c
index 57b2977d1..57b2977d1 100644
--- a/testhal/STM32/GPT/main.c
+++ b/testhal/STM32F1xx/GPT/main.c
diff --git a/testhal/STM32/GPT/mcuconf.h b/testhal/STM32F1xx/GPT/mcuconf.h
index eb0774a23..eb0774a23 100644
--- a/testhal/STM32/GPT/mcuconf.h
+++ b/testhal/STM32F1xx/GPT/mcuconf.h
diff --git a/testhal/STM32/GPT/readme.txt b/testhal/STM32F1xx/GPT/readme.txt
index 3f3164120..3f3164120 100644
--- a/testhal/STM32/GPT/readme.txt
+++ b/testhal/STM32F1xx/GPT/readme.txt
diff --git a/testhal/STM32/GPT/run b/testhal/STM32F1xx/GPT/run
index 818d0e307..818d0e307 100644
--- a/testhal/STM32/GPT/run
+++ b/testhal/STM32F1xx/GPT/run
diff --git a/testhal/STM32/I2C/Makefile b/testhal/STM32F1xx/I2C/Makefile
index 9f95a5914..9f95a5914 100644
--- a/testhal/STM32/I2C/Makefile
+++ b/testhal/STM32F1xx/I2C/Makefile
diff --git a/testhal/STM32/I2C/chconf.h b/testhal/STM32F1xx/I2C/chconf.h
index a293288d3..a293288d3 100644
--- a/testhal/STM32/I2C/chconf.h
+++ b/testhal/STM32F1xx/I2C/chconf.h
diff --git a/testhal/STM32/I2C/halconf.h b/testhal/STM32F1xx/I2C/halconf.h
index da52785c0..da52785c0 100644
--- a/testhal/STM32/I2C/halconf.h
+++ b/testhal/STM32F1xx/I2C/halconf.h
diff --git a/testhal/STM32/I2C/i2c_pns.c b/testhal/STM32F1xx/I2C/i2c_pns.c
index 44f4a8a33..44f4a8a33 100644
--- a/testhal/STM32/I2C/i2c_pns.c
+++ b/testhal/STM32F1xx/I2C/i2c_pns.c
diff --git a/testhal/STM32/I2C/i2c_pns.h b/testhal/STM32F1xx/I2C/i2c_pns.h
index 4dfdf320e..4dfdf320e 100644
--- a/testhal/STM32/I2C/i2c_pns.h
+++ b/testhal/STM32F1xx/I2C/i2c_pns.h
diff --git a/testhal/STM32/I2C/lis3.c b/testhal/STM32F1xx/I2C/lis3.c
index 401f56199..401f56199 100644
--- a/testhal/STM32/I2C/lis3.c
+++ b/testhal/STM32F1xx/I2C/lis3.c
diff --git a/testhal/STM32/I2C/lis3.h b/testhal/STM32F1xx/I2C/lis3.h
index e50359bde..e50359bde 100644
--- a/testhal/STM32/I2C/lis3.h
+++ b/testhal/STM32F1xx/I2C/lis3.h
diff --git a/testhal/STM32/I2C/main.c b/testhal/STM32F1xx/I2C/main.c
index b828953c5..b828953c5 100644
--- a/testhal/STM32/I2C/main.c
+++ b/testhal/STM32F1xx/I2C/main.c
diff --git a/testhal/STM32/I2C/main.h b/testhal/STM32F1xx/I2C/main.h
index 1435a05e5..1435a05e5 100644
--- a/testhal/STM32/I2C/main.h
+++ b/testhal/STM32F1xx/I2C/main.h
diff --git a/testhal/STM32/I2C/max1236.c b/testhal/STM32F1xx/I2C/max1236.c
index 09e2c8b35..09e2c8b35 100644
--- a/testhal/STM32/I2C/max1236.c
+++ b/testhal/STM32F1xx/I2C/max1236.c
diff --git a/testhal/STM32/I2C/max1236.h b/testhal/STM32F1xx/I2C/max1236.h
index aff466cf4..aff466cf4 100644
--- a/testhal/STM32/I2C/max1236.h
+++ b/testhal/STM32F1xx/I2C/max1236.h
diff --git a/testhal/STM32/I2C/mcuconf.h b/testhal/STM32F1xx/I2C/mcuconf.h
index 809c3abd2..809c3abd2 100644
--- a/testhal/STM32/I2C/mcuconf.h
+++ b/testhal/STM32F1xx/I2C/mcuconf.h
diff --git a/testhal/STM32/I2C/tmp75.c b/testhal/STM32F1xx/I2C/tmp75.c
index 72e634527..72e634527 100644
--- a/testhal/STM32/I2C/tmp75.c
+++ b/testhal/STM32F1xx/I2C/tmp75.c
diff --git a/testhal/STM32/I2C/tmp75.h b/testhal/STM32F1xx/I2C/tmp75.h
index ab4b5fa9b..ab4b5fa9b 100644
--- a/testhal/STM32/I2C/tmp75.h
+++ b/testhal/STM32F1xx/I2C/tmp75.h
diff --git a/testhal/STM32F1xx/IRQ_STORM/Makefile b/testhal/STM32F1xx/IRQ_STORM/Makefile
new file mode 100644
index 000000000..f93aeb073
--- /dev/null
+++ b/testhal/STM32F1xx/IRQ_STORM/Makefile
@@ -0,0 +1,204 @@
+##############################################################################
+# Build global options
+# NOTE: Can be overridden externally.
+#
+
+# Compiler options here.
+ifeq ($(USE_OPT),)
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
+endif
+
+# C++ specific options here (added to USE_OPT).
+ifeq ($(USE_CPPOPT),)
+ USE_CPPOPT = -fno-rtti
+endif
+
+# Enable this if you want the linker to remove unused code and data
+ifeq ($(USE_LINK_GC),)
+ USE_LINK_GC = yes
+endif
+
+# If enabled, this option allows to compile the application in THUMB mode.
+ifeq ($(USE_THUMB),)
+ USE_THUMB = yes
+endif
+
+# Enable register caching optimization (read documentation).
+ifeq ($(USE_CURRP_CACHING),)
+ USE_CURRP_CACHING = no
+endif
+
+#
+# Build global options
+##############################################################################
+
+##############################################################################
+# Architecture or project specific options
+#
+
+# Enable this if you really want to use the STM FWLib.
+ifeq ($(USE_FWLIB),)
+ USE_FWLIB = no
+endif
+
+#
+# Architecture or project specific options
+##############################################################################
+
+##############################################################################
+# Project, sources and paths
+#
+
+# Define project name here
+PROJECT = ch
+
+# Imported source files and paths
+CHIBIOS = ../../..
+include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/hal.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
+include $(CHIBIOS)/os/kernel/kernel.mk
+#include $(CHIBIOS)/test/test.mk
+
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
+# C sources that can be compiled in ARM or THUMB mode depending on the global
+# setting.
+CSRC = $(PORTSRC) \
+ $(KERNSRC) \
+ $(TESTSRC) \
+ $(HALSRC) \
+ $(PLATFORMSRC) \
+ $(BOARDSRC) \
+ $(CHIBIOS)/os/various/evtimer.c \
+ $(CHIBIOS)/os/various/syscalls.c \
+ main.c
+
+# C++ sources that can be compiled in ARM or THUMB mode depending on the global
+# setting.
+CPPSRC =
+
+# C sources to be compiled in ARM mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+ACSRC =
+
+# C++ sources to be compiled in ARM mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+ACPPSRC =
+
+# C sources to be compiled in THUMB mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+TCSRC =
+
+# C sources to be compiled in THUMB mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+TCPPSRC =
+
+# List ASM source files here
+ASMSRC = $(PORTASM)
+
+INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) \
+ $(CHIBIOS)/os/various
+
+#
+# Project, sources and paths
+##############################################################################
+
+##############################################################################
+# Compiler settings
+#
+
+MCU = cortex-m3
+
+#TRGT = arm-elf-
+TRGT = arm-none-eabi-
+CC = $(TRGT)gcc
+CPPC = $(TRGT)g++
+# Enable loading with g++ only if you need C++ runtime support.
+# NOTE: You can use C++ even without C++ support if you are careful. C++
+# runtime support makes code size explode.
+LD = $(TRGT)gcc
+#LD = $(TRGT)g++
+CP = $(TRGT)objcopy
+AS = $(TRGT)gcc -x assembler-with-cpp
+OD = $(TRGT)objdump
+HEX = $(CP) -O ihex
+BIN = $(CP) -O binary
+
+# ARM-specific options here
+AOPT =
+
+# THUMB-specific options here
+TOPT = -mthumb -DTHUMB
+
+# Define C warning options here
+CWARN = -Wall -Wextra -Wstrict-prototypes
+
+# Define C++ warning options here
+CPPWARN = -Wall -Wextra
+
+#
+# Compiler settings
+##############################################################################
+
+##############################################################################
+# Start of default section
+#
+
+# List all default C defines here, like -D_DEBUG=1
+DDEFS =
+
+# List all default ASM defines here, like -D_DEBUG=1
+DADEFS =
+
+# List all default directories to look for include files here
+DINCDIR =
+
+# List the default directory to look for the libraries here
+DLIBDIR =
+
+# List all default libraries here
+DLIBS =
+
+#
+# End of default section
+##############################################################################
+
+##############################################################################
+# Start of user section
+#
+
+# List all user C define here, like -D_DEBUG=1
+UDEFS =
+
+# Define ASM defines here
+UADEFS =
+
+# List all user directories here
+UINCDIR =
+
+# List the user directory to look for the libraries here
+ULIBDIR =
+
+# List all user libraries here
+ULIBS =
+
+#
+# End of user defines
+##############################################################################
+
+ifeq ($(USE_FWLIB),yes)
+ include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
+ CSRC += $(STM32SRC)
+ INCDIR += $(STM32INC)
+ USE_OPT += -DUSE_STDPERIPH_DRIVER
+endif
+
+include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
diff --git a/testhal/STM32/IRQ_STORM/chconf.h b/testhal/STM32F1xx/IRQ_STORM/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/IRQ_STORM/chconf.h
+++ b/testhal/STM32F1xx/IRQ_STORM/chconf.h
diff --git a/testhal/STM32/IRQ_STORM/halconf.h b/testhal/STM32F1xx/IRQ_STORM/halconf.h
index 249e2a621..249e2a621 100644
--- a/testhal/STM32/IRQ_STORM/halconf.h
+++ b/testhal/STM32F1xx/IRQ_STORM/halconf.h
diff --git a/testhal/STM32/IRQ_STORM/main.c b/testhal/STM32F1xx/IRQ_STORM/main.c
index 7dcc62d61..7dcc62d61 100644
--- a/testhal/STM32/IRQ_STORM/main.c
+++ b/testhal/STM32F1xx/IRQ_STORM/main.c
diff --git a/testhal/STM32/IRQ_STORM/mcuconf.h b/testhal/STM32F1xx/IRQ_STORM/mcuconf.h
index 2341d5626..2341d5626 100644
--- a/testhal/STM32/IRQ_STORM/mcuconf.h
+++ b/testhal/STM32F1xx/IRQ_STORM/mcuconf.h
diff --git a/testhal/STM32/IRQ_STORM/readme.txt b/testhal/STM32F1xx/IRQ_STORM/readme.txt
index 32aad05b5..32aad05b5 100644
--- a/testhal/STM32/IRQ_STORM/readme.txt
+++ b/testhal/STM32F1xx/IRQ_STORM/readme.txt
diff --git a/testhal/STM32/ADC/Makefile b/testhal/STM32F1xx/PWM-ICU/Makefile
index a5c76f1c8..93cf17eff 100644
--- a/testhal/STM32/ADC/Makefile
+++ b/testhal/STM32F1xx/PWM-ICU/Makefile
@@ -52,15 +52,12 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
#include $(CHIBIOS)/test/test.mk
@@ -74,7 +71,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/PWM-ICU/chconf.h b/testhal/STM32F1xx/PWM-ICU/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/PWM-ICU/chconf.h
+++ b/testhal/STM32F1xx/PWM-ICU/chconf.h
diff --git a/testhal/STM32/PWM-ICU/halconf.h b/testhal/STM32F1xx/PWM-ICU/halconf.h
index 9656ff0aa..9656ff0aa 100644
--- a/testhal/STM32/PWM-ICU/halconf.h
+++ b/testhal/STM32F1xx/PWM-ICU/halconf.h
diff --git a/testhal/STM32/PWM-ICU/main.c b/testhal/STM32F1xx/PWM-ICU/main.c
index 1fd56c33a..1fd56c33a 100644
--- a/testhal/STM32/PWM-ICU/main.c
+++ b/testhal/STM32F1xx/PWM-ICU/main.c
diff --git a/testhal/STM32/PWM-ICU/mcuconf.h b/testhal/STM32F1xx/PWM-ICU/mcuconf.h
index 558c0773d..558c0773d 100644
--- a/testhal/STM32/PWM-ICU/mcuconf.h
+++ b/testhal/STM32F1xx/PWM-ICU/mcuconf.h
diff --git a/testhal/STM32/PWM-ICU/readme.txt b/testhal/STM32F1xx/PWM-ICU/readme.txt
index 97476205d..97476205d 100644
--- a/testhal/STM32/PWM-ICU/readme.txt
+++ b/testhal/STM32F1xx/PWM-ICU/readme.txt
diff --git a/testhal/STM32/SDIO/Makefile b/testhal/STM32F1xx/SDIO/Makefile
index cf88c1190..c56c5eadb 100644
--- a/testhal/STM32/SDIO/Makefile
+++ b/testhal/STM32F1xx/SDIO/Makefile
@@ -55,15 +55,18 @@ PROJECT = ch
# Define linker script file here
LDSCRIPT= ch.ld
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/ST_STM3210E_EVAL/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
#include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xE.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -74,7 +77,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/SDIO/chconf.h b/testhal/STM32F1xx/SDIO/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/SDIO/chconf.h
+++ b/testhal/STM32F1xx/SDIO/chconf.h
diff --git a/testhal/STM32/SDIO/halconf.h b/testhal/STM32F1xx/SDIO/halconf.h
index 682167d84..682167d84 100644
--- a/testhal/STM32/SDIO/halconf.h
+++ b/testhal/STM32F1xx/SDIO/halconf.h
diff --git a/testhal/STM32/SDIO/main.c b/testhal/STM32F1xx/SDIO/main.c
index 9736f0268..9736f0268 100644
--- a/testhal/STM32/SDIO/main.c
+++ b/testhal/STM32F1xx/SDIO/main.c
diff --git a/testhal/STM32/SDIO/mcuconf.h b/testhal/STM32F1xx/SDIO/mcuconf.h
index 658924fc2..658924fc2 100644
--- a/testhal/STM32/SDIO/mcuconf.h
+++ b/testhal/STM32F1xx/SDIO/mcuconf.h
diff --git a/testhal/STM32/SDIO/readme.txt b/testhal/STM32F1xx/SDIO/readme.txt
index caeb7bce7..caeb7bce7 100644
--- a/testhal/STM32/SDIO/readme.txt
+++ b/testhal/STM32F1xx/SDIO/readme.txt
diff --git a/testhal/STM32F1xx/SPI/Makefile b/testhal/STM32F1xx/SPI/Makefile
new file mode 100644
index 000000000..f93aeb073
--- /dev/null
+++ b/testhal/STM32F1xx/SPI/Makefile
@@ -0,0 +1,204 @@
+##############################################################################
+# Build global options
+# NOTE: Can be overridden externally.
+#
+
+# Compiler options here.
+ifeq ($(USE_OPT),)
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
+endif
+
+# C++ specific options here (added to USE_OPT).
+ifeq ($(USE_CPPOPT),)
+ USE_CPPOPT = -fno-rtti
+endif
+
+# Enable this if you want the linker to remove unused code and data
+ifeq ($(USE_LINK_GC),)
+ USE_LINK_GC = yes
+endif
+
+# If enabled, this option allows to compile the application in THUMB mode.
+ifeq ($(USE_THUMB),)
+ USE_THUMB = yes
+endif
+
+# Enable register caching optimization (read documentation).
+ifeq ($(USE_CURRP_CACHING),)
+ USE_CURRP_CACHING = no
+endif
+
+#
+# Build global options
+##############################################################################
+
+##############################################################################
+# Architecture or project specific options
+#
+
+# Enable this if you really want to use the STM FWLib.
+ifeq ($(USE_FWLIB),)
+ USE_FWLIB = no
+endif
+
+#
+# Architecture or project specific options
+##############################################################################
+
+##############################################################################
+# Project, sources and paths
+#
+
+# Define project name here
+PROJECT = ch
+
+# Imported source files and paths
+CHIBIOS = ../../..
+include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/hal.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
+include $(CHIBIOS)/os/kernel/kernel.mk
+#include $(CHIBIOS)/test/test.mk
+
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
+# C sources that can be compiled in ARM or THUMB mode depending on the global
+# setting.
+CSRC = $(PORTSRC) \
+ $(KERNSRC) \
+ $(TESTSRC) \
+ $(HALSRC) \
+ $(PLATFORMSRC) \
+ $(BOARDSRC) \
+ $(CHIBIOS)/os/various/evtimer.c \
+ $(CHIBIOS)/os/various/syscalls.c \
+ main.c
+
+# C++ sources that can be compiled in ARM or THUMB mode depending on the global
+# setting.
+CPPSRC =
+
+# C sources to be compiled in ARM mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+ACSRC =
+
+# C++ sources to be compiled in ARM mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+ACPPSRC =
+
+# C sources to be compiled in THUMB mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+TCSRC =
+
+# C sources to be compiled in THUMB mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+TCPPSRC =
+
+# List ASM source files here
+ASMSRC = $(PORTASM)
+
+INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) \
+ $(CHIBIOS)/os/various
+
+#
+# Project, sources and paths
+##############################################################################
+
+##############################################################################
+# Compiler settings
+#
+
+MCU = cortex-m3
+
+#TRGT = arm-elf-
+TRGT = arm-none-eabi-
+CC = $(TRGT)gcc
+CPPC = $(TRGT)g++
+# Enable loading with g++ only if you need C++ runtime support.
+# NOTE: You can use C++ even without C++ support if you are careful. C++
+# runtime support makes code size explode.
+LD = $(TRGT)gcc
+#LD = $(TRGT)g++
+CP = $(TRGT)objcopy
+AS = $(TRGT)gcc -x assembler-with-cpp
+OD = $(TRGT)objdump
+HEX = $(CP) -O ihex
+BIN = $(CP) -O binary
+
+# ARM-specific options here
+AOPT =
+
+# THUMB-specific options here
+TOPT = -mthumb -DTHUMB
+
+# Define C warning options here
+CWARN = -Wall -Wextra -Wstrict-prototypes
+
+# Define C++ warning options here
+CPPWARN = -Wall -Wextra
+
+#
+# Compiler settings
+##############################################################################
+
+##############################################################################
+# Start of default section
+#
+
+# List all default C defines here, like -D_DEBUG=1
+DDEFS =
+
+# List all default ASM defines here, like -D_DEBUG=1
+DADEFS =
+
+# List all default directories to look for include files here
+DINCDIR =
+
+# List the default directory to look for the libraries here
+DLIBDIR =
+
+# List all default libraries here
+DLIBS =
+
+#
+# End of default section
+##############################################################################
+
+##############################################################################
+# Start of user section
+#
+
+# List all user C define here, like -D_DEBUG=1
+UDEFS =
+
+# Define ASM defines here
+UADEFS =
+
+# List all user directories here
+UINCDIR =
+
+# List the user directory to look for the libraries here
+ULIBDIR =
+
+# List all user libraries here
+ULIBS =
+
+#
+# End of user defines
+##############################################################################
+
+ifeq ($(USE_FWLIB),yes)
+ include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
+ CSRC += $(STM32SRC)
+ INCDIR += $(STM32INC)
+ USE_OPT += -DUSE_STDPERIPH_DRIVER
+endif
+
+include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
diff --git a/testhal/STM32/SPI/chconf.h b/testhal/STM32F1xx/SPI/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/SPI/chconf.h
+++ b/testhal/STM32F1xx/SPI/chconf.h
diff --git a/testhal/STM32/SPI/halconf.h b/testhal/STM32F1xx/SPI/halconf.h
index eaf7f9673..eaf7f9673 100644
--- a/testhal/STM32/SPI/halconf.h
+++ b/testhal/STM32F1xx/SPI/halconf.h
diff --git a/testhal/STM32/SPI/main.c b/testhal/STM32F1xx/SPI/main.c
index 3750203bc..3750203bc 100644
--- a/testhal/STM32/SPI/main.c
+++ b/testhal/STM32F1xx/SPI/main.c
diff --git a/testhal/STM32/SPI/mcuconf.h b/testhal/STM32F1xx/SPI/mcuconf.h
index ab96d8eef..ab96d8eef 100644
--- a/testhal/STM32/SPI/mcuconf.h
+++ b/testhal/STM32F1xx/SPI/mcuconf.h
diff --git a/testhal/STM32/SPI/readme.txt b/testhal/STM32F1xx/SPI/readme.txt
index 590fd8299..590fd8299 100644
--- a/testhal/STM32/SPI/readme.txt
+++ b/testhal/STM32F1xx/SPI/readme.txt
diff --git a/testhal/STM32F1xx/UART/Makefile b/testhal/STM32F1xx/UART/Makefile
new file mode 100644
index 000000000..f93aeb073
--- /dev/null
+++ b/testhal/STM32F1xx/UART/Makefile
@@ -0,0 +1,204 @@
+##############################################################################
+# Build global options
+# NOTE: Can be overridden externally.
+#
+
+# Compiler options here.
+ifeq ($(USE_OPT),)
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
+endif
+
+# C++ specific options here (added to USE_OPT).
+ifeq ($(USE_CPPOPT),)
+ USE_CPPOPT = -fno-rtti
+endif
+
+# Enable this if you want the linker to remove unused code and data
+ifeq ($(USE_LINK_GC),)
+ USE_LINK_GC = yes
+endif
+
+# If enabled, this option allows to compile the application in THUMB mode.
+ifeq ($(USE_THUMB),)
+ USE_THUMB = yes
+endif
+
+# Enable register caching optimization (read documentation).
+ifeq ($(USE_CURRP_CACHING),)
+ USE_CURRP_CACHING = no
+endif
+
+#
+# Build global options
+##############################################################################
+
+##############################################################################
+# Architecture or project specific options
+#
+
+# Enable this if you really want to use the STM FWLib.
+ifeq ($(USE_FWLIB),)
+ USE_FWLIB = no
+endif
+
+#
+# Architecture or project specific options
+##############################################################################
+
+##############################################################################
+# Project, sources and paths
+#
+
+# Define project name here
+PROJECT = ch
+
+# Imported source files and paths
+CHIBIOS = ../../..
+include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/hal.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
+include $(CHIBIOS)/os/kernel/kernel.mk
+#include $(CHIBIOS)/test/test.mk
+
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
+# C sources that can be compiled in ARM or THUMB mode depending on the global
+# setting.
+CSRC = $(PORTSRC) \
+ $(KERNSRC) \
+ $(TESTSRC) \
+ $(HALSRC) \
+ $(PLATFORMSRC) \
+ $(BOARDSRC) \
+ $(CHIBIOS)/os/various/evtimer.c \
+ $(CHIBIOS)/os/various/syscalls.c \
+ main.c
+
+# C++ sources that can be compiled in ARM or THUMB mode depending on the global
+# setting.
+CPPSRC =
+
+# C sources to be compiled in ARM mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+ACSRC =
+
+# C++ sources to be compiled in ARM mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+ACPPSRC =
+
+# C sources to be compiled in THUMB mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+TCSRC =
+
+# C sources to be compiled in THUMB mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+TCPPSRC =
+
+# List ASM source files here
+ASMSRC = $(PORTASM)
+
+INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) \
+ $(CHIBIOS)/os/various
+
+#
+# Project, sources and paths
+##############################################################################
+
+##############################################################################
+# Compiler settings
+#
+
+MCU = cortex-m3
+
+#TRGT = arm-elf-
+TRGT = arm-none-eabi-
+CC = $(TRGT)gcc
+CPPC = $(TRGT)g++
+# Enable loading with g++ only if you need C++ runtime support.
+# NOTE: You can use C++ even without C++ support if you are careful. C++
+# runtime support makes code size explode.
+LD = $(TRGT)gcc
+#LD = $(TRGT)g++
+CP = $(TRGT)objcopy
+AS = $(TRGT)gcc -x assembler-with-cpp
+OD = $(TRGT)objdump
+HEX = $(CP) -O ihex
+BIN = $(CP) -O binary
+
+# ARM-specific options here
+AOPT =
+
+# THUMB-specific options here
+TOPT = -mthumb -DTHUMB
+
+# Define C warning options here
+CWARN = -Wall -Wextra -Wstrict-prototypes
+
+# Define C++ warning options here
+CPPWARN = -Wall -Wextra
+
+#
+# Compiler settings
+##############################################################################
+
+##############################################################################
+# Start of default section
+#
+
+# List all default C defines here, like -D_DEBUG=1
+DDEFS =
+
+# List all default ASM defines here, like -D_DEBUG=1
+DADEFS =
+
+# List all default directories to look for include files here
+DINCDIR =
+
+# List the default directory to look for the libraries here
+DLIBDIR =
+
+# List all default libraries here
+DLIBS =
+
+#
+# End of default section
+##############################################################################
+
+##############################################################################
+# Start of user section
+#
+
+# List all user C define here, like -D_DEBUG=1
+UDEFS =
+
+# Define ASM defines here
+UADEFS =
+
+# List all user directories here
+UINCDIR =
+
+# List the user directory to look for the libraries here
+ULIBDIR =
+
+# List all user libraries here
+ULIBS =
+
+#
+# End of user defines
+##############################################################################
+
+ifeq ($(USE_FWLIB),yes)
+ include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
+ CSRC += $(STM32SRC)
+ INCDIR += $(STM32INC)
+ USE_OPT += -DUSE_STDPERIPH_DRIVER
+endif
+
+include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
diff --git a/testhal/STM32/UART/chconf.h b/testhal/STM32F1xx/UART/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/UART/chconf.h
+++ b/testhal/STM32F1xx/UART/chconf.h
diff --git a/testhal/STM32/UART/halconf.h b/testhal/STM32F1xx/UART/halconf.h
index d353272b7..d353272b7 100644
--- a/testhal/STM32/UART/halconf.h
+++ b/testhal/STM32F1xx/UART/halconf.h
diff --git a/testhal/STM32/UART/main.c b/testhal/STM32F1xx/UART/main.c
index 924338a77..924338a77 100644
--- a/testhal/STM32/UART/main.c
+++ b/testhal/STM32F1xx/UART/main.c
diff --git a/testhal/STM32/UART/mcuconf.h b/testhal/STM32F1xx/UART/mcuconf.h
index 558c0773d..558c0773d 100644
--- a/testhal/STM32/UART/mcuconf.h
+++ b/testhal/STM32F1xx/UART/mcuconf.h
diff --git a/testhal/STM32/UART/readme.txt b/testhal/STM32F1xx/UART/readme.txt
index fc111a298..fc111a298 100644
--- a/testhal/STM32/UART/readme.txt
+++ b/testhal/STM32F1xx/UART/readme.txt
diff --git a/testhal/STM32/USB_CDC/Makefile b/testhal/STM32F1xx/USB_CDC/Makefile
index 8ebd984fb..45218c328 100644
--- a/testhal/STM32/USB_CDC/Makefile
+++ b/testhal/STM32F1xx/USB_CDC/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -74,7 +74,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/shell.c \
$(CHIBIOS)/os/various/chprintf.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/USB_CDC/chconf.h b/testhal/STM32F1xx/USB_CDC/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/USB_CDC/chconf.h
+++ b/testhal/STM32F1xx/USB_CDC/chconf.h
diff --git a/testhal/STM32/USB_CDC/halconf.h b/testhal/STM32F1xx/USB_CDC/halconf.h
index 3895ff70a..3895ff70a 100644
--- a/testhal/STM32/USB_CDC/halconf.h
+++ b/testhal/STM32F1xx/USB_CDC/halconf.h
diff --git a/testhal/STM32/USB_CDC/main.c b/testhal/STM32F1xx/USB_CDC/main.c
index a0a965bba..a0a965bba 100644
--- a/testhal/STM32/USB_CDC/main.c
+++ b/testhal/STM32F1xx/USB_CDC/main.c
diff --git a/testhal/STM32/USB_CDC/mcuconf.h b/testhal/STM32F1xx/USB_CDC/mcuconf.h
index 558c0773d..558c0773d 100644
--- a/testhal/STM32/USB_CDC/mcuconf.h
+++ b/testhal/STM32F1xx/USB_CDC/mcuconf.h
diff --git a/testhal/STM32/USB_MSC/Makefile b/testhal/STM32F1xx/USB_MSC/Makefile
index b98b34374..651b7b346 100644
--- a/testhal/STM32/USB_MSC/Makefile
+++ b/testhal/STM32F1xx/USB_MSC/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -75,7 +75,7 @@ CSRC = $(PORTSRC) \
$(CHIBIOS)/os/various/usb_msc.c \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/USB_MSC/chconf.h b/testhal/STM32F1xx/USB_MSC/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/USB_MSC/chconf.h
+++ b/testhal/STM32F1xx/USB_MSC/chconf.h
diff --git a/testhal/STM32/USB_MSC/halconf.h b/testhal/STM32F1xx/USB_MSC/halconf.h
index 2302e0179..2302e0179 100644
--- a/testhal/STM32/USB_MSC/halconf.h
+++ b/testhal/STM32F1xx/USB_MSC/halconf.h
diff --git a/testhal/STM32/USB_MSC/main.c b/testhal/STM32F1xx/USB_MSC/main.c
index 1bdda7a7d..1bdda7a7d 100644
--- a/testhal/STM32/USB_MSC/main.c
+++ b/testhal/STM32F1xx/USB_MSC/main.c
diff --git a/testhal/STM32/USB_MSC/mcuconf.h b/testhal/STM32F1xx/USB_MSC/mcuconf.h
index 558c0773d..558c0773d 100644
--- a/testhal/STM32/USB_MSC/mcuconf.h
+++ b/testhal/STM32F1xx/USB_MSC/mcuconf.h
diff --git a/todo.txt b/todo.txt
index 3db744655..2275caffa 100644
--- a/todo.txt
+++ b/todo.txt
@@ -8,12 +8,14 @@ N = Decided against.
Current Pipeline (2.3.x):
* lwIP 1.4.0 integration and test.
* Named threads.
+* Improved stack overflow checking, support main() thread.
+ * Move main stack to low memory in ARMCMx ports.
+ - Add guard pages support.
X Eclipse plugin.
X STM32L support.
X STM32L-Discovery demo and article.
-- Improved stack overflow checking, support main() thread, add guard pages
- support.
X File System infrastructure.
+X STM32F2xx support.
- Test suite overhaul, the API should be more generic in order to be used
with different subsystems and not just the kernel.
- STM32 USB support for double buffering.