aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-08-09 10:07:11 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-08-09 10:07:11 +0000
commit0752e9d7e973161c32e4b667c7a8d06c68b0a9eb (patch)
treeffef0d84a300ba2e30aac20b3e89393d0d5e7bb1 /testhal
parent45b489851878769402af4a353fa2b759c815be39 (diff)
downloadChibiOS-0752e9d7e973161c32e4b667c7a8d06c68b0a9eb.tar.gz
ChibiOS-0752e9d7e973161c32e4b667c7a8d06c68b0a9eb.tar.bz2
ChibiOS-0752e9d7e973161c32e4b667c7a8d06c68b0a9eb.zip
I2C. Syncing with trunk (step 1)
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3214 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal')
-rw-r--r--testhal/LPC11xx/IRQ_STORM/Makefile10
-rw-r--r--testhal/LPC11xx/IRQ_STORM/ch.ld130
-rw-r--r--testhal/LPC13xx/IRQ_STORM/Makefile10
-rw-r--r--testhal/LPC13xx/IRQ_STORM/ch.ld130
-rw-r--r--testhal/STM32/ADC/ch.ld130
-rw-r--r--testhal/STM32/CAN/ch.ld130
-rw-r--r--testhal/STM32/GPT/ch.ld130
-rw-r--r--testhal/STM32/GPT/openocd.bat3
-rw-r--r--testhal/STM32/GPT/openocd.cfg13
-rw-r--r--testhal/STM32/I2C/ch.ld130
-rw-r--r--testhal/STM32/IRQ_STORM/ch.ld130
-rw-r--r--testhal/STM32/PWM-ICU/Makefile204
-rw-r--r--testhal/STM32/PWM-ICU/ch.ld130
-rw-r--r--testhal/STM32/SDIO/ch.ld130
-rw-r--r--testhal/STM32/SPI/Makefile204
-rw-r--r--testhal/STM32/SPI/ch.ld130
-rw-r--r--testhal/STM32/UART/Makefile204
-rw-r--r--testhal/STM32/UART/ch.ld130
-rw-r--r--testhal/STM32/USB_CDC/ch.ld130
-rw-r--r--testhal/STM32/USB_MSC/ch.ld130
-rw-r--r--testhal/STM32F1xx/ADC/Makefile (renamed from testhal/STM32/GPT/Makefile)14
-rw-r--r--testhal/STM32F1xx/ADC/chconf.h (renamed from testhal/STM32/ADC/chconf.h)0
-rw-r--r--testhal/STM32F1xx/ADC/halconf.h (renamed from testhal/STM32/ADC/halconf.h)0
-rw-r--r--testhal/STM32F1xx/ADC/main.c (renamed from testhal/STM32/ADC/main.c)0
-rw-r--r--testhal/STM32F1xx/ADC/mcuconf.h (renamed from testhal/STM32/ADC/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/ADC/readme.txt (renamed from testhal/STM32/ADC/readme.txt)0
-rw-r--r--testhal/STM32F1xx/CAN/Makefile (renamed from testhal/STM32/ADC/Makefile)14
-rw-r--r--testhal/STM32F1xx/CAN/chconf.h (renamed from testhal/STM32/CAN/chconf.h)0
-rw-r--r--testhal/STM32F1xx/CAN/halconf.h (renamed from testhal/STM32/CAN/halconf.h)0
-rw-r--r--testhal/STM32F1xx/CAN/main.c (renamed from testhal/STM32/CAN/main.c)0
-rw-r--r--testhal/STM32F1xx/CAN/mcuconf.h (renamed from testhal/STM32/CAN/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/CAN/readme.txt (renamed from testhal/STM32/CAN/readme.txt)0
-rw-r--r--testhal/STM32F1xx/GPT/Makefile (renamed from testhal/STM32/IRQ_STORM/Makefile)14
-rw-r--r--testhal/STM32F1xx/GPT/chconf.h (renamed from testhal/STM32/GPT/chconf.h)0
-rw-r--r--testhal/STM32F1xx/GPT/halconf.h (renamed from testhal/STM32/GPT/halconf.h)0
-rw-r--r--testhal/STM32F1xx/GPT/main.c (renamed from testhal/STM32/GPT/main.c)0
-rw-r--r--testhal/STM32F1xx/GPT/mcuconf.h (renamed from testhal/STM32/GPT/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/GPT/readme.txt (renamed from testhal/STM32/GPT/readme.txt)0
-rw-r--r--testhal/STM32F1xx/GPT/run (renamed from testhal/STM32/GPT/run)0
-rw-r--r--testhal/STM32F1xx/I2C/Makefile (renamed from testhal/STM32/I2C/Makefile)0
-rw-r--r--testhal/STM32F1xx/I2C/chconf.h (renamed from testhal/STM32/I2C/chconf.h)0
-rw-r--r--testhal/STM32F1xx/I2C/halconf.h (renamed from testhal/STM32/I2C/halconf.h)0
-rw-r--r--testhal/STM32F1xx/I2C/i2c_pns.c (renamed from testhal/STM32/I2C/i2c_pns.c)0
-rw-r--r--testhal/STM32F1xx/I2C/i2c_pns.h (renamed from testhal/STM32/I2C/i2c_pns.h)0
-rw-r--r--testhal/STM32F1xx/I2C/lis3.c (renamed from testhal/STM32/I2C/lis3.c)0
-rw-r--r--testhal/STM32F1xx/I2C/lis3.h (renamed from testhal/STM32/I2C/lis3.h)0
-rw-r--r--testhal/STM32F1xx/I2C/main.c (renamed from testhal/STM32/I2C/main.c)0
-rw-r--r--testhal/STM32F1xx/I2C/main.h (renamed from testhal/STM32/I2C/main.h)0
-rw-r--r--testhal/STM32F1xx/I2C/max1236.c (renamed from testhal/STM32/I2C/max1236.c)0
-rw-r--r--testhal/STM32F1xx/I2C/max1236.h (renamed from testhal/STM32/I2C/max1236.h)0
-rw-r--r--testhal/STM32F1xx/I2C/mcuconf.h (renamed from testhal/STM32/I2C/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/I2C/tmp75.c (renamed from testhal/STM32/I2C/tmp75.c)0
-rw-r--r--testhal/STM32F1xx/I2C/tmp75.h (renamed from testhal/STM32/I2C/tmp75.h)0
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/Makefile204
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/chconf.h (renamed from testhal/STM32/IRQ_STORM/chconf.h)0
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/halconf.h (renamed from testhal/STM32/IRQ_STORM/halconf.h)0
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/main.c (renamed from testhal/STM32/IRQ_STORM/main.c)0
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/mcuconf.h (renamed from testhal/STM32/IRQ_STORM/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/IRQ_STORM/readme.txt (renamed from testhal/STM32/IRQ_STORM/readme.txt)0
-rw-r--r--testhal/STM32F1xx/PWM-ICU/Makefile (renamed from testhal/STM32/CAN/Makefile)11
-rw-r--r--testhal/STM32F1xx/PWM-ICU/chconf.h (renamed from testhal/STM32/PWM-ICU/chconf.h)0
-rw-r--r--testhal/STM32F1xx/PWM-ICU/halconf.h (renamed from testhal/STM32/PWM-ICU/halconf.h)0
-rw-r--r--testhal/STM32F1xx/PWM-ICU/main.c (renamed from testhal/STM32/PWM-ICU/main.c)0
-rw-r--r--testhal/STM32F1xx/PWM-ICU/mcuconf.h (renamed from testhal/STM32/PWM-ICU/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/PWM-ICU/readme.txt (renamed from testhal/STM32/PWM-ICU/readme.txt)0
-rw-r--r--testhal/STM32F1xx/SDIO/Makefile (renamed from testhal/STM32/SDIO/Makefile)11
-rw-r--r--testhal/STM32F1xx/SDIO/chconf.h (renamed from testhal/STM32/SDIO/chconf.h)0
-rw-r--r--testhal/STM32F1xx/SDIO/halconf.h (renamed from testhal/STM32/SDIO/halconf.h)0
-rw-r--r--testhal/STM32F1xx/SDIO/main.c (renamed from testhal/STM32/SDIO/main.c)0
-rw-r--r--testhal/STM32F1xx/SDIO/mcuconf.h (renamed from testhal/STM32/SDIO/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/SDIO/readme.txt (renamed from testhal/STM32/SDIO/readme.txt)0
-rw-r--r--testhal/STM32F1xx/SPI/Makefile204
-rw-r--r--testhal/STM32F1xx/SPI/chconf.h (renamed from testhal/STM32/SPI/chconf.h)0
-rw-r--r--testhal/STM32F1xx/SPI/halconf.h (renamed from testhal/STM32/SPI/halconf.h)0
-rw-r--r--testhal/STM32F1xx/SPI/main.c (renamed from testhal/STM32/SPI/main.c)0
-rw-r--r--testhal/STM32F1xx/SPI/mcuconf.h (renamed from testhal/STM32/SPI/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/SPI/readme.txt (renamed from testhal/STM32/SPI/readme.txt)0
-rw-r--r--testhal/STM32F1xx/UART/Makefile204
-rw-r--r--testhal/STM32F1xx/UART/chconf.h (renamed from testhal/STM32/UART/chconf.h)0
-rw-r--r--testhal/STM32F1xx/UART/halconf.h (renamed from testhal/STM32/UART/halconf.h)0
-rw-r--r--testhal/STM32F1xx/UART/main.c (renamed from testhal/STM32/UART/main.c)0
-rw-r--r--testhal/STM32F1xx/UART/mcuconf.h (renamed from testhal/STM32/UART/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/UART/readme.txt (renamed from testhal/STM32/UART/readme.txt)0
-rw-r--r--testhal/STM32F1xx/USB_CDC/Makefile (renamed from testhal/STM32/USB_CDC/Makefile)14
-rw-r--r--testhal/STM32F1xx/USB_CDC/chconf.h (renamed from testhal/STM32/USB_CDC/chconf.h)0
-rw-r--r--testhal/STM32F1xx/USB_CDC/halconf.h (renamed from testhal/STM32/USB_CDC/halconf.h)0
-rw-r--r--testhal/STM32F1xx/USB_CDC/main.c (renamed from testhal/STM32/USB_CDC/main.c)0
-rw-r--r--testhal/STM32F1xx/USB_CDC/mcuconf.h (renamed from testhal/STM32/USB_CDC/mcuconf.h)0
-rw-r--r--testhal/STM32F1xx/USB_MSC/Makefile (renamed from testhal/STM32/USB_MSC/Makefile)14
-rw-r--r--testhal/STM32F1xx/USB_MSC/chconf.h (renamed from testhal/STM32/USB_MSC/chconf.h)0
-rw-r--r--testhal/STM32F1xx/USB_MSC/halconf.h (renamed from testhal/STM32/USB_MSC/halconf.h)0
-rw-r--r--testhal/STM32F1xx/USB_MSC/main.c (renamed from testhal/STM32/USB_MSC/main.c)0
-rw-r--r--testhal/STM32F1xx/USB_MSC/mcuconf.h (renamed from testhal/STM32/USB_MSC/mcuconf.h)0
93 files changed, 668 insertions, 2374 deletions
diff --git a/testhal/LPC11xx/IRQ_STORM/Makefile b/testhal/LPC11xx/IRQ_STORM/Makefile
index 2f65b9fe4..d5c1b4cbd 100644
--- a/testhal/LPC11xx/IRQ_STORM/Makefile
+++ b/testhal/LPC11xx/IRQ_STORM/Makefile
@@ -47,10 +47,7 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/EA_LPCXPRESSO_BB_1114/board.mk
include $(CHIBIOS)/os/hal/platforms/LPC11xx/platform.mk
@@ -59,6 +56,9 @@ include $(CHIBIOS)/os/ports/GCC/ARMCMx/LPC11xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/LPC1114.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -69,7 +69,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/LPC11xx/IRQ_STORM/ch.ld b/testhal/LPC11xx/IRQ_STORM/ch.ld
deleted file mode 100644
index cfc5ff3b6..000000000
--- a/testhal/LPC11xx/IRQ_STORM/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * LPC1114 memory setup.
- */
-__main_stack_size__ = 0x0100;
-__process_stack_size__ = 0x0100;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x00000000, len = 32k
- ram : org = 0x10000000, len = 8k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/LPC13xx/IRQ_STORM/Makefile b/testhal/LPC13xx/IRQ_STORM/Makefile
index 6d904e8a8..cb53a7761 100644
--- a/testhal/LPC13xx/IRQ_STORM/Makefile
+++ b/testhal/LPC13xx/IRQ_STORM/Makefile
@@ -47,10 +47,7 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/EA_LPCXPRESSO_BB_1343/board.mk
include $(CHIBIOS)/os/hal/platforms/LPC13xx/platform.mk
@@ -59,6 +56,9 @@ include $(CHIBIOS)/os/ports/GCC/ARMCMx/LPC13xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/LPC1343.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -69,7 +69,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/LPC13xx/IRQ_STORM/ch.ld b/testhal/LPC13xx/IRQ_STORM/ch.ld
deleted file mode 100644
index 703f09ca4..000000000
--- a/testhal/LPC13xx/IRQ_STORM/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * LPC1343 memory setup.
- */
-__main_stack_size__ = 0x0100;
-__process_stack_size__ = 0x0100;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x00000000, len = 32k
- ram : org = 0x10000000, len = 8k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/ADC/ch.ld b/testhal/STM32/ADC/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/ADC/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/CAN/ch.ld b/testhal/STM32/CAN/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/CAN/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/GPT/ch.ld b/testhal/STM32/GPT/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/GPT/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/GPT/openocd.bat b/testhal/STM32/GPT/openocd.bat
deleted file mode 100644
index a8b306318..000000000
--- a/testhal/STM32/GPT/openocd.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@echo off
-start /MIN openocd.exe
-start telnet 127.0.0.1 4444
diff --git a/testhal/STM32/GPT/openocd.cfg b/testhal/STM32/GPT/openocd.cfg
deleted file mode 100644
index f40febe66..000000000
--- a/testhal/STM32/GPT/openocd.cfg
+++ /dev/null
@@ -1,13 +0,0 @@
-#daemon configuration
-telnet_port 4444
-gdb_port 3333
-
-# GDB can also flash my flash!
-gdb_memory_map enable
-gdb_flash_program enable
-gdb_breakpoint_override hard
-
-set WORKAREASIZE 0x5000
-
-source [find interface/olimex-arm-usb-ocd.cfg]
-source [find target/stm32.cfg]
diff --git a/testhal/STM32/I2C/ch.ld b/testhal/STM32/I2C/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/I2C/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/IRQ_STORM/ch.ld b/testhal/STM32/IRQ_STORM/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/IRQ_STORM/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/PWM-ICU/Makefile b/testhal/STM32/PWM-ICU/Makefile
deleted file mode 100644
index a5c76f1c8..000000000
--- a/testhal/STM32/PWM-ICU/Makefile
+++ /dev/null
@@ -1,204 +0,0 @@
-##############################################################################
-# Build global options
-# NOTE: Can be overridden externally.
-#
-
-# Compiler options here.
-ifeq ($(USE_OPT),)
- USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
-endif
-
-# C++ specific options here (added to USE_OPT).
-ifeq ($(USE_CPPOPT),)
- USE_CPPOPT = -fno-rtti
-endif
-
-# Enable this if you want the linker to remove unused code and data
-ifeq ($(USE_LINK_GC),)
- USE_LINK_GC = yes
-endif
-
-# If enabled, this option allows to compile the application in THUMB mode.
-ifeq ($(USE_THUMB),)
- USE_THUMB = yes
-endif
-
-# Enable register caching optimization (read documentation).
-ifeq ($(USE_CURRP_CACHING),)
- USE_CURRP_CACHING = no
-endif
-
-#
-# Build global options
-##############################################################################
-
-##############################################################################
-# Architecture or project specific options
-#
-
-# Enable this if you really want to use the STM FWLib.
-ifeq ($(USE_FWLIB),)
- USE_FWLIB = no
-endif
-
-#
-# Architecture or project specific options
-##############################################################################
-
-##############################################################################
-# Project, sources and paths
-#
-
-# Define project name here
-PROJECT = ch
-
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
-CHIBIOS = ../../..
-include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
-include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
-include $(CHIBIOS)/os/kernel/kernel.mk
-#include $(CHIBIOS)/test/test.mk
-
-# C sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CSRC = $(PORTSRC) \
- $(KERNSRC) \
- $(TESTSRC) \
- $(HALSRC) \
- $(PLATFORMSRC) \
- $(BOARDSRC) \
- $(CHIBIOS)/os/various/evtimer.c \
- $(CHIBIOS)/os/various/syscalls.c \
- main.c
-
-# C++ sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CPPSRC =
-
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
-ASMSRC = $(PORTASM)
-
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC) \
- $(CHIBIOS)/os/various
-
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
-
-MCU = cortex-m3
-
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-CP = $(TRGT)objcopy
-AS = $(TRGT)gcc -x assembler-with-cpp
-OD = $(TRGT)objdump
-HEX = $(CP) -O ihex
-BIN = $(CP) -O binary
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
-CWARN = -Wall -Wextra -Wstrict-prototypes
-
-# Define C++ warning options here
-CPPWARN = -Wall -Wextra
-
-#
-# Compiler settings
-##############################################################################
-
-##############################################################################
-# Start of default section
-#
-
-# List all default C defines here, like -D_DEBUG=1
-DDEFS =
-
-# List all default ASM defines here, like -D_DEBUG=1
-DADEFS =
-
-# List all default directories to look for include files here
-DINCDIR =
-
-# List the default directory to look for the libraries here
-DLIBDIR =
-
-# List all default libraries here
-DLIBS =
-
-#
-# End of default section
-##############################################################################
-
-##############################################################################
-# Start of user section
-#
-
-# List all user C define here, like -D_DEBUG=1
-UDEFS =
-
-# Define ASM defines here
-UADEFS =
-
-# List all user directories here
-UINCDIR =
-
-# List the user directory to look for the libraries here
-ULIBDIR =
-
-# List all user libraries here
-ULIBS =
-
-#
-# End of user defines
-##############################################################################
-
-ifeq ($(USE_FWLIB),yes)
- include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
- CSRC += $(STM32SRC)
- INCDIR += $(STM32INC)
- USE_OPT += -DUSE_STDPERIPH_DRIVER
-endif
-
-include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
diff --git a/testhal/STM32/PWM-ICU/ch.ld b/testhal/STM32/PWM-ICU/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/PWM-ICU/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/SDIO/ch.ld b/testhal/STM32/SDIO/ch.ld
deleted file mode 100644
index 363ddce9f..000000000
--- a/testhal/STM32/SDIO/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * ST32F103xG memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 1m
- ram : org = 0x20000000, len = 96k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/SPI/Makefile b/testhal/STM32/SPI/Makefile
deleted file mode 100644
index a5c76f1c8..000000000
--- a/testhal/STM32/SPI/Makefile
+++ /dev/null
@@ -1,204 +0,0 @@
-##############################################################################
-# Build global options
-# NOTE: Can be overridden externally.
-#
-
-# Compiler options here.
-ifeq ($(USE_OPT),)
- USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
-endif
-
-# C++ specific options here (added to USE_OPT).
-ifeq ($(USE_CPPOPT),)
- USE_CPPOPT = -fno-rtti
-endif
-
-# Enable this if you want the linker to remove unused code and data
-ifeq ($(USE_LINK_GC),)
- USE_LINK_GC = yes
-endif
-
-# If enabled, this option allows to compile the application in THUMB mode.
-ifeq ($(USE_THUMB),)
- USE_THUMB = yes
-endif
-
-# Enable register caching optimization (read documentation).
-ifeq ($(USE_CURRP_CACHING),)
- USE_CURRP_CACHING = no
-endif
-
-#
-# Build global options
-##############################################################################
-
-##############################################################################
-# Architecture or project specific options
-#
-
-# Enable this if you really want to use the STM FWLib.
-ifeq ($(USE_FWLIB),)
- USE_FWLIB = no
-endif
-
-#
-# Architecture or project specific options
-##############################################################################
-
-##############################################################################
-# Project, sources and paths
-#
-
-# Define project name here
-PROJECT = ch
-
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
-CHIBIOS = ../../..
-include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
-include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
-include $(CHIBIOS)/os/kernel/kernel.mk
-#include $(CHIBIOS)/test/test.mk
-
-# C sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CSRC = $(PORTSRC) \
- $(KERNSRC) \
- $(TESTSRC) \
- $(HALSRC) \
- $(PLATFORMSRC) \
- $(BOARDSRC) \
- $(CHIBIOS)/os/various/evtimer.c \
- $(CHIBIOS)/os/various/syscalls.c \
- main.c
-
-# C++ sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CPPSRC =
-
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
-ASMSRC = $(PORTASM)
-
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC) \
- $(CHIBIOS)/os/various
-
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
-
-MCU = cortex-m3
-
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-CP = $(TRGT)objcopy
-AS = $(TRGT)gcc -x assembler-with-cpp
-OD = $(TRGT)objdump
-HEX = $(CP) -O ihex
-BIN = $(CP) -O binary
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
-CWARN = -Wall -Wextra -Wstrict-prototypes
-
-# Define C++ warning options here
-CPPWARN = -Wall -Wextra
-
-#
-# Compiler settings
-##############################################################################
-
-##############################################################################
-# Start of default section
-#
-
-# List all default C defines here, like -D_DEBUG=1
-DDEFS =
-
-# List all default ASM defines here, like -D_DEBUG=1
-DADEFS =
-
-# List all default directories to look for include files here
-DINCDIR =
-
-# List the default directory to look for the libraries here
-DLIBDIR =
-
-# List all default libraries here
-DLIBS =
-
-#
-# End of default section
-##############################################################################
-
-##############################################################################
-# Start of user section
-#
-
-# List all user C define here, like -D_DEBUG=1
-UDEFS =
-
-# Define ASM defines here
-UADEFS =
-
-# List all user directories here
-UINCDIR =
-
-# List the user directory to look for the libraries here
-ULIBDIR =
-
-# List all user libraries here
-ULIBS =
-
-#
-# End of user defines
-##############################################################################
-
-ifeq ($(USE_FWLIB),yes)
- include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
- CSRC += $(STM32SRC)
- INCDIR += $(STM32INC)
- USE_OPT += -DUSE_STDPERIPH_DRIVER
-endif
-
-include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
diff --git a/testhal/STM32/SPI/ch.ld b/testhal/STM32/SPI/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/SPI/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/UART/Makefile b/testhal/STM32/UART/Makefile
deleted file mode 100644
index a5c76f1c8..000000000
--- a/testhal/STM32/UART/Makefile
+++ /dev/null
@@ -1,204 +0,0 @@
-##############################################################################
-# Build global options
-# NOTE: Can be overridden externally.
-#
-
-# Compiler options here.
-ifeq ($(USE_OPT),)
- USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
-endif
-
-# C++ specific options here (added to USE_OPT).
-ifeq ($(USE_CPPOPT),)
- USE_CPPOPT = -fno-rtti
-endif
-
-# Enable this if you want the linker to remove unused code and data
-ifeq ($(USE_LINK_GC),)
- USE_LINK_GC = yes
-endif
-
-# If enabled, this option allows to compile the application in THUMB mode.
-ifeq ($(USE_THUMB),)
- USE_THUMB = yes
-endif
-
-# Enable register caching optimization (read documentation).
-ifeq ($(USE_CURRP_CACHING),)
- USE_CURRP_CACHING = no
-endif
-
-#
-# Build global options
-##############################################################################
-
-##############################################################################
-# Architecture or project specific options
-#
-
-# Enable this if you really want to use the STM FWLib.
-ifeq ($(USE_FWLIB),)
- USE_FWLIB = no
-endif
-
-#
-# Architecture or project specific options
-##############################################################################
-
-##############################################################################
-# Project, sources and paths
-#
-
-# Define project name here
-PROJECT = ch
-
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
-CHIBIOS = ../../..
-include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
-include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
-include $(CHIBIOS)/os/kernel/kernel.mk
-#include $(CHIBIOS)/test/test.mk
-
-# C sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CSRC = $(PORTSRC) \
- $(KERNSRC) \
- $(TESTSRC) \
- $(HALSRC) \
- $(PLATFORMSRC) \
- $(BOARDSRC) \
- $(CHIBIOS)/os/various/evtimer.c \
- $(CHIBIOS)/os/various/syscalls.c \
- main.c
-
-# C++ sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CPPSRC =
-
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
-ASMSRC = $(PORTASM)
-
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC) \
- $(CHIBIOS)/os/various
-
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
-
-MCU = cortex-m3
-
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-CP = $(TRGT)objcopy
-AS = $(TRGT)gcc -x assembler-with-cpp
-OD = $(TRGT)objdump
-HEX = $(CP) -O ihex
-BIN = $(CP) -O binary
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
-CWARN = -Wall -Wextra -Wstrict-prototypes
-
-# Define C++ warning options here
-CPPWARN = -Wall -Wextra
-
-#
-# Compiler settings
-##############################################################################
-
-##############################################################################
-# Start of default section
-#
-
-# List all default C defines here, like -D_DEBUG=1
-DDEFS =
-
-# List all default ASM defines here, like -D_DEBUG=1
-DADEFS =
-
-# List all default directories to look for include files here
-DINCDIR =
-
-# List the default directory to look for the libraries here
-DLIBDIR =
-
-# List all default libraries here
-DLIBS =
-
-#
-# End of default section
-##############################################################################
-
-##############################################################################
-# Start of user section
-#
-
-# List all user C define here, like -D_DEBUG=1
-UDEFS =
-
-# Define ASM defines here
-UADEFS =
-
-# List all user directories here
-UINCDIR =
-
-# List the user directory to look for the libraries here
-ULIBDIR =
-
-# List all user libraries here
-ULIBS =
-
-#
-# End of user defines
-##############################################################################
-
-ifeq ($(USE_FWLIB),yes)
- include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
- CSRC += $(STM32SRC)
- INCDIR += $(STM32INC)
- USE_OPT += -DUSE_STDPERIPH_DRIVER
-endif
-
-include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
diff --git a/testhal/STM32/UART/ch.ld b/testhal/STM32/UART/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/UART/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/USB_CDC/ch.ld b/testhal/STM32/USB_CDC/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/USB_CDC/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/USB_MSC/ch.ld b/testhal/STM32/USB_MSC/ch.ld
deleted file mode 100644
index 4d97e7682..000000000
--- a/testhal/STM32/USB_MSC/ch.ld
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011 Giovanni Di Sirio.
-
- This file is part of ChibiOS/RT.
-
- ChibiOS/RT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/RT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * ST32F103 memory setup.
- */
-__main_stack_size__ = 0x0400;
-__process_stack_size__ = 0x0400;
-__stacks_total_size__ = __main_stack_size__ + __process_stack_size__;
-
-MEMORY
-{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 20k
-}
-
-__ram_start__ = ORIGIN(ram);
-__ram_size__ = LENGTH(ram);
-__ram_end__ = __ram_start__ + __ram_size__;
-
-SECTIONS
-{
- . = 0;
- _text = .;
-
- startup : ALIGN(16) SUBALIGN(16)
- {
- KEEP(*(vectors))
- } > flash
-
- constructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(__init_array_end = .);
- } > flash
-
- destructors : ALIGN(4) SUBALIGN(4)
- {
- PROVIDE(__fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(__fini_array_end = .);
- } > flash
-
- .text : ALIGN(16) SUBALIGN(16)
- {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- PROVIDE(__exidx_end = .);
- } > flash
-
- .eh_frame_hdr :
- {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO
- {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
- _etext = .;
- _textdata = _etext;
-
- .data :
- {
- PROVIDE(_data = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_edata = .);
- } > ram AT > flash
-
- .bss :
- {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-}
-
-PROVIDE(end = .);
-_end = .;
-
-__heap_base__ = _end;
-__heap_end__ = __ram_end__ - __stacks_total_size__;
diff --git a/testhal/STM32/GPT/Makefile b/testhal/STM32F1xx/ADC/Makefile
index a5c76f1c8..f93aeb073 100644
--- a/testhal/STM32/GPT/Makefile
+++ b/testhal/STM32F1xx/ADC/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
#include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -74,7 +74,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/ADC/chconf.h b/testhal/STM32F1xx/ADC/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/ADC/chconf.h
+++ b/testhal/STM32F1xx/ADC/chconf.h
diff --git a/testhal/STM32/ADC/halconf.h b/testhal/STM32F1xx/ADC/halconf.h
index b42f9088b..b42f9088b 100644
--- a/testhal/STM32/ADC/halconf.h
+++ b/testhal/STM32F1xx/ADC/halconf.h
diff --git a/testhal/STM32/ADC/main.c b/testhal/STM32F1xx/ADC/main.c
index 214f28b5f..214f28b5f 100644
--- a/testhal/STM32/ADC/main.c
+++ b/testhal/STM32F1xx/ADC/main.c
diff --git a/testhal/STM32/ADC/mcuconf.h b/testhal/STM32F1xx/ADC/mcuconf.h
index 558c0773d..558c0773d 100644
--- a/testhal/STM32/ADC/mcuconf.h
+++ b/testhal/STM32F1xx/ADC/mcuconf.h
diff --git a/testhal/STM32/ADC/readme.txt b/testhal/STM32F1xx/ADC/readme.txt
index e0cf0adea..e0cf0adea 100644
--- a/testhal/STM32/ADC/readme.txt
+++ b/testhal/STM32F1xx/ADC/readme.txt
diff --git a/testhal/STM32/ADC/Makefile b/testhal/STM32F1xx/CAN/Makefile
index a5c76f1c8..f93aeb073 100644
--- a/testhal/STM32/ADC/Makefile
+++ b/testhal/STM32F1xx/CAN/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
#include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -74,7 +74,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/CAN/chconf.h b/testhal/STM32F1xx/CAN/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/CAN/chconf.h
+++ b/testhal/STM32F1xx/CAN/chconf.h
diff --git a/testhal/STM32/CAN/halconf.h b/testhal/STM32F1xx/CAN/halconf.h
index a7ae76b45..a7ae76b45 100644
--- a/testhal/STM32/CAN/halconf.h
+++ b/testhal/STM32F1xx/CAN/halconf.h
diff --git a/testhal/STM32/CAN/main.c b/testhal/STM32F1xx/CAN/main.c
index ce52ee67a..ce52ee67a 100644
--- a/testhal/STM32/CAN/main.c
+++ b/testhal/STM32F1xx/CAN/main.c
diff --git a/testhal/STM32/CAN/mcuconf.h b/testhal/STM32F1xx/CAN/mcuconf.h
index 558c0773d..558c0773d 100644
--- a/testhal/STM32/CAN/mcuconf.h
+++ b/testhal/STM32F1xx/CAN/mcuconf.h
diff --git a/testhal/STM32/CAN/readme.txt b/testhal/STM32F1xx/CAN/readme.txt
index 3b92f4fa3..3b92f4fa3 100644
--- a/testhal/STM32/CAN/readme.txt
+++ b/testhal/STM32F1xx/CAN/readme.txt
diff --git a/testhal/STM32/IRQ_STORM/Makefile b/testhal/STM32F1xx/GPT/Makefile
index a5c76f1c8..f93aeb073 100644
--- a/testhal/STM32/IRQ_STORM/Makefile
+++ b/testhal/STM32F1xx/GPT/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
#include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -74,7 +74,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/GPT/chconf.h b/testhal/STM32F1xx/GPT/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/GPT/chconf.h
+++ b/testhal/STM32F1xx/GPT/chconf.h
diff --git a/testhal/STM32/GPT/halconf.h b/testhal/STM32F1xx/GPT/halconf.h
index b4361f9b9..b4361f9b9 100644
--- a/testhal/STM32/GPT/halconf.h
+++ b/testhal/STM32F1xx/GPT/halconf.h
diff --git a/testhal/STM32/GPT/main.c b/testhal/STM32F1xx/GPT/main.c
index 57b2977d1..57b2977d1 100644
--- a/testhal/STM32/GPT/main.c
+++ b/testhal/STM32F1xx/GPT/main.c
diff --git a/testhal/STM32/GPT/mcuconf.h b/testhal/STM32F1xx/GPT/mcuconf.h
index eb0774a23..eb0774a23 100644
--- a/testhal/STM32/GPT/mcuconf.h
+++ b/testhal/STM32F1xx/GPT/mcuconf.h
diff --git a/testhal/STM32/GPT/readme.txt b/testhal/STM32F1xx/GPT/readme.txt
index 3f3164120..3f3164120 100644
--- a/testhal/STM32/GPT/readme.txt
+++ b/testhal/STM32F1xx/GPT/readme.txt
diff --git a/testhal/STM32/GPT/run b/testhal/STM32F1xx/GPT/run
index 818d0e307..818d0e307 100644
--- a/testhal/STM32/GPT/run
+++ b/testhal/STM32F1xx/GPT/run
diff --git a/testhal/STM32/I2C/Makefile b/testhal/STM32F1xx/I2C/Makefile
index 9f95a5914..9f95a5914 100644
--- a/testhal/STM32/I2C/Makefile
+++ b/testhal/STM32F1xx/I2C/Makefile
diff --git a/testhal/STM32/I2C/chconf.h b/testhal/STM32F1xx/I2C/chconf.h
index a293288d3..a293288d3 100644
--- a/testhal/STM32/I2C/chconf.h
+++ b/testhal/STM32F1xx/I2C/chconf.h
diff --git a/testhal/STM32/I2C/halconf.h b/testhal/STM32F1xx/I2C/halconf.h
index da52785c0..da52785c0 100644
--- a/testhal/STM32/I2C/halconf.h
+++ b/testhal/STM32F1xx/I2C/halconf.h
diff --git a/testhal/STM32/I2C/i2c_pns.c b/testhal/STM32F1xx/I2C/i2c_pns.c
index 44f4a8a33..44f4a8a33 100644
--- a/testhal/STM32/I2C/i2c_pns.c
+++ b/testhal/STM32F1xx/I2C/i2c_pns.c
diff --git a/testhal/STM32/I2C/i2c_pns.h b/testhal/STM32F1xx/I2C/i2c_pns.h
index 4dfdf320e..4dfdf320e 100644
--- a/testhal/STM32/I2C/i2c_pns.h
+++ b/testhal/STM32F1xx/I2C/i2c_pns.h
diff --git a/testhal/STM32/I2C/lis3.c b/testhal/STM32F1xx/I2C/lis3.c
index 401f56199..401f56199 100644
--- a/testhal/STM32/I2C/lis3.c
+++ b/testhal/STM32F1xx/I2C/lis3.c
diff --git a/testhal/STM32/I2C/lis3.h b/testhal/STM32F1xx/I2C/lis3.h
index e50359bde..e50359bde 100644
--- a/testhal/STM32/I2C/lis3.h
+++ b/testhal/STM32F1xx/I2C/lis3.h
diff --git a/testhal/STM32/I2C/main.c b/testhal/STM32F1xx/I2C/main.c
index b828953c5..b828953c5 100644
--- a/testhal/STM32/I2C/main.c
+++ b/testhal/STM32F1xx/I2C/main.c
diff --git a/testhal/STM32/I2C/main.h b/testhal/STM32F1xx/I2C/main.h
index 1435a05e5..1435a05e5 100644
--- a/testhal/STM32/I2C/main.h
+++ b/testhal/STM32F1xx/I2C/main.h
diff --git a/testhal/STM32/I2C/max1236.c b/testhal/STM32F1xx/I2C/max1236.c
index 09e2c8b35..09e2c8b35 100644
--- a/testhal/STM32/I2C/max1236.c
+++ b/testhal/STM32F1xx/I2C/max1236.c
diff --git a/testhal/STM32/I2C/max1236.h b/testhal/STM32F1xx/I2C/max1236.h
index aff466cf4..aff466cf4 100644
--- a/testhal/STM32/I2C/max1236.h
+++ b/testhal/STM32F1xx/I2C/max1236.h
diff --git a/testhal/STM32/I2C/mcuconf.h b/testhal/STM32F1xx/I2C/mcuconf.h
index 809c3abd2..809c3abd2 100644
--- a/testhal/STM32/I2C/mcuconf.h
+++ b/testhal/STM32F1xx/I2C/mcuconf.h
diff --git a/testhal/STM32/I2C/tmp75.c b/testhal/STM32F1xx/I2C/tmp75.c
index 72e634527..72e634527 100644
--- a/testhal/STM32/I2C/tmp75.c
+++ b/testhal/STM32F1xx/I2C/tmp75.c
diff --git a/testhal/STM32/I2C/tmp75.h b/testhal/STM32F1xx/I2C/tmp75.h
index ab4b5fa9b..ab4b5fa9b 100644
--- a/testhal/STM32/I2C/tmp75.h
+++ b/testhal/STM32F1xx/I2C/tmp75.h
diff --git a/testhal/STM32F1xx/IRQ_STORM/Makefile b/testhal/STM32F1xx/IRQ_STORM/Makefile
new file mode 100644
index 000000000..f93aeb073
--- /dev/null
+++ b/testhal/STM32F1xx/IRQ_STORM/Makefile
@@ -0,0 +1,204 @@
+##############################################################################
+# Build global options
+# NOTE: Can be overridden externally.
+#
+
+# Compiler options here.
+ifeq ($(USE_OPT),)
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
+endif
+
+# C++ specific options here (added to USE_OPT).
+ifeq ($(USE_CPPOPT),)
+ USE_CPPOPT = -fno-rtti
+endif
+
+# Enable this if you want the linker to remove unused code and data
+ifeq ($(USE_LINK_GC),)
+ USE_LINK_GC = yes
+endif
+
+# If enabled, this option allows to compile the application in THUMB mode.
+ifeq ($(USE_THUMB),)
+ USE_THUMB = yes
+endif
+
+# Enable register caching optimization (read documentation).
+ifeq ($(USE_CURRP_CACHING),)
+ USE_CURRP_CACHING = no
+endif
+
+#
+# Build global options
+##############################################################################
+
+##############################################################################
+# Architecture or project specific options
+#
+
+# Enable this if you really want to use the STM FWLib.
+ifeq ($(USE_FWLIB),)
+ USE_FWLIB = no
+endif
+
+#
+# Architecture or project specific options
+##############################################################################
+
+##############################################################################
+# Project, sources and paths
+#
+
+# Define project name here
+PROJECT = ch
+
+# Imported source files and paths
+CHIBIOS = ../../..
+include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/hal.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
+include $(CHIBIOS)/os/kernel/kernel.mk
+#include $(CHIBIOS)/test/test.mk
+
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
+# C sources that can be compiled in ARM or THUMB mode depending on the global
+# setting.
+CSRC = $(PORTSRC) \
+ $(KERNSRC) \
+ $(TESTSRC) \
+ $(HALSRC) \
+ $(PLATFORMSRC) \
+ $(BOARDSRC) \
+ $(CHIBIOS)/os/various/evtimer.c \
+ $(CHIBIOS)/os/various/syscalls.c \
+ main.c
+
+# C++ sources that can be compiled in ARM or THUMB mode depending on the global
+# setting.
+CPPSRC =
+
+# C sources to be compiled in ARM mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+ACSRC =
+
+# C++ sources to be compiled in ARM mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+ACPPSRC =
+
+# C sources to be compiled in THUMB mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+TCSRC =
+
+# C sources to be compiled in THUMB mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+TCPPSRC =
+
+# List ASM source files here
+ASMSRC = $(PORTASM)
+
+INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) \
+ $(CHIBIOS)/os/various
+
+#
+# Project, sources and paths
+##############################################################################
+
+##############################################################################
+# Compiler settings
+#
+
+MCU = cortex-m3
+
+#TRGT = arm-elf-
+TRGT = arm-none-eabi-
+CC = $(TRGT)gcc
+CPPC = $(TRGT)g++
+# Enable loading with g++ only if you need C++ runtime support.
+# NOTE: You can use C++ even without C++ support if you are careful. C++
+# runtime support makes code size explode.
+LD = $(TRGT)gcc
+#LD = $(TRGT)g++
+CP = $(TRGT)objcopy
+AS = $(TRGT)gcc -x assembler-with-cpp
+OD = $(TRGT)objdump
+HEX = $(CP) -O ihex
+BIN = $(CP) -O binary
+
+# ARM-specific options here
+AOPT =
+
+# THUMB-specific options here
+TOPT = -mthumb -DTHUMB
+
+# Define C warning options here
+CWARN = -Wall -Wextra -Wstrict-prototypes
+
+# Define C++ warning options here
+CPPWARN = -Wall -Wextra
+
+#
+# Compiler settings
+##############################################################################
+
+##############################################################################
+# Start of default section
+#
+
+# List all default C defines here, like -D_DEBUG=1
+DDEFS =
+
+# List all default ASM defines here, like -D_DEBUG=1
+DADEFS =
+
+# List all default directories to look for include files here
+DINCDIR =
+
+# List the default directory to look for the libraries here
+DLIBDIR =
+
+# List all default libraries here
+DLIBS =
+
+#
+# End of default section
+##############################################################################
+
+##############################################################################
+# Start of user section
+#
+
+# List all user C define here, like -D_DEBUG=1
+UDEFS =
+
+# Define ASM defines here
+UADEFS =
+
+# List all user directories here
+UINCDIR =
+
+# List the user directory to look for the libraries here
+ULIBDIR =
+
+# List all user libraries here
+ULIBS =
+
+#
+# End of user defines
+##############################################################################
+
+ifeq ($(USE_FWLIB),yes)
+ include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
+ CSRC += $(STM32SRC)
+ INCDIR += $(STM32INC)
+ USE_OPT += -DUSE_STDPERIPH_DRIVER
+endif
+
+include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
diff --git a/testhal/STM32/IRQ_STORM/chconf.h b/testhal/STM32F1xx/IRQ_STORM/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/IRQ_STORM/chconf.h
+++ b/testhal/STM32F1xx/IRQ_STORM/chconf.h
diff --git a/testhal/STM32/IRQ_STORM/halconf.h b/testhal/STM32F1xx/IRQ_STORM/halconf.h
index 249e2a621..249e2a621 100644
--- a/testhal/STM32/IRQ_STORM/halconf.h
+++ b/testhal/STM32F1xx/IRQ_STORM/halconf.h
diff --git a/testhal/STM32/IRQ_STORM/main.c b/testhal/STM32F1xx/IRQ_STORM/main.c
index 7dcc62d61..7dcc62d61 100644
--- a/testhal/STM32/IRQ_STORM/main.c
+++ b/testhal/STM32F1xx/IRQ_STORM/main.c
diff --git a/testhal/STM32/IRQ_STORM/mcuconf.h b/testhal/STM32F1xx/IRQ_STORM/mcuconf.h
index 2341d5626..2341d5626 100644
--- a/testhal/STM32/IRQ_STORM/mcuconf.h
+++ b/testhal/STM32F1xx/IRQ_STORM/mcuconf.h
diff --git a/testhal/STM32/IRQ_STORM/readme.txt b/testhal/STM32F1xx/IRQ_STORM/readme.txt
index 32aad05b5..32aad05b5 100644
--- a/testhal/STM32/IRQ_STORM/readme.txt
+++ b/testhal/STM32F1xx/IRQ_STORM/readme.txt
diff --git a/testhal/STM32/CAN/Makefile b/testhal/STM32F1xx/PWM-ICU/Makefile
index a5c76f1c8..93cf17eff 100644
--- a/testhal/STM32/CAN/Makefile
+++ b/testhal/STM32F1xx/PWM-ICU/Makefile
@@ -52,15 +52,12 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
#include $(CHIBIOS)/test/test.mk
@@ -74,7 +71,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/PWM-ICU/chconf.h b/testhal/STM32F1xx/PWM-ICU/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/PWM-ICU/chconf.h
+++ b/testhal/STM32F1xx/PWM-ICU/chconf.h
diff --git a/testhal/STM32/PWM-ICU/halconf.h b/testhal/STM32F1xx/PWM-ICU/halconf.h
index 9656ff0aa..9656ff0aa 100644
--- a/testhal/STM32/PWM-ICU/halconf.h
+++ b/testhal/STM32F1xx/PWM-ICU/halconf.h
diff --git a/testhal/STM32/PWM-ICU/main.c b/testhal/STM32F1xx/PWM-ICU/main.c
index 1fd56c33a..1fd56c33a 100644
--- a/testhal/STM32/PWM-ICU/main.c
+++ b/testhal/STM32F1xx/PWM-ICU/main.c
diff --git a/testhal/STM32/PWM-ICU/mcuconf.h b/testhal/STM32F1xx/PWM-ICU/mcuconf.h
index 558c0773d..558c0773d 100644
--- a/testhal/STM32/PWM-ICU/mcuconf.h
+++ b/testhal/STM32F1xx/PWM-ICU/mcuconf.h
diff --git a/testhal/STM32/PWM-ICU/readme.txt b/testhal/STM32F1xx/PWM-ICU/readme.txt
index 97476205d..97476205d 100644
--- a/testhal/STM32/PWM-ICU/readme.txt
+++ b/testhal/STM32F1xx/PWM-ICU/readme.txt
diff --git a/testhal/STM32/SDIO/Makefile b/testhal/STM32F1xx/SDIO/Makefile
index cf88c1190..c56c5eadb 100644
--- a/testhal/STM32/SDIO/Makefile
+++ b/testhal/STM32F1xx/SDIO/Makefile
@@ -55,15 +55,18 @@ PROJECT = ch
# Define linker script file here
LDSCRIPT= ch.ld
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/ST_STM3210E_EVAL/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
#include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xE.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -74,7 +77,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/SDIO/chconf.h b/testhal/STM32F1xx/SDIO/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/SDIO/chconf.h
+++ b/testhal/STM32F1xx/SDIO/chconf.h
diff --git a/testhal/STM32/SDIO/halconf.h b/testhal/STM32F1xx/SDIO/halconf.h
index 682167d84..682167d84 100644
--- a/testhal/STM32/SDIO/halconf.h
+++ b/testhal/STM32F1xx/SDIO/halconf.h
diff --git a/testhal/STM32/SDIO/main.c b/testhal/STM32F1xx/SDIO/main.c
index 9736f0268..9736f0268 100644
--- a/testhal/STM32/SDIO/main.c
+++ b/testhal/STM32F1xx/SDIO/main.c
diff --git a/testhal/STM32/SDIO/mcuconf.h b/testhal/STM32F1xx/SDIO/mcuconf.h
index 658924fc2..658924fc2 100644
--- a/testhal/STM32/SDIO/mcuconf.h
+++ b/testhal/STM32F1xx/SDIO/mcuconf.h
diff --git a/testhal/STM32/SDIO/readme.txt b/testhal/STM32F1xx/SDIO/readme.txt
index caeb7bce7..caeb7bce7 100644
--- a/testhal/STM32/SDIO/readme.txt
+++ b/testhal/STM32F1xx/SDIO/readme.txt
diff --git a/testhal/STM32F1xx/SPI/Makefile b/testhal/STM32F1xx/SPI/Makefile
new file mode 100644
index 000000000..f93aeb073
--- /dev/null
+++ b/testhal/STM32F1xx/SPI/Makefile
@@ -0,0 +1,204 @@
+##############################################################################
+# Build global options
+# NOTE: Can be overridden externally.
+#
+
+# Compiler options here.
+ifeq ($(USE_OPT),)
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
+endif
+
+# C++ specific options here (added to USE_OPT).
+ifeq ($(USE_CPPOPT),)
+ USE_CPPOPT = -fno-rtti
+endif
+
+# Enable this if you want the linker to remove unused code and data
+ifeq ($(USE_LINK_GC),)
+ USE_LINK_GC = yes
+endif
+
+# If enabled, this option allows to compile the application in THUMB mode.
+ifeq ($(USE_THUMB),)
+ USE_THUMB = yes
+endif
+
+# Enable register caching optimization (read documentation).
+ifeq ($(USE_CURRP_CACHING),)
+ USE_CURRP_CACHING = no
+endif
+
+#
+# Build global options
+##############################################################################
+
+##############################################################################
+# Architecture or project specific options
+#
+
+# Enable this if you really want to use the STM FWLib.
+ifeq ($(USE_FWLIB),)
+ USE_FWLIB = no
+endif
+
+#
+# Architecture or project specific options
+##############################################################################
+
+##############################################################################
+# Project, sources and paths
+#
+
+# Define project name here
+PROJECT = ch
+
+# Imported source files and paths
+CHIBIOS = ../../..
+include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/hal.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
+include $(CHIBIOS)/os/kernel/kernel.mk
+#include $(CHIBIOS)/test/test.mk
+
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
+# C sources that can be compiled in ARM or THUMB mode depending on the global
+# setting.
+CSRC = $(PORTSRC) \
+ $(KERNSRC) \
+ $(TESTSRC) \
+ $(HALSRC) \
+ $(PLATFORMSRC) \
+ $(BOARDSRC) \
+ $(CHIBIOS)/os/various/evtimer.c \
+ $(CHIBIOS)/os/various/syscalls.c \
+ main.c
+
+# C++ sources that can be compiled in ARM or THUMB mode depending on the global
+# setting.
+CPPSRC =
+
+# C sources to be compiled in ARM mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+ACSRC =
+
+# C++ sources to be compiled in ARM mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+ACPPSRC =
+
+# C sources to be compiled in THUMB mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+TCSRC =
+
+# C sources to be compiled in THUMB mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+TCPPSRC =
+
+# List ASM source files here
+ASMSRC = $(PORTASM)
+
+INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) \
+ $(CHIBIOS)/os/various
+
+#
+# Project, sources and paths
+##############################################################################
+
+##############################################################################
+# Compiler settings
+#
+
+MCU = cortex-m3
+
+#TRGT = arm-elf-
+TRGT = arm-none-eabi-
+CC = $(TRGT)gcc
+CPPC = $(TRGT)g++
+# Enable loading with g++ only if you need C++ runtime support.
+# NOTE: You can use C++ even without C++ support if you are careful. C++
+# runtime support makes code size explode.
+LD = $(TRGT)gcc
+#LD = $(TRGT)g++
+CP = $(TRGT)objcopy
+AS = $(TRGT)gcc -x assembler-with-cpp
+OD = $(TRGT)objdump
+HEX = $(CP) -O ihex
+BIN = $(CP) -O binary
+
+# ARM-specific options here
+AOPT =
+
+# THUMB-specific options here
+TOPT = -mthumb -DTHUMB
+
+# Define C warning options here
+CWARN = -Wall -Wextra -Wstrict-prototypes
+
+# Define C++ warning options here
+CPPWARN = -Wall -Wextra
+
+#
+# Compiler settings
+##############################################################################
+
+##############################################################################
+# Start of default section
+#
+
+# List all default C defines here, like -D_DEBUG=1
+DDEFS =
+
+# List all default ASM defines here, like -D_DEBUG=1
+DADEFS =
+
+# List all default directories to look for include files here
+DINCDIR =
+
+# List the default directory to look for the libraries here
+DLIBDIR =
+
+# List all default libraries here
+DLIBS =
+
+#
+# End of default section
+##############################################################################
+
+##############################################################################
+# Start of user section
+#
+
+# List all user C define here, like -D_DEBUG=1
+UDEFS =
+
+# Define ASM defines here
+UADEFS =
+
+# List all user directories here
+UINCDIR =
+
+# List the user directory to look for the libraries here
+ULIBDIR =
+
+# List all user libraries here
+ULIBS =
+
+#
+# End of user defines
+##############################################################################
+
+ifeq ($(USE_FWLIB),yes)
+ include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
+ CSRC += $(STM32SRC)
+ INCDIR += $(STM32INC)
+ USE_OPT += -DUSE_STDPERIPH_DRIVER
+endif
+
+include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
diff --git a/testhal/STM32/SPI/chconf.h b/testhal/STM32F1xx/SPI/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/SPI/chconf.h
+++ b/testhal/STM32F1xx/SPI/chconf.h
diff --git a/testhal/STM32/SPI/halconf.h b/testhal/STM32F1xx/SPI/halconf.h
index eaf7f9673..eaf7f9673 100644
--- a/testhal/STM32/SPI/halconf.h
+++ b/testhal/STM32F1xx/SPI/halconf.h
diff --git a/testhal/STM32/SPI/main.c b/testhal/STM32F1xx/SPI/main.c
index 3750203bc..3750203bc 100644
--- a/testhal/STM32/SPI/main.c
+++ b/testhal/STM32F1xx/SPI/main.c
diff --git a/testhal/STM32/SPI/mcuconf.h b/testhal/STM32F1xx/SPI/mcuconf.h
index ab96d8eef..ab96d8eef 100644
--- a/testhal/STM32/SPI/mcuconf.h
+++ b/testhal/STM32F1xx/SPI/mcuconf.h
diff --git a/testhal/STM32/SPI/readme.txt b/testhal/STM32F1xx/SPI/readme.txt
index 590fd8299..590fd8299 100644
--- a/testhal/STM32/SPI/readme.txt
+++ b/testhal/STM32F1xx/SPI/readme.txt
diff --git a/testhal/STM32F1xx/UART/Makefile b/testhal/STM32F1xx/UART/Makefile
new file mode 100644
index 000000000..f93aeb073
--- /dev/null
+++ b/testhal/STM32F1xx/UART/Makefile
@@ -0,0 +1,204 @@
+##############################################################################
+# Build global options
+# NOTE: Can be overridden externally.
+#
+
+# Compiler options here.
+ifeq ($(USE_OPT),)
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
+endif
+
+# C++ specific options here (added to USE_OPT).
+ifeq ($(USE_CPPOPT),)
+ USE_CPPOPT = -fno-rtti
+endif
+
+# Enable this if you want the linker to remove unused code and data
+ifeq ($(USE_LINK_GC),)
+ USE_LINK_GC = yes
+endif
+
+# If enabled, this option allows to compile the application in THUMB mode.
+ifeq ($(USE_THUMB),)
+ USE_THUMB = yes
+endif
+
+# Enable register caching optimization (read documentation).
+ifeq ($(USE_CURRP_CACHING),)
+ USE_CURRP_CACHING = no
+endif
+
+#
+# Build global options
+##############################################################################
+
+##############################################################################
+# Architecture or project specific options
+#
+
+# Enable this if you really want to use the STM FWLib.
+ifeq ($(USE_FWLIB),)
+ USE_FWLIB = no
+endif
+
+#
+# Architecture or project specific options
+##############################################################################
+
+##############################################################################
+# Project, sources and paths
+#
+
+# Define project name here
+PROJECT = ch
+
+# Imported source files and paths
+CHIBIOS = ../../..
+include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/hal.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
+include $(CHIBIOS)/os/kernel/kernel.mk
+#include $(CHIBIOS)/test/test.mk
+
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
+# C sources that can be compiled in ARM or THUMB mode depending on the global
+# setting.
+CSRC = $(PORTSRC) \
+ $(KERNSRC) \
+ $(TESTSRC) \
+ $(HALSRC) \
+ $(PLATFORMSRC) \
+ $(BOARDSRC) \
+ $(CHIBIOS)/os/various/evtimer.c \
+ $(CHIBIOS)/os/various/syscalls.c \
+ main.c
+
+# C++ sources that can be compiled in ARM or THUMB mode depending on the global
+# setting.
+CPPSRC =
+
+# C sources to be compiled in ARM mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+ACSRC =
+
+# C++ sources to be compiled in ARM mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+ACPPSRC =
+
+# C sources to be compiled in THUMB mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+TCSRC =
+
+# C sources to be compiled in THUMB mode regardless of the global setting.
+# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
+# option that results in lower performance and larger code size.
+TCPPSRC =
+
+# List ASM source files here
+ASMSRC = $(PORTASM)
+
+INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) \
+ $(CHIBIOS)/os/various
+
+#
+# Project, sources and paths
+##############################################################################
+
+##############################################################################
+# Compiler settings
+#
+
+MCU = cortex-m3
+
+#TRGT = arm-elf-
+TRGT = arm-none-eabi-
+CC = $(TRGT)gcc
+CPPC = $(TRGT)g++
+# Enable loading with g++ only if you need C++ runtime support.
+# NOTE: You can use C++ even without C++ support if you are careful. C++
+# runtime support makes code size explode.
+LD = $(TRGT)gcc
+#LD = $(TRGT)g++
+CP = $(TRGT)objcopy
+AS = $(TRGT)gcc -x assembler-with-cpp
+OD = $(TRGT)objdump
+HEX = $(CP) -O ihex
+BIN = $(CP) -O binary
+
+# ARM-specific options here
+AOPT =
+
+# THUMB-specific options here
+TOPT = -mthumb -DTHUMB
+
+# Define C warning options here
+CWARN = -Wall -Wextra -Wstrict-prototypes
+
+# Define C++ warning options here
+CPPWARN = -Wall -Wextra
+
+#
+# Compiler settings
+##############################################################################
+
+##############################################################################
+# Start of default section
+#
+
+# List all default C defines here, like -D_DEBUG=1
+DDEFS =
+
+# List all default ASM defines here, like -D_DEBUG=1
+DADEFS =
+
+# List all default directories to look for include files here
+DINCDIR =
+
+# List the default directory to look for the libraries here
+DLIBDIR =
+
+# List all default libraries here
+DLIBS =
+
+#
+# End of default section
+##############################################################################
+
+##############################################################################
+# Start of user section
+#
+
+# List all user C define here, like -D_DEBUG=1
+UDEFS =
+
+# Define ASM defines here
+UADEFS =
+
+# List all user directories here
+UINCDIR =
+
+# List the user directory to look for the libraries here
+ULIBDIR =
+
+# List all user libraries here
+ULIBS =
+
+#
+# End of user defines
+##############################################################################
+
+ifeq ($(USE_FWLIB),yes)
+ include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
+ CSRC += $(STM32SRC)
+ INCDIR += $(STM32INC)
+ USE_OPT += -DUSE_STDPERIPH_DRIVER
+endif
+
+include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
diff --git a/testhal/STM32/UART/chconf.h b/testhal/STM32F1xx/UART/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/UART/chconf.h
+++ b/testhal/STM32F1xx/UART/chconf.h
diff --git a/testhal/STM32/UART/halconf.h b/testhal/STM32F1xx/UART/halconf.h
index d353272b7..d353272b7 100644
--- a/testhal/STM32/UART/halconf.h
+++ b/testhal/STM32F1xx/UART/halconf.h
diff --git a/testhal/STM32/UART/main.c b/testhal/STM32F1xx/UART/main.c
index 924338a77..924338a77 100644
--- a/testhal/STM32/UART/main.c
+++ b/testhal/STM32F1xx/UART/main.c
diff --git a/testhal/STM32/UART/mcuconf.h b/testhal/STM32F1xx/UART/mcuconf.h
index 558c0773d..558c0773d 100644
--- a/testhal/STM32/UART/mcuconf.h
+++ b/testhal/STM32F1xx/UART/mcuconf.h
diff --git a/testhal/STM32/UART/readme.txt b/testhal/STM32F1xx/UART/readme.txt
index fc111a298..fc111a298 100644
--- a/testhal/STM32/UART/readme.txt
+++ b/testhal/STM32F1xx/UART/readme.txt
diff --git a/testhal/STM32/USB_CDC/Makefile b/testhal/STM32F1xx/USB_CDC/Makefile
index 8ebd984fb..45218c328 100644
--- a/testhal/STM32/USB_CDC/Makefile
+++ b/testhal/STM32F1xx/USB_CDC/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -74,7 +74,7 @@ CSRC = $(PORTSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/shell.c \
$(CHIBIOS)/os/various/chprintf.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/USB_CDC/chconf.h b/testhal/STM32F1xx/USB_CDC/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/USB_CDC/chconf.h
+++ b/testhal/STM32F1xx/USB_CDC/chconf.h
diff --git a/testhal/STM32/USB_CDC/halconf.h b/testhal/STM32F1xx/USB_CDC/halconf.h
index 3895ff70a..3895ff70a 100644
--- a/testhal/STM32/USB_CDC/halconf.h
+++ b/testhal/STM32F1xx/USB_CDC/halconf.h
diff --git a/testhal/STM32/USB_CDC/main.c b/testhal/STM32F1xx/USB_CDC/main.c
index a0a965bba..a0a965bba 100644
--- a/testhal/STM32/USB_CDC/main.c
+++ b/testhal/STM32F1xx/USB_CDC/main.c
diff --git a/testhal/STM32/USB_CDC/mcuconf.h b/testhal/STM32F1xx/USB_CDC/mcuconf.h
index 558c0773d..558c0773d 100644
--- a/testhal/STM32/USB_CDC/mcuconf.h
+++ b/testhal/STM32F1xx/USB_CDC/mcuconf.h
diff --git a/testhal/STM32/USB_MSC/Makefile b/testhal/STM32F1xx/USB_MSC/Makefile
index b98b34374..651b7b346 100644
--- a/testhal/STM32/USB_MSC/Makefile
+++ b/testhal/STM32F1xx/USB_MSC/Makefile
@@ -52,18 +52,18 @@ endif
# Define project name here
PROJECT = ch
-# Define linker script file here
-LDSCRIPT= ch.ld
-
-# Imported source files
+# Imported source files and paths
CHIBIOS = ../../..
include $(CHIBIOS)/boards/OLIMEX_STM32_P103/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32/platform.mk
+include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32/port.mk
+include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/test/test.mk
+# Define linker script file here
+LDSCRIPT= $(PORTLD)/STM32F103xB.ld
+
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
@@ -75,7 +75,7 @@ CSRC = $(PORTSRC) \
$(CHIBIOS)/os/various/usb_msc.c \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
- main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32/USB_MSC/chconf.h b/testhal/STM32F1xx/USB_MSC/chconf.h
index c9c4c286a..c9c4c286a 100644
--- a/testhal/STM32/USB_MSC/chconf.h
+++ b/testhal/STM32F1xx/USB_MSC/chconf.h
diff --git a/testhal/STM32/USB_MSC/halconf.h b/testhal/STM32F1xx/USB_MSC/halconf.h
index 2302e0179..2302e0179 100644
--- a/testhal/STM32/USB_MSC/halconf.h
+++ b/testhal/STM32F1xx/USB_MSC/halconf.h
diff --git a/testhal/STM32/USB_MSC/main.c b/testhal/STM32F1xx/USB_MSC/main.c
index 1bdda7a7d..1bdda7a7d 100644
--- a/testhal/STM32/USB_MSC/main.c
+++ b/testhal/STM32F1xx/USB_MSC/main.c
diff --git a/testhal/STM32/USB_MSC/mcuconf.h b/testhal/STM32F1xx/USB_MSC/mcuconf.h
index 558c0773d..558c0773d 100644
--- a/testhal/STM32/USB_MSC/mcuconf.h
+++ b/testhal/STM32F1xx/USB_MSC/mcuconf.h