git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7829 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
Giovanni Di Sirio 2015-03-29 09:40:45 +00:00
parent a03316cd01
commit a4cef8ba42
8 changed files with 89 additions and 111 deletions

View File

@ -30,7 +30,7 @@ endif
# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
USE_LTO = no
USE_LTO = yes
endif
# If enabled, this option allows to compile the application in THUMB mode.
@ -105,26 +105,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../..
# Startup files.
include $(CHIBIOS)/os/common/ports/ARM/compilers/GCC/mk/startup_lpc214x.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/boards/OLIMEX_LPC_P2148/board.mk
include $(CHIBIOS)/os/hal/ports/LPC/LPC214x/platform.mk
include $(CHIBIOS)/os/hal/boards/OLIMEX_LPC_P2148/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/rt/ports/ARM/compilers/GCC/mk/port_lpc214x.mk
include $(CHIBIOS)/os/rt/ports/ARM/compilers/GCC/mk/port_generic.mk
# Other files (optional).
include $(CHIBIOS)/test/rt/test.mk
# Define linker script file here
LDSCRIPT = $(PORTLD)/LPC2148.ld
LDSCRIPT= $(STARTUPLD)/LPC2148.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
@ -152,10 +158,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
#

View File

@ -35,7 +35,7 @@ endif
# If enabled, this option allows to compile the application in THUMB mode.
ifeq ($(USE_THUMB),)
USE_THUMB = yes
USE_THUMB = no
endif
# Enable this if you want to see the full log while compiling.
@ -105,16 +105,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../..
# Startup files.
include $(CHIBIOS)/os/common/ports/ARM/compilers/GCC/mk/startup_lpc214x.mk
# HAL-OSAL files (optional).
#include $(CHIBIOS)/os/hal/hal.mk
#include $(CHIBIOS)/os/hal/ports/LPC/LPC214x/platform.mk
#include $(CHIBIOS)/os/hal/boards/OLIMEX_LPC_P2148/board.mk
#include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/rt/ports/ARM/compilers/GCC/mk/port_generic.mk
# Other files (optional).
#include $(CHIBIOS)/test/rt/test.mk
# Define linker script file here
LDSCRIPT= ch.ld
LDSCRIPT= $(STARTUPLD)/LPC2148.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
@ -142,13 +158,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 armparams.h header.
INCDIR += $(CHIBIOS)/os/common/ports/ARM/devices/LPC214x
INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
# Project, sources and paths

View File

@ -1,43 +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.
*/
/*
* LPC2148 memory setup.
*/
MEMORY
{
flash : org = 0x00000000, len = 512k - 12k
ram0 : org = 0x40000200, len = 32k - 0x200 - 288
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 stacks. This stack accommodates the processing
of all exceptions and interrupts*/
REGION_ALIAS("STACKS_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

View File

@ -0,0 +1,9 @@
# List of the ChibiOS generic LPC214x file.
STARTUPSRC =
STARTUPASM = $(CHIBIOS)/os/common/ports/ARM/compilers/GCC/vectors.s \
$(CHIBIOS)/os/common/ports/ARM/compilers/GCC/crt0.s
STARTUPINC = ${CHIBIOS}/os/common/ports/ARM/devices/LPC214x
STARTUPLD = ${CHIBIOS}/os/common/ports/ARM/compilers/GCC/ld

View File

@ -1,9 +1,7 @@
# List of the ChibiOS/RT ARM generic port files.
PORTSRC = ${CHIBIOS}/os/rt/ports/ARM/chcore.c
PORTASM = $(CHIBIOS)/os/common/ports/ARM/compilers/GCC/vectors.s \
$(CHIBIOS)/os/common/ports/ARM/compilers/GCC/crt0.s \
$(CHIBIOS)/os/rt/ports/ARM/compilers/GCC/chcoreasm.s
PORTASM = $(CHIBIOS)/os/rt/ports/ARM/compilers/GCC/chcoreasm.s
PORTINC = ${CHIBIOS}/os/rt/ports/ARM \
${CHIBIOS}/os/rt/ports/ARM/compilers/GCC

View File

@ -1,12 +0,0 @@
# List of the ChibiOS/RT ARM LPC214x port files.
PORTSRC = ${CHIBIOS}/os/rt/ports/ARM/chcore.c
PORTASM = $(CHIBIOS)/os/common/ports/ARM/compilers/GCC/vectors.s \
$(CHIBIOS)/os/common/ports/ARM/compilers/GCC/crt0.s \
$(CHIBIOS)/os/rt/ports/ARM/compilers/GCC/chcoreasm.s
PORTINC = ${CHIBIOS}/os/common/ports/ARM/devices/LPC214x \
${CHIBIOS}/os/rt/ports/ARM \
${CHIBIOS}/os/rt/ports/ARM/compilers/GCC
PORTLD = ${CHIBIOS}/os/common/ports/ARM/compilers/GCC/ld

View File

@ -65,7 +65,7 @@ endif
# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
USE_FPU = hard
USE_FPU = no
endif
#
@ -81,25 +81,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../..
# Startup files.
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/templates/platform.mk
#include $(CHIBIOS)/os/hal/boards/xxxxxxx/board.mk
include $(CHIBIOS)/os/hal/templates/osal/osal.mk
# RTOS files (optional).
#include $(CHIBIOS)/os/rt/rt.mk
#include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
#include $(CHIBIOS)/test/rt/test.mk
# Define linker script file here
PORTLD = ${CHIBIOS}/os/common/ports/ARMCMx/compilers/GCC/ld
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \
$(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c
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
@ -127,14 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s
ASMSRC = $(PORTASM)
ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
${CHIBIOS}/os/ext/CMSIS/ST \
${CHIBIOS}/os/common/ports/ARMCMx/devices/STM32F4xx
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
$(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#

View File

@ -65,7 +65,7 @@ endif
# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
USE_FPU = hard
USE_FPU = no
endif
#
@ -81,26 +81,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../..
# Startup files.
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f3xx.mk
# HAL-OSAL files (optional).
#include $(CHIBIOS)/os/hal/hal.mk
#include $(CHIBIOS)/os/hal/ports/STM32/STM32F3xx/platform.mk
#include $(CHIBIOS)/os/hal/boards/ST_STM32F3_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_cm4.mk
include $(CHIBIOS)/os/hal/osal/nil/osal.mk
include $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
#include $(CHIBIOS)/test/nil/test.mk
# Define linker script file here
PORTLD = ${CHIBIOS}/os/common/ports/ARMCMx/compilers/GCC/ld
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
LDSCRIPT= $(STARTUPLD)/STM32F303xC.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \
$(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c \
$(CHIBIOS)/os/nil/templates/nilcore.c
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
@ -128,14 +134,11 @@ TCSRC =
TCPPSRC =
# List ASM source files here
PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s
ASMSRC = $(PORTASM)
ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
${CHIBIOS}/os/ext/CMSIS/ST \
${CHIBIOS}/os/common/ports/ARMCMx/devices/STM32F4xx \
$(CHIBIOS)/os/nil/templates
INCDIR = $(PORTINC) $(KERNINC)
INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
# Project, sources and paths
@ -185,7 +188,7 @@ CPPWARN = -Wall -Wextra
#
# List all user C define here, like -D_DEBUG=1
UDEFS = -DSTM32F407xx
UDEFS = -DSTM32F303xC
# Define ASM defines here
UADEFS =