aboutsummaryrefslogtreecommitdiffstats
path: root/boards
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-10-01 00:44:40 +1000
committerinmarket <andrewh@inmarket.com.au>2014-10-01 00:45:02 +1000
commitf90ea57bff091832c7b52b3825057ac20ded1f01 (patch)
tree83d8e0e8b9917584e7f216470cd0fb8efa1a975e /boards
parentb1b00b1cc9780db403bba2f21837fef20b9d8e8c (diff)
downloaduGFX-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')
-rw-r--r--boards/base/Linux-Framebuffer/example/Makefile38
-rw-r--r--boards/base/Linux/example/Makefile38
-rw-r--r--boards/base/OSX/example/Makefile43
-rw-r--r--boards/base/Olimex-SAM7EX256-GE8/example/Makefile253
-rw-r--r--boards/base/Win32/example/Makefile67
5 files changed, 153 insertions, 286 deletions
diff --git a/boards/base/Linux-Framebuffer/example/Makefile b/boards/base/Linux-Framebuffer/example/Makefile
index 29b0a266..76b2022a 100644
--- a/boards/base/Linux-Framebuffer/example/Makefile
+++ b/boards/base/Linux-Framebuffer/example/Makefile
@@ -4,30 +4,37 @@
# Settings
#
-# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the meaning of these variables
-OPT_VERBOSE_COMPILE = no
-OPT_GENERATE_LISTINGS = yes
-OPT_GENERATE_MAP = yes
-OPT_COPY_EXE = no
-OPT_NATIVEOS = linux
-OPT_OS = linux
-
-# See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the meaning of these variables
-GFXLIB = ../uGFX
-GFXBOARD = Linux-Framebuffer
-#GFXDRIVERS = multiple/uGFXnet
-GFXDEMO = modules/gdisp/basics
+# 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_OS = linux
+
+# uGFX settings
+ # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables
+ GFXLIB = ../uGFX
+ GFXBOARD = Linux-Framebuffer
+ #GFXDRIVERS = multiple/uGFXnet
+ GFXDEMO = modules/gdisp/basics
+
+# Linux settings
+ # See $(GFXLIB)/tools/gmake_scripts/os_linux.mk for the list of variables
##############################################################################################
# Set these for your project
#
ARCH =
-SRCFLAGS = -m32 -ggdb -O0 -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm
+SRCFLAGS = -ggdb -O0
+SRCFLAGS+= -m32
CFLAGS =
CXXFLAGS =
ASFLAGS =
-LDFLAGS = -pthread
+LDFLAGS =
SRC =
DEFS =
@@ -40,5 +47,6 @@ LIBPATH =
#
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 ***
diff --git a/boards/base/Linux/example/Makefile b/boards/base/Linux/example/Makefile
index 87b80434..d6402c8a 100644
--- a/boards/base/Linux/example/Makefile
+++ b/boards/base/Linux/example/Makefile
@@ -4,30 +4,37 @@
# Settings
#
-# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the meaning of these variables
-OPT_VERBOSE_COMPILE = no
-OPT_GENERATE_LISTINGS = yes
-OPT_GENERATE_MAP = yes
-OPT_COPY_EXE = no
-OPT_NATIVEOS = linux
-OPT_OS = linux
-
-# See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the meaning of these variables
-GFXLIB = ../uGFX
-GFXBOARD = Linux
-#GFXDRIVERS = multiple/uGFXnet
-GFXDEMO = modules/gdisp/basics
+# 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_OS = linux
+
+# uGFX settings
+ # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables
+ GFXLIB = ../uGFX
+ GFXBOARD = Linux
+ #GFXDRIVERS = multiple/uGFXnet
+ GFXDEMO = modules/gdisp/basics
+
+# Linux settings
+ # See $(GFXLIB)/tools/gmake_scripts/os_linux.mk for the list of variables
##############################################################################################
# Set these for your project
#
ARCH =
-SRCFLAGS = -m32 -ggdb -O0 -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm
+SRCFLAGS = -ggdb -O0
+SRCFLAGS+= -m32
CFLAGS =
CXXFLAGS =
ASFLAGS =
-LDFLAGS = -pthread
+LDFLAGS =
SRC =
DEFS =
@@ -40,5 +47,6 @@ LIBPATH =
#
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 ***
diff --git a/boards/base/OSX/example/Makefile b/boards/base/OSX/example/Makefile
index d3502528..956608ff 100644
--- a/boards/base/OSX/example/Makefile
+++ b/boards/base/OSX/example/Makefile
@@ -4,33 +4,39 @@
# Settings
#
-# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the meaning of these variables
-OPT_VERBOSE_COMPILE = no
-OPT_GENERATE_LISTINGS = yes
-OPT_GENERATE_MAP = yes
-OPT_COPY_EXE = no
-OPT_NATIVEOS = osx
-OPT_OS = osx
-
-# See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the meaning of these variables
-GFXLIB = ../uGFX
-GFXBOARD = OSX
-#GFXDRIVERS = multiple/uGFXnet
-GFXDEMO = modules/gdisp/basics
+# 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_OS = osx
+
+# uGFX settings
+ # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables
+ GFXLIB = ../uGFX
+ GFXBOARD = OSX
+ #GFXDRIVERS = multiple/uGFXnet
+ GFXDEMO = modules/gdisp/basics
+
+# OSX settings
+ # See $(GFXLIB)/tools/gmake_scripts/os_osx.mk for the list of variables
+ OSX_SDK = /Developer/SDKs/MacOSX10.7.sdk
+ OSX_ARCH = -mmacosx-version-min=10.3 -arch i386
##############################################################################################
# Set these for your project
#
-OSX_SDK = /Developer/SDKs/MacOSX10.7.sdk
-OSX_ARCH = -mmacosx-version-min=10.3 -arch i386
-
ARCH =
-SRCFLAGS = -m32 -ggdb -O0 -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -isysroot $(OSX_SDK) $(OSX_ARCH)
+SRCFLAGS = -ggdb -O0
+SRCFLAGS+= -m32
CFLAGS =
CXXFLAGS =
ASFLAGS =
-LDFLAGS = -pthread -Wl,-syslibroot,$(OSX_SDK) $(OSX_ARCH)
+LDFLAGS =
SRC =
DEFS =
@@ -43,5 +49,6 @@ LIBPATH =
#
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 ***
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 ***
diff --git a/boards/base/Win32/example/Makefile b/boards/base/Win32/example/Makefile
index 502cf1ac..4bf6c603 100644
--- a/boards/base/Win32/example/Makefile
+++ b/boards/base/Win32/example/Makefile
@@ -4,33 +4,39 @@
# Settings
#
-# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the meaning of these variables
-OPT_VERBOSE_COMPILE = no
-OPT_GENERATE_LISTINGS = yes
-OPT_GENERATE_MAP = yes
-OPT_COPY_EXE = no
-OPT_NATIVEOS = win32
-OPT_OS = win32
-
-# See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the meaning of these variables
-GFXLIB = ../uGFX
-GFXBOARD = Win32
-#GFXDRIVERS = multiple/uGFXnet
-GFXDEMO = modules/gdisp/basics
-
-# Win32 - ChibiOS simulator
-ifeq ($(OPT_OS),chibios)
- # Required: Location of the ChibiOS code
- CHIBIOS = ../ChibiOS
+# 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
+ # For Win32 this variable can be set to "win32" (native win32 api) or "win32.chibios" (ChibiOS simulator).
+ OPT_OS = win32
+
+# uGFX settings
+ # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables
+ GFXLIB = ../uGFX
+ GFXBOARD = Win32
+ #GFXDRIVERS = multiple/uGFXnet
+ GFXDEMO = modules/gdisp/basics
+
+# ChibiOS settings
+ifeq ($(OPT_OS),win32.chibios)
+ # See $(GFXLIB)/tools/gmake_scripts/os_win32.chibios.mk for the list of variables
+ CHIBIOS = ../ChibiOS
endif
+# Win32 settings
+ # See $(GFXLIB)/tools/gmake_scripts/os_win32.mk for the list of variables
##############################################################################################
# Set these for your project
#
ARCH = i686-pc-mingw32-
-SRCFLAGS = -ggdb -O0 -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm
+SRCFLAGS = -ggdb -O0
CFLAGS =
CXXFLAGS =
ASFLAGS =
@@ -43,31 +49,10 @@ INCPATH =
LIBPATH =
##############################################################################################
-# Optional: Win32 - ChibiOS Simulator
-#
-
-ifeq ($(OPT_OS),chibios)
- include $(CHIBIOS)/boards/simulator/board.mk
- include $(CHIBIOS)/os/hal/hal.mk
- include $(CHIBIOS)/os/hal/platforms/Win32/platform.mk
- include $(CHIBIOS)/os/ports/GCC/SIMIA32/port.mk
- include $(CHIBIOS)/os/kernel/kernel.mk
- DEFS += SIMULATOR SHELL_USE_IPRINTF=FALSE
- INCPATH += $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC)
- # $(CHIBIOS)/os/various
- SRC += $(PORTSRC) \
- $(KERNSRC) \
- $(TESTSRC) \
- $(HALSRC) \
- $(PLATFORMSRC) \
- $(BOARDSRC)
-endif
-
-##############################################################################################
# These should be at the end
#
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 ***