aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/TIVA
diff options
context:
space:
mode:
authormarcoveeneman <marco-veeneman@hotmail.com>2015-04-16 19:19:03 +0200
committermarcoveeneman <marco-veeneman@hotmail.com>2015-04-16 19:19:03 +0200
commit23c2cabf28f94fc4a32b7013f29c35cbeee31904 (patch)
tree1d6af933d31e4bf509692e76ac42415b13d3cd28 /testhal/TIVA
parent9d14e38afea0e28e66deb5abe182751b802ceed9 (diff)
downloadChibiOS-Contrib-23c2cabf28f94fc4a32b7013f29c35cbeee31904.tar.gz
ChibiOS-Contrib-23c2cabf28f94fc4a32b7013f29c35cbeee31904.tar.bz2
ChibiOS-Contrib-23c2cabf28f94fc4a32b7013f29c35cbeee31904.zip
Tiva. Updated makefiles for Tiva demos and testhal.
Diffstat (limited to 'testhal/TIVA')
-rw-r--r--testhal/TIVA/TM4C123x/EXT/Makefile36
-rw-r--r--testhal/TIVA/TM4C123x/GPT/Makefile35
-rw-r--r--testhal/TIVA/TM4C123x/I2C/Makefile38
-rw-r--r--testhal/TIVA/TM4C123x/PWM/Makefile37
-rw-r--r--testhal/TIVA/TM4C123x/SPI/Makefile37
5 files changed, 123 insertions, 60 deletions
diff --git a/testhal/TIVA/TM4C123x/EXT/Makefile b/testhal/TIVA/TM4C123x/EXT/Makefile
index e3845c1..43de29b 100644
--- a/testhal/TIVA/TM4C123x/EXT/Makefile
+++ b/testhal/TIVA/TM4C123x/EXT/Makefile
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
endif
# C specific options here (added to USE_OPT).
@@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
+# Linker extra options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
USE_LTO = yes
@@ -58,9 +63,9 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
- USE_FPU = no
+ USE_FPU = hard
endif
#
@@ -76,25 +81,31 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../../..
+# Startup files.
+include $(CHIBIOS)/community/os/common/ports/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.mk
include $(CHIBIOS)/community/os/hal/ports/TIVA/TM4C123x/platform.mk
+include $(CHIBIOS)/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
+# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/community/os/rt/ports/ARMCMx/compilers/GCC/mk/port_tm4c123x.mk
+include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+# Other files (optional).
# Define linker script file here
-LDSCRIPT= $(PORTLD)/TM4C123xH6.ld
+LDSCRIPT= $(STARTUPLD)/TM4C123xH6.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
@@ -122,10 +133,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
#
@@ -149,6 +160,7 @@ LD = $(TRGT)gcc
#LD = $(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
+AR = $(TRGT)ar
OD = $(TRGT)objdump
SZ = $(TRGT)size
HEX = $(CP) -O ihex
diff --git a/testhal/TIVA/TM4C123x/GPT/Makefile b/testhal/TIVA/TM4C123x/GPT/Makefile
index abbd840..dde090d 100644
--- a/testhal/TIVA/TM4C123x/GPT/Makefile
+++ b/testhal/TIVA/TM4C123x/GPT/Makefile
@@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
+# Linker extra options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
USE_LTO = yes
@@ -58,9 +63,9 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
- USE_FPU = no
+ USE_FPU = hard
endif
#
@@ -76,25 +81,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../../..
+# Startup files.
+include $(CHIBIOS)/community/os/common/ports/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.mk
include $(CHIBIOS)/community/os/hal/ports/TIVA/TM4C123x/platform.mk
+include $(CHIBIOS)/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
+# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/community/os/rt/ports/ARMCMx/compilers/GCC/mk/port_tm4c123x.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
-LDSCRIPT= $(PORTLD)/TM4C123xH6.ld
+LDSCRIPT= $(STARTUPLD)/TM4C123xH6.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
@@ -122,10 +134,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
#
@@ -149,6 +161,7 @@ LD = $(TRGT)gcc
#LD = $(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
+AR = $(TRGT)ar
OD = $(TRGT)objdump
SZ = $(TRGT)size
HEX = $(CP) -O ihex
diff --git a/testhal/TIVA/TM4C123x/I2C/Makefile b/testhal/TIVA/TM4C123x/I2C/Makefile
index 4123eb6..dde090d 100644
--- a/testhal/TIVA/TM4C123x/I2C/Makefile
+++ b/testhal/TIVA/TM4C123x/I2C/Makefile
@@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
+# Linker extra options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
USE_LTO = yes
@@ -58,9 +63,9 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
- USE_FPU = no
+ USE_FPU = hard
endif
#
@@ -76,27 +81,33 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../../..
+# Startup files.
+include $(CHIBIOS)/community/os/common/ports/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.mk
include $(CHIBIOS)/community/os/hal/ports/TIVA/TM4C123x/platform.mk
+include $(CHIBIOS)/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
+# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/community/os/rt/ports/ARMCMx/compilers/GCC/mk/port_tm4c123x.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
-LDSCRIPT= $(PORTLD)/TM4C123xH6.ld
+LDSCRIPT= $(STARTUPLD)/TM4C123xH6.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) \
- main.c \
- $(CHIBIOS)/os/various/chprintf.c
+ $(TESTSRC) \
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
@@ -123,10 +134,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
#
@@ -150,6 +161,7 @@ LD = $(TRGT)gcc
#LD = $(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
+AR = $(TRGT)ar
OD = $(TRGT)objdump
SZ = $(TRGT)size
HEX = $(CP) -O ihex
diff --git a/testhal/TIVA/TM4C123x/PWM/Makefile b/testhal/TIVA/TM4C123x/PWM/Makefile
index e3845c1..dde090d 100644
--- a/testhal/TIVA/TM4C123x/PWM/Makefile
+++ b/testhal/TIVA/TM4C123x/PWM/Makefile
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
endif
# C specific options here (added to USE_OPT).
@@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
+# Linker extra options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
USE_LTO = yes
@@ -58,9 +63,9 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
- USE_FPU = no
+ USE_FPU = hard
endif
#
@@ -76,25 +81,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../../..
+# Startup files.
+include $(CHIBIOS)/community/os/common/ports/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.mk
include $(CHIBIOS)/community/os/hal/ports/TIVA/TM4C123x/platform.mk
+include $(CHIBIOS)/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
+# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/community/os/rt/ports/ARMCMx/compilers/GCC/mk/port_tm4c123x.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
-LDSCRIPT= $(PORTLD)/TM4C123xH6.ld
+LDSCRIPT= $(STARTUPLD)/TM4C123xH6.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
@@ -122,10 +134,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
#
@@ -149,6 +161,7 @@ LD = $(TRGT)gcc
#LD = $(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
+AR = $(TRGT)ar
OD = $(TRGT)objdump
SZ = $(TRGT)size
HEX = $(CP) -O ihex
diff --git a/testhal/TIVA/TM4C123x/SPI/Makefile b/testhal/TIVA/TM4C123x/SPI/Makefile
index e3845c1..dde090d 100644
--- a/testhal/TIVA/TM4C123x/SPI/Makefile
+++ b/testhal/TIVA/TM4C123x/SPI/Makefile
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
endif
# C specific options here (added to USE_OPT).
@@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
+# Linker extra options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
USE_LTO = yes
@@ -58,9 +63,9 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
- USE_FPU = no
+ USE_FPU = hard
endif
#
@@ -76,25 +81,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../../..
+# Startup files.
+include $(CHIBIOS)/community/os/common/ports/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.mk
include $(CHIBIOS)/community/os/hal/ports/TIVA/TM4C123x/platform.mk
+include $(CHIBIOS)/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
+# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/community/os/rt/ports/ARMCMx/compilers/GCC/mk/port_tm4c123x.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
-LDSCRIPT= $(PORTLD)/TM4C123xH6.ld
+LDSCRIPT= $(STARTUPLD)/TM4C123xH6.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
@@ -122,10 +134,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
#
@@ -149,6 +161,7 @@ LD = $(TRGT)gcc
#LD = $(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
+AR = $(TRGT)ar
OD = $(TRGT)objdump
SZ = $(TRGT)size
HEX = $(CP) -O ihex