From 0752e9d7e973161c32e4b667c7a8d06c68b0a9eb Mon Sep 17 00:00:00 2001 From: barthess Date: Tue, 9 Aug 2011 10:07:11 +0000 Subject: [PATCH] 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 --- boards/ST_STM3220G_EVAL/board.c | 58 +++++ boards/ST_STM3220G_EVAL/board.h | 245 ++++++++++++++++++ boards/ST_STM3220G_EVAL/board.mk | 5 + boards/ST_STM32L_DISCOVERY/board.c | 12 +- boards/ST_STM32L_DISCOVERY/board.h | 28 ++ demos/ARM7-AT91SAM7S-FATFS-GCC/Makefile | 16 +- demos/ARM7-AT91SAM7S-FATFS-GCC/ch.ld | 111 -------- demos/ARM7-AT91SAM7S-GCC/Makefile | 16 +- demos/ARM7-AT91SAM7S-GCC/ch.ld | 99 ------- demos/ARM7-AT91SAM7X-FATFS-GCC/Makefile | 16 +- demos/ARM7-AT91SAM7X-FATFS-GCC/ch.ld | 111 -------- demos/ARM7-AT91SAM7X-GCC/Makefile | 16 +- demos/ARM7-AT91SAM7X-GCC/ch.ld | 104 -------- demos/ARM7-AT91SAM7X-LWIP-GCC/Makefile | 14 +- demos/ARM7-AT91SAM7X-LWIP-GCC/ch.ld | 104 -------- demos/ARM7-AT91SAM7X-UIP-GCC/Makefile | 18 +- demos/ARM7-AT91SAM7X-UIP-GCC/ch.ld | 104 -------- demos/ARM7-LPC214x-FATFS-GCC/Makefile | 16 +- demos/ARM7-LPC214x-FATFS-GCC/ch.ld | 107 -------- demos/ARM7-LPC214x-FATFS-GCC/main.c | 4 +- demos/ARM7-LPC214x-G++/Makefile | 16 +- demos/ARM7-LPC214x-G++/ch.ld | 107 -------- demos/ARM7-LPC214x-GCC/Makefile | 16 +- demos/ARM7-LPC214x-GCC/ch.ld | 107 -------- demos/ARMCM0-LPC1114-LPCXPRESSO/Makefile | 8 +- demos/ARMCM0-LPC1114-LPCXPRESSO/ch.ld | 130 ---------- demos/ARMCM3-LPC1343-LPCXPRESSO/Makefile | 8 +- demos/ARMCM3-LPC1343-LPCXPRESSO/ch.ld | 130 ---------- demos/ARMCM3-STM32F100-DISCOVERY/Makefile | 12 +- demos/ARMCM3-STM32F100-DISCOVERY/ch.ld | 130 ---------- demos/ARMCM3-STM32F103-FATFS/Makefile | 12 +- demos/ARMCM3-STM32F103-FATFS/ch.ld | 130 ---------- demos/ARMCM3-STM32F103-G++/Makefile | 12 +- demos/ARMCM3-STM32F103-G++/ch.ld | 130 ---------- demos/ARMCM3-STM32F103/Makefile | 12 +- demos/ARMCM3-STM32F103/ch.ld | 130 ---------- demos/ARMCM3-STM32F103ZG-FATFS/Makefile | 14 +- demos/ARMCM3-STM32F103ZG-FATFS/ch.ld | 130 ---------- demos/ARMCM3-STM32F107/Makefile | 14 +- demos/ARMCM3-STM32F107/ch.ld | 130 ---------- demos/ARMCM3-STM32L152-DISCOVERY/Makefile | 10 +- demos/ARMCM3-STM32L152-DISCOVERY/ch.ld | 130 ---------- demos/ARMCM3-STM32L152-DISCOVERY/halconf.h | 4 +- docs/Doxyfile_chm | 13 +- docs/Doxyfile_html | 13 +- docs/rsc/header_chm.html | 2 +- docs/rsc/header_html.html | 2 +- readme.txt | 42 ++- testhal/LPC11xx/IRQ_STORM/Makefile | 10 +- testhal/LPC11xx/IRQ_STORM/ch.ld | 130 ---------- testhal/LPC13xx/IRQ_STORM/Makefile | 10 +- testhal/LPC13xx/IRQ_STORM/ch.ld | 130 ---------- testhal/STM32/ADC/ch.ld | 130 ---------- testhal/STM32/CAN/ch.ld | 130 ---------- testhal/STM32/GPT/ch.ld | 130 ---------- testhal/STM32/GPT/openocd.bat | 3 - testhal/STM32/GPT/openocd.cfg | 13 - testhal/STM32/I2C/ch.ld | 130 ---------- testhal/STM32/IRQ_STORM/ch.ld | 130 ---------- testhal/STM32/PWM-ICU/Makefile | 204 --------------- testhal/STM32/PWM-ICU/ch.ld | 130 ---------- testhal/STM32/SDIO/ch.ld | 130 ---------- testhal/STM32/SPI/Makefile | 204 --------------- testhal/STM32/SPI/ch.ld | 130 ---------- testhal/STM32/UART/Makefile | 204 --------------- testhal/STM32/UART/ch.ld | 130 ---------- testhal/STM32/USB_CDC/ch.ld | 130 ---------- testhal/STM32/USB_MSC/ch.ld | 130 ---------- testhal/{STM32/CAN => STM32F1xx/ADC}/Makefile | 14 +- testhal/{STM32 => STM32F1xx}/ADC/chconf.h | 0 testhal/{STM32 => STM32F1xx}/ADC/halconf.h | 0 testhal/{STM32 => STM32F1xx}/ADC/main.c | 0 testhal/{STM32 => STM32F1xx}/ADC/mcuconf.h | 0 testhal/{STM32 => STM32F1xx}/ADC/readme.txt | 0 testhal/{STM32/GPT => STM32F1xx/CAN}/Makefile | 14 +- testhal/{STM32 => STM32F1xx}/CAN/chconf.h | 0 testhal/{STM32 => STM32F1xx}/CAN/halconf.h | 0 testhal/{STM32 => STM32F1xx}/CAN/main.c | 0 testhal/{STM32 => STM32F1xx}/CAN/mcuconf.h | 0 testhal/{STM32 => STM32F1xx}/CAN/readme.txt | 0 .../IRQ_STORM => STM32F1xx/GPT}/Makefile | 14 +- testhal/{STM32 => STM32F1xx}/GPT/chconf.h | 0 testhal/{STM32 => STM32F1xx}/GPT/halconf.h | 0 testhal/{STM32 => STM32F1xx}/GPT/main.c | 0 testhal/{STM32 => STM32F1xx}/GPT/mcuconf.h | 0 testhal/{STM32 => STM32F1xx}/GPT/readme.txt | 0 testhal/{STM32 => STM32F1xx}/GPT/run | 0 testhal/{STM32 => STM32F1xx}/I2C/Makefile | 0 testhal/{STM32 => STM32F1xx}/I2C/chconf.h | 0 testhal/{STM32 => STM32F1xx}/I2C/halconf.h | 0 testhal/{STM32 => STM32F1xx}/I2C/i2c_pns.c | 0 testhal/{STM32 => STM32F1xx}/I2C/i2c_pns.h | 0 testhal/{STM32 => STM32F1xx}/I2C/lis3.c | 0 testhal/{STM32 => STM32F1xx}/I2C/lis3.h | 0 testhal/{STM32 => STM32F1xx}/I2C/main.c | 0 testhal/{STM32 => STM32F1xx}/I2C/main.h | 0 testhal/{STM32 => STM32F1xx}/I2C/max1236.c | 0 testhal/{STM32 => STM32F1xx}/I2C/max1236.h | 0 testhal/{STM32 => STM32F1xx}/I2C/mcuconf.h | 0 testhal/{STM32 => STM32F1xx}/I2C/tmp75.c | 0 testhal/{STM32 => STM32F1xx}/I2C/tmp75.h | 0 testhal/STM32F1xx/IRQ_STORM/Makefile | 204 +++++++++++++++ .../{STM32 => STM32F1xx}/IRQ_STORM/chconf.h | 0 .../{STM32 => STM32F1xx}/IRQ_STORM/halconf.h | 0 testhal/{STM32 => STM32F1xx}/IRQ_STORM/main.c | 0 .../{STM32 => STM32F1xx}/IRQ_STORM/mcuconf.h | 0 .../{STM32 => STM32F1xx}/IRQ_STORM/readme.txt | 0 .../{STM32/ADC => STM32F1xx/PWM-ICU}/Makefile | 11 +- testhal/{STM32 => STM32F1xx}/PWM-ICU/chconf.h | 0 .../{STM32 => STM32F1xx}/PWM-ICU/halconf.h | 0 testhal/{STM32 => STM32F1xx}/PWM-ICU/main.c | 0 .../{STM32 => STM32F1xx}/PWM-ICU/mcuconf.h | 0 .../{STM32 => STM32F1xx}/PWM-ICU/readme.txt | 0 testhal/{STM32 => STM32F1xx}/SDIO/Makefile | 11 +- testhal/{STM32 => STM32F1xx}/SDIO/chconf.h | 0 testhal/{STM32 => STM32F1xx}/SDIO/halconf.h | 0 testhal/{STM32 => STM32F1xx}/SDIO/main.c | 0 testhal/{STM32 => STM32F1xx}/SDIO/mcuconf.h | 0 testhal/{STM32 => STM32F1xx}/SDIO/readme.txt | 0 testhal/STM32F1xx/SPI/Makefile | 204 +++++++++++++++ testhal/{STM32 => STM32F1xx}/SPI/chconf.h | 0 testhal/{STM32 => STM32F1xx}/SPI/halconf.h | 0 testhal/{STM32 => STM32F1xx}/SPI/main.c | 0 testhal/{STM32 => STM32F1xx}/SPI/mcuconf.h | 0 testhal/{STM32 => STM32F1xx}/SPI/readme.txt | 0 testhal/STM32F1xx/UART/Makefile | 204 +++++++++++++++ testhal/{STM32 => STM32F1xx}/UART/chconf.h | 0 testhal/{STM32 => STM32F1xx}/UART/halconf.h | 0 testhal/{STM32 => STM32F1xx}/UART/main.c | 0 testhal/{STM32 => STM32F1xx}/UART/mcuconf.h | 0 testhal/{STM32 => STM32F1xx}/UART/readme.txt | 0 testhal/{STM32 => STM32F1xx}/USB_CDC/Makefile | 14 +- testhal/{STM32 => STM32F1xx}/USB_CDC/chconf.h | 0 .../{STM32 => STM32F1xx}/USB_CDC/halconf.h | 0 testhal/{STM32 => STM32F1xx}/USB_CDC/main.c | 0 .../{STM32 => STM32F1xx}/USB_CDC/mcuconf.h | 0 testhal/{STM32 => STM32F1xx}/USB_MSC/Makefile | 14 +- testhal/{STM32 => STM32F1xx}/USB_MSC/chconf.h | 0 .../{STM32 => STM32F1xx}/USB_MSC/halconf.h | 0 testhal/{STM32 => STM32F1xx}/USB_MSC/main.c | 0 .../{STM32 => STM32F1xx}/USB_MSC/mcuconf.h | 0 todo.txt | 6 +- 142 files changed, 1186 insertions(+), 4660 deletions(-) create mode 100644 boards/ST_STM3220G_EVAL/board.c create mode 100644 boards/ST_STM3220G_EVAL/board.h create mode 100644 boards/ST_STM3220G_EVAL/board.mk delete mode 100644 demos/ARM7-AT91SAM7S-FATFS-GCC/ch.ld delete mode 100644 demos/ARM7-AT91SAM7S-GCC/ch.ld delete mode 100644 demos/ARM7-AT91SAM7X-FATFS-GCC/ch.ld delete mode 100644 demos/ARM7-AT91SAM7X-GCC/ch.ld delete mode 100644 demos/ARM7-AT91SAM7X-LWIP-GCC/ch.ld delete mode 100644 demos/ARM7-AT91SAM7X-UIP-GCC/ch.ld delete mode 100644 demos/ARM7-LPC214x-FATFS-GCC/ch.ld delete mode 100644 demos/ARM7-LPC214x-G++/ch.ld delete mode 100644 demos/ARM7-LPC214x-GCC/ch.ld delete mode 100644 demos/ARMCM0-LPC1114-LPCXPRESSO/ch.ld delete mode 100644 demos/ARMCM3-LPC1343-LPCXPRESSO/ch.ld delete mode 100644 demos/ARMCM3-STM32F100-DISCOVERY/ch.ld delete mode 100644 demos/ARMCM3-STM32F103-FATFS/ch.ld delete mode 100644 demos/ARMCM3-STM32F103-G++/ch.ld delete mode 100644 demos/ARMCM3-STM32F103/ch.ld delete mode 100644 demos/ARMCM3-STM32F103ZG-FATFS/ch.ld delete mode 100644 demos/ARMCM3-STM32F107/ch.ld delete mode 100644 demos/ARMCM3-STM32L152-DISCOVERY/ch.ld delete mode 100644 testhal/LPC11xx/IRQ_STORM/ch.ld delete mode 100644 testhal/LPC13xx/IRQ_STORM/ch.ld delete mode 100644 testhal/STM32/ADC/ch.ld delete mode 100644 testhal/STM32/CAN/ch.ld delete mode 100644 testhal/STM32/GPT/ch.ld delete mode 100644 testhal/STM32/GPT/openocd.bat delete mode 100644 testhal/STM32/GPT/openocd.cfg delete mode 100644 testhal/STM32/I2C/ch.ld delete mode 100644 testhal/STM32/IRQ_STORM/ch.ld delete mode 100644 testhal/STM32/PWM-ICU/Makefile delete mode 100644 testhal/STM32/PWM-ICU/ch.ld delete mode 100644 testhal/STM32/SDIO/ch.ld delete mode 100644 testhal/STM32/SPI/Makefile delete mode 100644 testhal/STM32/SPI/ch.ld delete mode 100644 testhal/STM32/UART/Makefile delete mode 100644 testhal/STM32/UART/ch.ld delete mode 100644 testhal/STM32/USB_CDC/ch.ld delete mode 100644 testhal/STM32/USB_MSC/ch.ld rename testhal/{STM32/CAN => STM32F1xx/ADC}/Makefile (93%) rename testhal/{STM32 => STM32F1xx}/ADC/chconf.h (100%) rename testhal/{STM32 => STM32F1xx}/ADC/halconf.h (100%) rename testhal/{STM32 => STM32F1xx}/ADC/main.c (100%) rename testhal/{STM32 => STM32F1xx}/ADC/mcuconf.h (100%) rename testhal/{STM32 => STM32F1xx}/ADC/readme.txt (100%) rename testhal/{STM32/GPT => STM32F1xx/CAN}/Makefile (93%) rename testhal/{STM32 => STM32F1xx}/CAN/chconf.h (100%) rename testhal/{STM32 => STM32F1xx}/CAN/halconf.h (100%) rename testhal/{STM32 => STM32F1xx}/CAN/main.c (100%) rename testhal/{STM32 => STM32F1xx}/CAN/mcuconf.h (100%) rename testhal/{STM32 => STM32F1xx}/CAN/readme.txt (100%) rename testhal/{STM32/IRQ_STORM => STM32F1xx/GPT}/Makefile (93%) rename testhal/{STM32 => STM32F1xx}/GPT/chconf.h (100%) rename testhal/{STM32 => STM32F1xx}/GPT/halconf.h (100%) rename testhal/{STM32 => STM32F1xx}/GPT/main.c (100%) rename testhal/{STM32 => STM32F1xx}/GPT/mcuconf.h (100%) rename testhal/{STM32 => STM32F1xx}/GPT/readme.txt (100%) rename testhal/{STM32 => STM32F1xx}/GPT/run (100%) rename testhal/{STM32 => STM32F1xx}/I2C/Makefile (100%) rename testhal/{STM32 => STM32F1xx}/I2C/chconf.h (100%) rename testhal/{STM32 => STM32F1xx}/I2C/halconf.h (100%) rename testhal/{STM32 => STM32F1xx}/I2C/i2c_pns.c (100%) rename testhal/{STM32 => STM32F1xx}/I2C/i2c_pns.h (100%) rename testhal/{STM32 => STM32F1xx}/I2C/lis3.c (100%) rename testhal/{STM32 => STM32F1xx}/I2C/lis3.h (100%) rename testhal/{STM32 => STM32F1xx}/I2C/main.c (100%) rename testhal/{STM32 => STM32F1xx}/I2C/main.h (100%) rename testhal/{STM32 => STM32F1xx}/I2C/max1236.c (100%) rename testhal/{STM32 => STM32F1xx}/I2C/max1236.h (100%) rename testhal/{STM32 => STM32F1xx}/I2C/mcuconf.h (100%) rename testhal/{STM32 => STM32F1xx}/I2C/tmp75.c (100%) rename testhal/{STM32 => STM32F1xx}/I2C/tmp75.h (100%) create mode 100644 testhal/STM32F1xx/IRQ_STORM/Makefile rename testhal/{STM32 => STM32F1xx}/IRQ_STORM/chconf.h (100%) rename testhal/{STM32 => STM32F1xx}/IRQ_STORM/halconf.h (100%) rename testhal/{STM32 => STM32F1xx}/IRQ_STORM/main.c (100%) rename testhal/{STM32 => STM32F1xx}/IRQ_STORM/mcuconf.h (100%) rename testhal/{STM32 => STM32F1xx}/IRQ_STORM/readme.txt (100%) rename testhal/{STM32/ADC => STM32F1xx/PWM-ICU}/Makefile (93%) rename testhal/{STM32 => STM32F1xx}/PWM-ICU/chconf.h (100%) rename testhal/{STM32 => STM32F1xx}/PWM-ICU/halconf.h (100%) rename testhal/{STM32 => STM32F1xx}/PWM-ICU/main.c (100%) rename testhal/{STM32 => STM32F1xx}/PWM-ICU/mcuconf.h (100%) rename testhal/{STM32 => STM32F1xx}/PWM-ICU/readme.txt (100%) rename testhal/{STM32 => STM32F1xx}/SDIO/Makefile (92%) rename testhal/{STM32 => STM32F1xx}/SDIO/chconf.h (100%) rename testhal/{STM32 => STM32F1xx}/SDIO/halconf.h (100%) rename testhal/{STM32 => STM32F1xx}/SDIO/main.c (100%) rename testhal/{STM32 => STM32F1xx}/SDIO/mcuconf.h (100%) rename testhal/{STM32 => STM32F1xx}/SDIO/readme.txt (100%) create mode 100644 testhal/STM32F1xx/SPI/Makefile rename testhal/{STM32 => STM32F1xx}/SPI/chconf.h (100%) rename testhal/{STM32 => STM32F1xx}/SPI/halconf.h (100%) rename testhal/{STM32 => STM32F1xx}/SPI/main.c (100%) rename testhal/{STM32 => STM32F1xx}/SPI/mcuconf.h (100%) rename testhal/{STM32 => STM32F1xx}/SPI/readme.txt (100%) create mode 100644 testhal/STM32F1xx/UART/Makefile rename testhal/{STM32 => STM32F1xx}/UART/chconf.h (100%) rename testhal/{STM32 => STM32F1xx}/UART/halconf.h (100%) rename testhal/{STM32 => STM32F1xx}/UART/main.c (100%) rename testhal/{STM32 => STM32F1xx}/UART/mcuconf.h (100%) rename testhal/{STM32 => STM32F1xx}/UART/readme.txt (100%) rename testhal/{STM32 => STM32F1xx}/USB_CDC/Makefile (93%) rename testhal/{STM32 => STM32F1xx}/USB_CDC/chconf.h (100%) rename testhal/{STM32 => STM32F1xx}/USB_CDC/halconf.h (100%) rename testhal/{STM32 => STM32F1xx}/USB_CDC/main.c (100%) rename testhal/{STM32 => STM32F1xx}/USB_CDC/mcuconf.h (100%) rename testhal/{STM32 => STM32F1xx}/USB_MSC/Makefile (93%) rename testhal/{STM32 => STM32F1xx}/USB_MSC/chconf.h (100%) rename testhal/{STM32 => STM32F1xx}/USB_MSC/halconf.h (100%) rename testhal/{STM32 => STM32F1xx}/USB_MSC/main.c (100%) rename testhal/{STM32 => STM32F1xx}/USB_MSC/mcuconf.h (100%) 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 . +*/ + +#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 . +*/ + +#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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 . -*/ - -/* - * 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 @@ -
ChibiOS/RT 2.3.1
+
ChibiOS/RT 2.3.3
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); -
ChibiOS/RT
2.3.1
+
ChibiOS/RT
2.3.3