From f215593479abba0b08e1b94794fb367d2549bab2 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 28 Mar 2015 11:56:07 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7824 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/STM32/NIL-STM32F051-DISCOVERY/.cproject | 11 +++-- demos/STM32/NIL-STM32F051-DISCOVERY/Makefile | 26 ++++++---- demos/STM32/RT-STM32F051-DISCOVERY/.cproject | 12 +++-- demos/STM32/RT-STM32F051-DISCOVERY/Makefile | 24 ++++++---- demos/STM32/RT-STM32F072-DISCOVERY/.cproject | 10 ++-- demos/STM32/RT-STM32F072-DISCOVERY/Makefile | 24 ++++++---- demos/various/NIL-ARMCM0-GENERIC/.cproject | 11 +++-- demos/various/NIL-ARMCM0-GENERIC/Makefile | 32 +++++++++---- demos/various/NIL-ARMCM0-GENERIC/ch.ld | 47 ------------------- demos/various/NIL-ARMCM4-GENERIC/Makefile | 6 +++ demos/various/NIL-ARMCM4-GENERIC/ch.ld | 47 ------------------- demos/various/RT-ARMCM0-GENERIC/Makefile | 35 +++++++++----- demos/various/RT-ARMCM0-GENERIC/ch.ld | 47 ------------------- demos/various/RT-ARMCM4-GENERIC/Makefile | 6 +++ .../compilers/GCC/mk/port_generic_cm0.mk | 12 ----- .../ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk | 15 ------ .../ports/ARMCMx/compilers/GCC/mk/port_v6m.mk | 8 ++++ .../compilers/GCC/mk/port_generic_cm0.mk | 12 ----- .../ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk | 15 ------ .../ports/ARMCMx/compilers/GCC/mk/port_v6m.mk | 8 ++++ testhal/STM32/STM32F0xx/ADC/.cproject | 1 + testhal/STM32/STM32F0xx/ADC/Makefile | 24 ++++++---- testhal/STM32/STM32F0xx/EXT/Makefile | 24 ++++++---- testhal/STM32/STM32F0xx/IRQ_STORM/Makefile | 24 ++++++---- testhal/STM32/STM32F0xx/PWM-ICU/Makefile | 24 ++++++---- testhal/STM32/STM32F0xx/SPI/Makefile | 24 ++++++---- testhal/STM32/STM32F0xx/UART/Makefile | 24 ++++++---- testhal/STM32/STM32F0xx/USB_CDC/Makefile | 24 ++++++---- 28 files changed, 254 insertions(+), 323 deletions(-) delete mode 100644 demos/various/NIL-ARMCM0-GENERIC/ch.ld delete mode 100644 demos/various/NIL-ARMCM4-GENERIC/ch.ld delete mode 100644 demos/various/RT-ARMCM0-GENERIC/ch.ld delete mode 100644 os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk delete mode 100644 os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk create mode 100644 os/nil/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk delete mode 100644 os/rt/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk delete mode 100644 os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk create mode 100644 os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk diff --git a/demos/STM32/NIL-STM32F051-DISCOVERY/.cproject b/demos/STM32/NIL-STM32F051-DISCOVERY/.cproject index d13cd471f..1b7a3d8b5 100644 --- a/demos/STM32/NIL-STM32F051-DISCOVERY/.cproject +++ b/demos/STM32/NIL-STM32F051-DISCOVERY/.cproject @@ -1,7 +1,5 @@ - - - + @@ -43,7 +41,11 @@ - + + + + + @@ -170,4 +172,5 @@ + diff --git a/demos/STM32/NIL-STM32F051-DISCOVERY/Makefile b/demos/STM32/NIL-STM32F051-DISCOVERY/Makefile index 70d39b9c6..29bf22bf8 100644 --- a/demos/STM32/NIL-STM32F051-DISCOVERY/Makefile +++ b/demos/STM32/NIL-STM32F051-DISCOVERY/Makefile @@ -76,26 +76,32 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. +# Startup files. +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk +# HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/osal/nil/osal.mk +# RTOS files (optional). include $(CHIBIOS)/os/nil/nil.mk -include $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk -#include $(CHIBIOS)/test/rt/test.mk +include $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk +# Other files (optional). +include $(CHIBIOS)/test/nil/test.mk # Define linker script file here -LDSCRIPT= $(PORTLD)/STM32F051x8.ld +LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ - $(TESTSRC) \ - $(HALSRC) \ + $(PORTSRC) \ $(OSALSRC) \ + $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -123,10 +129,10 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(CHIBIOS)/os/various # diff --git a/demos/STM32/RT-STM32F051-DISCOVERY/.cproject b/demos/STM32/RT-STM32F051-DISCOVERY/.cproject index 1f5f1c985..314cbc69d 100644 --- a/demos/STM32/RT-STM32F051-DISCOVERY/.cproject +++ b/demos/STM32/RT-STM32F051-DISCOVERY/.cproject @@ -1,7 +1,5 @@ - - - + @@ -39,7 +37,7 @@ - + @@ -48,5 +46,9 @@ - + + + + + diff --git a/demos/STM32/RT-STM32F051-DISCOVERY/Makefile b/demos/STM32/RT-STM32F051-DISCOVERY/Makefile index 126b26e1e..47a3e1a49 100644 --- a/demos/STM32/RT-STM32F051-DISCOVERY/Makefile +++ b/demos/STM32/RT-STM32F051-DISCOVERY/Makefile @@ -76,26 +76,32 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. +# Startup files. +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk +# HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk +# RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk +# Other files (optional). include $(CHIBIOS)/test/rt/test.mk # Define linker script file here -LDSCRIPT= $(PORTLD)/STM32F051x8.ld +LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ - $(TESTSRC) \ - $(HALSRC) \ + $(PORTSRC) \ $(OSALSRC) \ + $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -123,10 +129,10 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(CHIBIOS)/os/various # diff --git a/demos/STM32/RT-STM32F072-DISCOVERY/.cproject b/demos/STM32/RT-STM32F072-DISCOVERY/.cproject index 1daaf12c4..b3f0f0d55 100644 --- a/demos/STM32/RT-STM32F072-DISCOVERY/.cproject +++ b/demos/STM32/RT-STM32F072-DISCOVERY/.cproject @@ -1,7 +1,5 @@ - - - + @@ -48,5 +46,9 @@ - + + + + + diff --git a/demos/STM32/RT-STM32F072-DISCOVERY/Makefile b/demos/STM32/RT-STM32F072-DISCOVERY/Makefile index 48a66b249..5a9309c91 100644 --- a/demos/STM32/RT-STM32F072-DISCOVERY/Makefile +++ b/demos/STM32/RT-STM32F072-DISCOVERY/Makefile @@ -76,26 +76,32 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. +# Startup files. +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk +# HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/boards/ST_STM32F072B_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F072B_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk +# RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk +# Other files (optional). include $(CHIBIOS)/test/rt/test.mk # Define linker script file here -LDSCRIPT= $(PORTLD)/STM32F072xB.ld +LDSCRIPT= $(STARTUPLD)/STM32F072xB.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ - $(TESTSRC) \ - $(HALSRC) \ + $(PORTSRC) \ $(OSALSRC) \ + $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -123,10 +129,10 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(CHIBIOS)/os/various # diff --git a/demos/various/NIL-ARMCM0-GENERIC/.cproject b/demos/various/NIL-ARMCM0-GENERIC/.cproject index 57cc581e4..9109f1821 100644 --- a/demos/various/NIL-ARMCM0-GENERIC/.cproject +++ b/demos/various/NIL-ARMCM0-GENERIC/.cproject @@ -1,7 +1,5 @@ - - - + @@ -48,5 +46,10 @@ - + + + + + + diff --git a/demos/various/NIL-ARMCM0-GENERIC/Makefile b/demos/various/NIL-ARMCM0-GENERIC/Makefile index fde34f683..30a51f26b 100644 --- a/demos/various/NIL-ARMCM0-GENERIC/Makefile +++ b/demos/various/NIL-ARMCM0-GENERIC/Makefile @@ -76,16 +76,32 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. +# Startup files. +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk +# HAL-OSAL files (optional). +#include $(CHIBIOS)/os/hal/hal.mk +#include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk +#include $(CHIBIOS)/os/hal/boards/ST_STM32F072B_DISCOVERY/board.mk +#include $(CHIBIOS)/os/hal/osal/nil/osal.mk +# RTOS files (optional). include $(CHIBIOS)/os/nil/nil.mk -include $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk +include $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk +# Other files (optional). +#include $(CHIBIOS)/test/nil/test.mk # Define linker script file here -LDSCRIPT = ch.ld +LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ + $(PORTSRC) \ + $(OSALSRC) \ + $(HALSRC) \ + $(PLATFORMSRC) \ + $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -113,13 +129,11 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) - -# Make this point to your CMSIS and chparams.h headers. -INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST \ - $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F0xx +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ + $(CHIBIOS)/os/various # # Project, sources and paths diff --git a/demos/various/NIL-ARMCM0-GENERIC/ch.ld b/demos/various/NIL-ARMCM0-GENERIC/ch.ld deleted file mode 100644 index d04a6c4ed..000000000 --- a/demos/various/NIL-ARMCM0-GENERIC/ch.ld +++ /dev/null @@ -1,47 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * Generic device memory setup, customize it for your device. - */ -MEMORY -{ - flash : org = 0x08000000, len = 64k - ram0 : org = 0x20000000, len = 8k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -INCLUDE rules.ld diff --git a/demos/various/NIL-ARMCM4-GENERIC/Makefile b/demos/various/NIL-ARMCM4-GENERIC/Makefile index 7f1879aa5..860e36ae7 100644 --- a/demos/various/NIL-ARMCM4-GENERIC/Makefile +++ b/demos/various/NIL-ARMCM4-GENERIC/Makefile @@ -208,3 +208,9 @@ ULIBS = RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC include $(RULESPATH)/rules.mk + +############################################################################## +# MISRA check rule, requires PCLint and the setup files, not provided. +# +misra: + @lint-nt -v -w3 $(DEFS) pclint/co-gcc.lnt pclint/au-misra3.lnt pclint/waivers.lnt $(IINCDIR) $(CSRC) &> misra.txt diff --git a/demos/various/NIL-ARMCM4-GENERIC/ch.ld b/demos/various/NIL-ARMCM4-GENERIC/ch.ld deleted file mode 100644 index d04a6c4ed..000000000 --- a/demos/various/NIL-ARMCM4-GENERIC/ch.ld +++ /dev/null @@ -1,47 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * Generic device memory setup, customize it for your device. - */ -MEMORY -{ - flash : org = 0x08000000, len = 64k - ram0 : org = 0x20000000, len = 8k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -INCLUDE rules.ld diff --git a/demos/various/RT-ARMCM0-GENERIC/Makefile b/demos/various/RT-ARMCM0-GENERIC/Makefile index dfd7b0106..b16c044e9 100644 --- a/demos/various/RT-ARMCM0-GENERIC/Makefile +++ b/demos/various/RT-ARMCM0-GENERIC/Makefile @@ -54,7 +54,7 @@ endif # Stack size to be allocated to the Cortex-M process stack. This stack is # the stack used by the main() thread. ifeq ($(USE_PROCESS_STACKSIZE),) - USE_PROCESS_STACKSIZE = 0x400 + USE_PROCESS_STACKSIZE = 0x200 endif # Stack size to the allocated to the Cortex-M main/exceptions stack. This @@ -76,16 +76,32 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. +# Startup files. +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk +# HAL-OSAL files (optional). +#include $(CHIBIOS)/os/hal/hal.mk +#include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk +#include $(CHIBIOS)/os/hal/boards/ST_STM32F072B_DISCOVERY/board.mk +#include $(CHIBIOS)/os/hal/osal/rt/osal.mk +# RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk +# Other files (optional). +#include $(CHIBIOS)/test/rt/test.mk # Define linker script file here -LDSCRIPT= ch.ld +LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ + $(PORTSRC) \ + $(OSALSRC) \ + $(HALSRC) \ + $(PLATFORMSRC) \ + $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -113,14 +129,11 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -# List of the standard inclusion directories. -INCDIR = $(PORTINC) $(KERNINC) - -# Make this point to your CMSIS and chparams.h headers. -INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST \ - $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F0xx +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ + $(CHIBIOS)/os/various # # Project, sources and paths diff --git a/demos/various/RT-ARMCM0-GENERIC/ch.ld b/demos/various/RT-ARMCM0-GENERIC/ch.ld deleted file mode 100644 index d04a6c4ed..000000000 --- a/demos/various/RT-ARMCM0-GENERIC/ch.ld +++ /dev/null @@ -1,47 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * Generic device memory setup, customize it for your device. - */ -MEMORY -{ - flash : org = 0x08000000, len = 64k - ram0 : org = 0x20000000, len = 8k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -INCLUDE rules.ld diff --git a/demos/various/RT-ARMCM4-GENERIC/Makefile b/demos/various/RT-ARMCM4-GENERIC/Makefile index cbfde6f61..0c834834c 100644 --- a/demos/various/RT-ARMCM4-GENERIC/Makefile +++ b/demos/various/RT-ARMCM4-GENERIC/Makefile @@ -208,3 +208,9 @@ ULIBS = RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC include $(RULESPATH)/rules.mk + +############################################################################## +# MISRA check rule, requires PCLint and the setup files, not provided. +# +misra: + @lint-nt -v -w3 $(DEFS) pclint/co-gcc.lnt pclint/au-misra3.lnt pclint/waivers.lnt $(IINCDIR) $(CSRC) &> misra.txt diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk deleted file mode 100644 index 7cdf3f5f1..000000000 --- a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk +++ /dev/null @@ -1,12 +0,0 @@ -# List of the ChibiOS/NIL Cortex-M0 generic port files. -PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ - $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c \ - ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore.c \ - ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore_v6m.c - -PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s \ - $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v6m.s - -PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \ - ${CHIBIOS}/os/nil/ports/ARMCMx \ - ${CHIBIOS}/os/nil/ports/ARMCMx/compilers/GCC diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk deleted file mode 100644 index 2d85ceda4..000000000 --- a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk +++ /dev/null @@ -1,15 +0,0 @@ -# List of the ChibiOS/NIL Cortex-M0 STM32F0xx port files. -include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk - -PORTSRC = $(STARTUPSRC) \ - $(CHIBIOS)/os/nil/ports/ARMCMx/nilcore.c \ - $(CHIBIOS)/os/nil/ports/ARMCMx/nilcore_v6m.c - -PORTASM = $(STARTUPASM) \ - $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v6m.s - -PORTINC = $(STARTUPINC) \ - $(CHIBIOS)/os/nil/ports/ARMCMx \ - $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC - -PORTLD = $(STARTUPLD) diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk new file mode 100644 index 000000000..6fa7d52ea --- /dev/null +++ b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk @@ -0,0 +1,8 @@ +# List of the ChibiOS/NIL ARMv6M generic port files. +PORTSRC = $(CHIBIOS)/os/nil/ports/ARMCMx/nilcore.c \ + $(CHIBIOS)/os/nil/ports/ARMCMx/nilcore_v6m.c + +PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v6m.s + +PORTINC = $(CHIBIOS)/os/nil/ports/ARMCMx \ + $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC diff --git a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk b/os/rt/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk deleted file mode 100644 index 904af6a08..000000000 --- a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk +++ /dev/null @@ -1,12 +0,0 @@ -# List of the ChibiOS/RT Cortex-M0 generic port files. -PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ - $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c \ - $(CHIBIOS)/os/rt/ports/ARMCMx/chcore.c \ - $(CHIBIOS)/os/rt/ports/ARMCMx/chcore_v6m.c - -PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s \ - $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s - -PORTINC = $(CHIBIOS)/os/ext/CMSIS/include \ - $(CHIBIOS)/os/rt/ports/ARMCMx \ - $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC diff --git a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk b/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk deleted file mode 100644 index bd3e68c02..000000000 --- a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk +++ /dev/null @@ -1,15 +0,0 @@ -# List of the ChibiOS/RT Cortex-M0 STM32F0xx port files. -include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk - -PORTSRC = $(STARTUPSRC) \ - $(CHIBIOS)/os/rt/ports/ARMCMx/chcore.c \ - $(CHIBIOS)/os/rt/ports/ARMCMx/chcore_v6m.c - -PORTASM = $(STARTUPASM) \ - $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s - -PORTINC = $(STARTUPINC) \ - $(CHIBIOS)/os/rt/ports/ARMCMx \ - $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC - -PORTLD = $(STARTUPLD) diff --git a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk b/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk new file mode 100644 index 000000000..f9c0fd521 --- /dev/null +++ b/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk @@ -0,0 +1,8 @@ +# List of the ChibiOS/RT Cortex-M0 STM32F0xx port files. +PORTSRC = $(CHIBIOS)/os/rt/ports/ARMCMx/chcore.c \ + $(CHIBIOS)/os/rt/ports/ARMCMx/chcore_v6m.c + +PORTASM = $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s + +PORTINC = $(CHIBIOS)/os/rt/ports/ARMCMx \ + $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC diff --git a/testhal/STM32/STM32F0xx/ADC/.cproject b/testhal/STM32/STM32F0xx/ADC/.cproject index fcdc3e128..9f6a18d13 100644 --- a/testhal/STM32/STM32F0xx/ADC/.cproject +++ b/testhal/STM32/STM32F0xx/ADC/.cproject @@ -51,4 +51,5 @@ + diff --git a/testhal/STM32/STM32F0xx/ADC/Makefile b/testhal/STM32/STM32F0xx/ADC/Makefile index ca5015c2c..40bdd6a62 100644 --- a/testhal/STM32/STM32F0xx/ADC/Makefile +++ b/testhal/STM32/STM32F0xx/ADC/Makefile @@ -76,26 +76,32 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../../.. +# Startup files. +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk +# HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk +# RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk +# Other files (optional). #include $(CHIBIOS)/test/rt/test.mk # Define linker script file here -LDSCRIPT= $(PORTLD)/STM32F051x8.ld +LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ - $(TESTSRC) \ - $(HALSRC) \ + $(PORTSRC) \ $(OSALSRC) \ + $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -123,10 +129,10 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(CHIBIOS)/os/various # diff --git a/testhal/STM32/STM32F0xx/EXT/Makefile b/testhal/STM32/STM32F0xx/EXT/Makefile index ca5015c2c..40bdd6a62 100644 --- a/testhal/STM32/STM32F0xx/EXT/Makefile +++ b/testhal/STM32/STM32F0xx/EXT/Makefile @@ -76,26 +76,32 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../../.. +# Startup files. +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk +# HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk +# RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk +# Other files (optional). #include $(CHIBIOS)/test/rt/test.mk # Define linker script file here -LDSCRIPT= $(PORTLD)/STM32F051x8.ld +LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ - $(TESTSRC) \ - $(HALSRC) \ + $(PORTSRC) \ $(OSALSRC) \ + $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -123,10 +129,10 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(CHIBIOS)/os/various # diff --git a/testhal/STM32/STM32F0xx/IRQ_STORM/Makefile b/testhal/STM32/STM32F0xx/IRQ_STORM/Makefile index ca5015c2c..40bdd6a62 100644 --- a/testhal/STM32/STM32F0xx/IRQ_STORM/Makefile +++ b/testhal/STM32/STM32F0xx/IRQ_STORM/Makefile @@ -76,26 +76,32 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../../.. +# Startup files. +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk +# HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk +# RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk +# Other files (optional). #include $(CHIBIOS)/test/rt/test.mk # Define linker script file here -LDSCRIPT= $(PORTLD)/STM32F051x8.ld +LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ - $(TESTSRC) \ - $(HALSRC) \ + $(PORTSRC) \ $(OSALSRC) \ + $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -123,10 +129,10 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(CHIBIOS)/os/various # diff --git a/testhal/STM32/STM32F0xx/PWM-ICU/Makefile b/testhal/STM32/STM32F0xx/PWM-ICU/Makefile index ca5015c2c..40bdd6a62 100644 --- a/testhal/STM32/STM32F0xx/PWM-ICU/Makefile +++ b/testhal/STM32/STM32F0xx/PWM-ICU/Makefile @@ -76,26 +76,32 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../../.. +# Startup files. +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk +# HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk +# RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk +# Other files (optional). #include $(CHIBIOS)/test/rt/test.mk # Define linker script file here -LDSCRIPT= $(PORTLD)/STM32F051x8.ld +LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ - $(TESTSRC) \ - $(HALSRC) \ + $(PORTSRC) \ $(OSALSRC) \ + $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -123,10 +129,10 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(CHIBIOS)/os/various # diff --git a/testhal/STM32/STM32F0xx/SPI/Makefile b/testhal/STM32/STM32F0xx/SPI/Makefile index ca5015c2c..40bdd6a62 100644 --- a/testhal/STM32/STM32F0xx/SPI/Makefile +++ b/testhal/STM32/STM32F0xx/SPI/Makefile @@ -76,26 +76,32 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../../.. +# Startup files. +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk +# HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk +# RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk +# Other files (optional). #include $(CHIBIOS)/test/rt/test.mk # Define linker script file here -LDSCRIPT= $(PORTLD)/STM32F051x8.ld +LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ - $(TESTSRC) \ - $(HALSRC) \ + $(PORTSRC) \ $(OSALSRC) \ + $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -123,10 +129,10 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(CHIBIOS)/os/various # diff --git a/testhal/STM32/STM32F0xx/UART/Makefile b/testhal/STM32/STM32F0xx/UART/Makefile index ca5015c2c..40bdd6a62 100644 --- a/testhal/STM32/STM32F0xx/UART/Makefile +++ b/testhal/STM32/STM32F0xx/UART/Makefile @@ -76,26 +76,32 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../../.. +# Startup files. +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk +# HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk +# RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk +# Other files (optional). #include $(CHIBIOS)/test/rt/test.mk # Define linker script file here -LDSCRIPT= $(PORTLD)/STM32F051x8.ld +LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ - $(TESTSRC) \ - $(HALSRC) \ + $(PORTSRC) \ $(OSALSRC) \ + $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -123,10 +129,10 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(CHIBIOS)/os/various # diff --git a/testhal/STM32/STM32F0xx/USB_CDC/Makefile b/testhal/STM32/STM32F0xx/USB_CDC/Makefile index cb542feea..f5112f672 100644 --- a/testhal/STM32/STM32F0xx/USB_CDC/Makefile +++ b/testhal/STM32/STM32F0xx/USB_CDC/Makefile @@ -76,26 +76,32 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../../.. +# Startup files. +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk +# HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/boards/ST_STM32F072B_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F072B_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk +# RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk +# Other files (optional). include $(CHIBIOS)/test/rt/test.mk # Define linker script file here -LDSCRIPT= $(PORTLD)/STM32F072xB.ld +LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ - $(TESTSRC) \ - $(HALSRC) \ + $(PORTSRC) \ $(OSALSRC) \ + $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ + $(TESTSRC) \ $(CHIBIOS)/os/various/shell.c \ $(CHIBIOS)/os/hal/lib/streams/memstreams.c \ $(CHIBIOS)/os/hal/lib/streams/chprintf.c \ @@ -126,10 +132,10 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various #