diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-10-01 00:44:40 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-10-01 00:45:02 +1000 |
commit | f90ea57bff091832c7b52b3825057ac20ded1f01 (patch) | |
tree | 83d8e0e8b9917584e7f216470cd0fb8efa1a975e /boards/base/Olimex-SAM7EX256-GE8/example | |
parent | b1b00b1cc9780db403bba2f21837fef20b9d8e8c (diff) | |
download | uGFX-f90ea57bff091832c7b52b3825057ac20ded1f01.tar.gz uGFX-f90ea57bff091832c7b52b3825057ac20ded1f01.tar.bz2 uGFX-f90ea57bff091832c7b52b3825057ac20ded1f01.zip |
First ARM build to use the new makefile plus makefile updates
Diffstat (limited to 'boards/base/Olimex-SAM7EX256-GE8/example')
-rw-r--r-- | boards/base/Olimex-SAM7EX256-GE8/example/Makefile | 253 |
1 files changed, 56 insertions, 197 deletions
diff --git a/boards/base/Olimex-SAM7EX256-GE8/example/Makefile b/boards/base/Olimex-SAM7EX256-GE8/example/Makefile index e9fdde2d..aa11abad 100644 --- a/boards/base/Olimex-SAM7EX256-GE8/example/Makefile +++ b/boards/base/Olimex-SAM7EX256-GE8/example/Makefile @@ -1,205 +1,64 @@ -############################################################################## -# Build global options -# NOTE: Can be overridden externally. -# - -# Compiler options here. -ifeq ($(USE_OPT),) - # If you are using gcc V4.5.1 or older then replace -g with -ggdb -gstabs+ - # For debugging you probably want -O0 rather than -O2 - USE_OPT = -O0 -g -fomit-frame-pointer -mabi=apcs-gnu -endif - -# C specific options here (added to USE_OPT). -ifeq ($(USE_COPT),) - USE_COPT = -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 = no -endif - -# Enable this if you want to see the full log while compiling. -ifeq ($(USE_VERBOSE_COMPILE),) - USE_VERBOSE_COMPILE = no -endif - -# -# Build global options -############################################################################## - -############################################################################## -# Project, sources and paths -# - -# Define project name here -PROJECT = ch - -# Imported source files and paths for ChibiOS -CHIBIOS = ../ChibiOS -include $(CHIBIOS)/boards/OLIMEX_SAM7_EX256/board.mk -include $(CHIBIOS)/os/hal/platforms/AT91SAM7/platform.mk -include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/ports/GCC/ARM/AT91SAM7/port.mk -include $(CHIBIOS)/os/kernel/kernel.mk - -# We define a non standard linker script here just to give us some more stack space -# LDSCRIPT= $(PORTLD)/AT91SAM7X256.ld -LDSCRIPT= linker.ld - -# Imported source files and paths for uGFX -GFXLIB = ../uGFX -include $(GFXLIB)/gfx.mk -include $(GFXLIB)/boards/base/Olimex-SAM7EX256-GE8/board.mk - -# Where is our source code - alter these for your project. -# Either just include the demo makefile or add your own definitions -include $(GFXLIB)/demos/modules/gdisp/basics/demo.mk -#MYFILES = my-project-directory -#MYCSRC = $(MYFILES)/main.c -#MYDEFS = - -# C sources that can be compiled in ARM or THUMB mode depending on the global -# setting. -CSRC = $(PORTSRC) \ - $(KERNSRC) \ - $(TESTSRC) \ - $(HALSRC) \ - $(PLATFORMSRC) \ - $(BOARDSRC) \ - $(GFXSRC) \ - $(MYCSRC) - -# 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) \ - $(GFXINC) \ - $(MYFILES) - -# -# Project, sources and paths -############################################################################## - -############################################################################## -# Compiler settings -# - -MCU = arm7tdmi - -#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. -# If you are using gcc V4.5.1 or older then add -ggdb -gstabs+ to the LD line -LD = $(TRGT)gcc -#LD = $(TRGT)g++ -CP = $(TRGT)objcopy -AS = $(TRGT)gcc -x assembler-with-cpp -OD = $(TRGT)objdump -SZ = $(TRGT)size -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 +# Possible Targets: all clean Debug cleanDebug Release cleanRelease +############################################################################################## +# Settings # -# Compiler settings -############################################################################## -############################################################################## -# Start of default section -# - -# List all default C defines here, like -D_DEBUG=1 -DDEFS = $(GFXDEFS) - -# 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 -############################################################################## +# General settings + # See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables + OPT_VERBOSE_COMPILE = no + OPT_GENERATE_LISTINGS = yes + OPT_GENERATE_MAP = yes + OPT_COPY_EXE = no + OPT_LINK_OPTIMIZE = yes + OPT_NONSTANDARD_FLAGS = no + OPT_NATIVEOS = chibios + OPT_OS = chibios + +# uGFX settings + # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables + GFXLIB = ../uGFX + GFXBOARD = Olimex-SAM7EX256-GE8 + #GFXDRIVERS = multiple/uGFXnet + GFXDEMO = modules/gdisp/basics + +# ChibiOS settings +ifeq ($(OPT_OS),chibios) + # See $(GFXLIB)/tools/gmake_scripts/os_chibios.mk for the list of variables + CHIBIOS = ../ChibiOS + CHIBIOS_BOARD = OLIMEX_SAM7_EX256 + CHIBIOS_PLATFORM = AT91SAM7 + CHIBIOS_PORT = GCC/ARM/AT91SAM7 + CHIBIOS_DEFS = + #CHIBIOS_LDSCRIPT = $(PORTLD)/AT91SAM7X256.ld + # We define a non standard linker script here just to give us some more stack space + CHIBIOS_LDSCRIPT = linker.ld +endif -############################################################################## -# Start of user section +############################################################################################## +# Set these for your project # -# 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 = - +ARCH = arm-none-eabi- +SRCFLAGS = -ggdb -O0 +SRCFLAGS+= -mcpu=arm7tdmi -mabi=apcs-gnu -mno-thumb-interwork +CFLAGS = +CXXFLAGS = -fno-rtti +ASFLAGS = +LDFLAGS = -mcpu=arm7tdmi + +SRC = +DEFS = +LIBS = +INCPATH = +LIBPATH = +LDSCRIPT = + +############################################################################################## +# These should be at the end # -# End of user defines -############################################################################## -include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk +include $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk +include $(GFXLIB)/tools/gmake_scripts/os_$(OPT_OS).mk +include $(GFXLIB)/tools/gmake_scripts/compiler_gcc.mk +# *** EOF *** |