From bbc7b6e039d179c92fe53a6ad522131e64412432 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 4 Oct 2014 17:12:33 +1000 Subject: Update to makefiles to support ChibiOS v3, making ARM thumb targets, CPU specific flags etc Also put license in the gmake master scripts. --- tools/gmake_scripts/compiler_gcc.mk | 226 +++++++++++++++++++++----------- tools/gmake_scripts/library_ugfx.mk | 7 + tools/gmake_scripts/os_chibios.mk | 50 +++++-- tools/gmake_scripts/os_linux.mk | 7 + tools/gmake_scripts/os_osx.mk | 10 +- tools/gmake_scripts/os_win32.chibios.mk | 7 + tools/gmake_scripts/os_win32.mk | 8 ++ tools/gmake_scripts/readme.txt | 12 ++ 8 files changed, 241 insertions(+), 86 deletions(-) (limited to 'tools/gmake_scripts') diff --git a/tools/gmake_scripts/compiler_gcc.mk b/tools/gmake_scripts/compiler_gcc.mk index 196e5d5a..bc3c216b 100644 --- a/tools/gmake_scripts/compiler_gcc.mk +++ b/tools/gmake_scripts/compiler_gcc.mk @@ -1,24 +1,33 @@ +# +# This file is subject to the terms of the GFX License. If a copy of +# the license was not distributed with this file, you can obtain one at: +# +# http://ugfx.org/license.html +# + +# # See readme.txt for the make API +# ifeq ($(basename $(OPT_OS)),win32) - # Nasty - must convert all paths into a format make can handle - PATHEXPAND := ARCH XCC XCXX XAS XLD XOC XOD PROJECT BUILDDIR SRC DEFS LIBS INCPATH LIBPATH $(PATHLIST) - - # First convert \'s to /'s - $(foreach var,$(PATHEXPAND),$(eval $(var):=$$(subst \,/,$($(var))))) - - # For cygwin gmake - need to convert all absolute paths (mingw gmake doesn't need this) - ifneq ($(findstring cygdrive,$(PATH)),) - DRIVELETTERS := a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - $(foreach drv,$(DRIVELETTERS),$(foreach var,$(PATHEXPAND),$(eval $(var):=$$(patsubst $(drv):%,/cygdrive/$(drv)%,$($(var)))))) - endif + # Nasty - must convert all paths into a format make can handle + PATHEXPAND := ARCH XCC XCXX XAS XLD XOC XOD XSZ PROJECT BUILDDIR SRC DEFS LIBS INCPATH LIBPATH $(PATHLIST) + + # First convert \'s to /'s + $(foreach var,$(PATHEXPAND),$(eval $(var):=$$(subst \,/,$($(var))))) + + # For cygwin gmake - need to convert all absolute paths (mingw gmake doesn't need this) + ifneq ($(findstring cygdrive,$(PATH)),) + DRIVELETTERS := a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z + $(foreach drv,$(DRIVELETTERS),$(foreach var,$(PATHEXPAND),$(eval $(var):=$$(patsubst $(drv):%,/cygdrive/$(drv)%,$($(var)))))) + endif endif # Path resolution - Functions to convert a source path to a object path and visa-versa src_obj_fn := $$(1) obj_src_fn := $$(1) -$(foreach var,$(PATHLIST),$(eval obj_src_fn := $$$$(patsubst $(var)/%,$$$$($(var))/%,$$(obj_src_fn)))) -$(foreach var,$(PATHLIST),$(eval src_obj_fn := $$$$(patsubst $$$$($(var))/%,$(var)/%,$$(src_obj_fn)))) +$(foreach var,$(PATHLIST),$(eval obj_src_fn := $$$$(patsubst $(var)/%,$$$$($(var))/%,$$(obj_src_fn)))) +$(foreach var,$(PATHLIST),$(eval src_obj_fn := $$$$(patsubst $$$$($(var))/%,$(var)/%,$$(src_obj_fn)))) src_obj_fn := $$(subst :,_drv_drv_,$$(subst ../,_dot_dot/,$(src_obj_fn))) obj_src_fn := $$(subst _drv_drv_,:,$$(subst _dot_dot/,../,$(obj_src_fn))) $(eval src_obj=$(src_obj_fn)) @@ -26,122 +35,188 @@ $(eval obj_src=$(obj_src_fn)) # Add ARCH to each of the compiler programs ifeq ($(XCC),) - XCC = $(ARCH)gcc + XCC = $(ARCH)gcc endif ifeq ($(XCXX),) - XCXX = $(ARCH)g++ + XCXX = $(ARCH)g++ endif ifeq ($(XAS),) - XAS = $(ARCH)gcc -x assembler-with-cpp + XAS = $(ARCH)gcc -x assembler-with-cpp endif ifeq ($(XLD),) - XLD = $(ARCH)gcc + XLD = $(ARCH)gcc endif ifeq ($(XOC),) - XOC = $(ARCH)objcopy + XOC = $(ARCH)objcopy endif ifeq ($(XOD),) - XOD = $(ARCH)objdump + XOD = $(ARCH)objdump endif +ifeq ($(XSZ),) + XSZ = $(ARCH)size + endif # Default project name is the project directory name ifeq ($(PROJECT),) - ifneq ($(firstword $(abspath $(firstword $(MAKEFILE_LIST)))),$(lastword $(abspath $(firstword $(MAKEFILE_LIST))))) - $(error Your directory contains spaces. Gmake barfs at that. Please define PROJECT) - endif - PROJECT := $(notdir $(patsubst %/,%,$(dir $(abspath $(firstword $(MAKEFILE_LIST)))))) + ifneq ($(firstword $(abspath $(firstword $(MAKEFILE_LIST)))),$(lastword $(abspath $(firstword $(MAKEFILE_LIST))))) + $(error Your directory contains spaces. Gmake barfs at that. Please define PROJECT) + endif + PROJECT := $(notdir $(patsubst %/,%,$(dir $(abspath $(firstword $(MAKEFILE_LIST)))))) endif # Output directories ifeq ($(BUILDDIR),) - ifeq ($(MAKECMDGOALS),Debug) - BUILDDIR = bin/Debug - endif - ifeq ($(MAKECMDGOALS),Release) - BUILDDIR = bin/Release - endif - ifeq ($(MAKECMDGOALS),cleanDebug) - BUILDDIR = bin/Debug - endif - ifeq ($(MAKECMDGOALS),cleanRelease) - BUILDDIR = bin/Release - endif - ifeq ($(BUILDDIR),) - BUILDDIR = .build - endif + ifeq ($(MAKECMDGOALS),Debug) + BUILDDIR = bin/Debug + endif + ifeq ($(MAKECMDGOALS),Release) + BUILDDIR = bin/Release + endif + ifeq ($(MAKECMDGOALS),cleanDebug) + BUILDDIR = bin/Debug + endif + ifeq ($(MAKECMDGOALS),cleanRelease) + BUILDDIR = bin/Release + endif + ifeq ($(BUILDDIR),) + BUILDDIR = .build + endif endif OBJDIR = $(BUILDDIR)/obj DEPDIR = $(BUILDDIR)/dep # Output files MAPFILE = $(BUILDDIR)/$(PROJECT).map +FAKEFILE= fakefile.o EXEFILE = ifeq ($(basename $(OPT_OS)),win32) - EXEFILE = $(BUILDDIR)/$(PROJECT).exe - TARGETS = $(EXEFILE) + EXEFILE = $(BUILDDIR)/$(PROJECT).exe + TARGETS = $(EXEFILE) endif ifeq ($(basename $(OPT_OS)),linux) - EXEFILE = $(BUILDDIR)/$(PROJECT) - TARGETS = $(EXEFILE) + EXEFILE = $(BUILDDIR)/$(PROJECT) + TARGETS = $(EXEFILE) endif ifeq ($(basename $(OPT_OS)),osx) - EXEFILE = $(BUILDDIR)/$(PROJECT) - TARGETS = $(EXEFILE) + EXEFILE = $(BUILDDIR)/$(PROJECT) + TARGETS = $(EXEFILE) endif ifeq ($(EXEFILE),) - LDFLAGS += -nostartfiles - EXEFILE = $(BUILDDIR)/$(PROJECT).elf - TARGETS = $(EXEFILE) $(BUILDDIR)/$(PROJECT).hex $(BUILDDIR)/$(PROJECT).bin $(BUILDDIR)/$(PROJECT).dmp + LDFLAGS += -nostartfiles + EXEFILE = $(BUILDDIR)/$(PROJECT).elf + TARGETS = $(EXEFILE) $(BUILDDIR)/$(PROJECT).hex $(BUILDDIR)/$(PROJECT).bin $(BUILDDIR)/$(PROJECT).dmp elfstats endif -# Combine all our compiler arguments -SRCFLAGS += -I. $(patsubst %,-I%,$(INCPATH)) $(patsubst %,-D%,$(patsubst -D%,%,$(DEFS))) -LDFLAGS += $(patsubst %,-L%,$(LIBPATH)) $(patsubst %,-l%,$(patsubst -l%,%,$(LIBS))) -OBJS = $(addprefix $(OBJDIR)/,$(call src_obj,$(addsuffix .o,$(basename $(SRC))))) +# Generate our object file lists +OBJS_THUMB += $(addprefix $(OBJDIR)/,$(call src_obj,$(addsuffix .o,$(basename $(SRC_THUMB))))) +OBJS_NOTHUMB += $(addprefix $(OBJDIR)/,$(call src_obj,$(addsuffix .o,$(basename $(SRC_NOTHUMB))))) +ifeq ($(OPT_THUMB),yes) + OBJS_THUMB += $(OBJS) $(addprefix $(OBJDIR)/,$(call src_obj,$(addsuffix .o,$(basename $(SRC))))) +else + OBJS_NOTHUMB += $(OBJS) $(addprefix $(OBJDIR)/,$(call src_obj,$(addsuffix .o,$(basename $(SRC))))) +endif +ifneq ($(OBJS_THUMB),) + ifneq ($(OBJS_NOTHUMB),) + # Mixed ARM and THUMB mode - enabled only if needed because it kills performance. + SRCFLAGS += -mthumb-interwork + LDFLAGS += -mthumb-interwork + DEFS += THUMB_PRESENT + else + # Pure THUMB mode, THUMB C code cannot be called by ARM asm code directly. + LDFLAGS += -mthumb + DEFS += THUMB_PRESENT THUMB_NO_INTERWORKING + FAKEFILE= fakethumbfile.o + endif +endif # Handle make API options that affect compiler arguments ifneq ($(OPT_NONSTANDARD_FLAGS),yes) - SRCFLAGS += -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm + SRCFLAGS += -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm endif ifeq ($(OPT_LINK_OPTIMIZE),yes) - SRCFLAGS += -ffunction-sections -fdata-sections + SRCFLAGS += -ffunction-sections -fdata-sections -fno-common -flto endif ifeq ($(OPT_GENERATE_MAP),yes) - ifeq ($(OPT_LINK_OPTIMIZE),yes) - LDFLAGS += -Wl,-Map=$(MAPFILE),--cref,--no-warn-mismatch,--gc-sections - else - LDFLAGS += -Wl,-Map=$(MAPFILE),--cref,--no-warn-mismatch - endif + ifeq ($(OPT_LINK_OPTIMIZE),yes) + LDFLAGS += -Wl,-Map=$(MAPFILE),--cref,--no-warn-mismatch,--gc-sections + else + LDFLAGS += -Wl,-Map=$(MAPFILE),--cref,--no-warn-mismatch + endif endif ifeq ($(OPT_GENERATE_LISTINGS),yes) - CFLAGS += -Wa,-alms=$(@:.o=.lst) - CXXFLAGS += -Wa,-alms=$(@:.o=.lst) - ASFLAGS += -Wa,-amhls=$(@:.o=.lst) + CFLAGS += -Wa,-alms=$(@:.o=.lst) + CXXFLAGS += -Wa,-alms=$(@:.o=.lst) + ASFLAGS += -Wa,-amhls=$(@:.o=.lst) endif ifneq ($(LDSCRIPT),) - LDFLAGS += -T$(LDSCRIPT) + LDFLAGS += -T$(LDSCRIPT) +endif +ifeq ($(OPT_CPU),x86) + SRCFLAGS += -m32 + LDFLAGS += -m32 +endif +ifeq ($(OPT_CPU),x64) + SRCFLAGS += -m64 + LDFLAGS += -m64 +endif +ifeq ($(OPT_CPU),at91sam7) + SRCFLAGS += -mcpu=arm7tdmi -mabi=apcs-gnu + LDFLAGS += -mcpu=arm7tdmi +endif +ifeq ($(OPT_CPU),stm32m4) + SRCFLAGS += -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -falign-functions=16 + LDFLAGS += -mcpu=cortex-m4 + LIBS += m endif # Generate dependency information SRCFLAGS += -MMD -MP -MF $(DEPDIR)/$(@F).d +# Combine all our compiler arguments +SRCFLAGS += -I. $(patsubst %,-I%,$(INCPATH)) $(patsubst %,-D%,$(patsubst -D%,%,$(DEFS))) +LDFLAGS += $(patsubst %,-L%,$(LIBPATH)) $(patsubst %,-l%,$(patsubst -l%,%,$(LIBS))) + # Targets -.PHONY: builddirs fakefile.o all clean Debug Release cleanDebug cleanRelease +.PHONY: builddirs fakefile.o fakethumbfile.o elfstats all clean Debug Release cleanDebug cleanRelease Debug Release: all cleanDebug cleanRelease: clean -all: builddirs fakefile.o $(TARGETS) +all: builddirs $(FAKEFILE) $(TARGETS) builddirs: @mkdir -p $(BUILDDIR) @mkdir -p $(OBJDIR) @mkdir -p $(DEPDIR) -fakefile.o: +$(FAKEFILE): ifneq ($(OPT_VERBOSE_COMPILE),yes) - @echo Compiler Options - $(XCC) -c $(CPPFLAGS) $(CFLAGS) $(SRCFLAGS) fakefile.c -o $(OBJDIR)/$@ - @echo + @echo . + ifneq ($(filter %.cpp,$(SRC) $(SRC_NOTHUMB) $(SRC_THUMB)),) + @echo C++ Compiler Options.. $(XCXX) -c $(CPPFLAGS) $(CXXFLAGS) $(SRCFLAGS) $(@:.o=.cpp) -o $(OBJDIR)/$@ + else + ifneq ($(filter %.c++,$(SRC) $(SRC_NOTHUMB) $(SRC_THUMB)),) + @echo C++ Compiler Options.. $(XCXX) -c $(CPPFLAGS) $(CXXFLAGS) $(SRCFLAGS) $(@:.o=.c++) -o $(OBJDIR)/$@ + endif + endif + ifneq ($(filter %.c,$(SRC) $(SRC_NOTHUMB) $(SRC_THUMB)),) + @echo C Compiler Options.... $(XCC) -c $(CPPFLAGS) $(CFLAGS) $(SRCFLAGS) $(@:.o=.c) -o $(OBJDIR)/$@ + endif + ifneq ($(filter %.s,$(SRC) $(SRC_NOTHUMB) $(SRC_THUMB)),) + @echo Assembler Options..... $(XCC) -c $(CPPFLAGS) $(CFLAGS) $(SRCFLAGS) $(@:.o=.s) -o $(OBJDIR)/$@ + endif + @echo Linker Options........ $(XLD) $(LDFLAGS) $(OBJDIR)/$@ -o $(EXEFILE) + @echo . +endif + +fakethumbfile.o $(OBJS_THUMB): SRCFLAGS += -mthumb -DTHUMB + +elfstats: $(EXEFILE) + @echo . +ifeq ($(USE_VERBOSE_COMPILE),yes) + $(XSZ) $< +else + @$(XSZ) $< endif # Implicit Rules @@ -150,7 +225,7 @@ endif $(OBJDIR)/%.o : $$(call obj_src,%.c) @mkdir -p $(dir $@) ifeq ($(OPT_VERBOSE_COMPILE),yes) - @echo + @echo . $(XCC) -c $(CPPFLAGS) $(CFLAGS) $(SRCFLAGS) $< -o $@ else @echo Compiling $< @@ -160,7 +235,7 @@ endif $(OBJDIR)/%.o : $$(call obj_src,%.cpp) @mkdir -p $(dir $@) ifeq ($(OPT_VERBOSE_COMPILE),yes) - @echo + @echo . $(XCXX) -c $(CPPFLAGS) $(CXXFLAGS) $(SRCFLAGS) $< -o $@ else @echo Compiling $< @@ -170,7 +245,7 @@ endif $(OBJDIR)/%.o : $$(call obj_src,%.c++) @mkdir -p $(dir $@) ifeq ($(OPT_VERBOSE_COMPILE),yes) - @echo + @echo . $(XCXX) -c $(CPPFLAGS) $(CXXFLAGS) $(SRCFLAGS) $< -o $@ else @echo Compiling $< @@ -180,21 +255,21 @@ endif $(OBJDIR)/%.o : $$(call obj_src,%.s) @mkdir -p $(dir $@) ifeq ($(OPT_VERBOSE_COMPILE),yes) - @echo + @echo . $(XAS) -c $(CPPFLAGS) $(ASFLAGS) $(SRCFLAGS) $< -o $@ else @echo Compiling $< @$(XAS) -c $(CPPFLAGS) $(ASFLAGS) $(SRCFLAGS) $< -o $@ endif -$(EXEFILE): $(OBJS) $(LDSCRIPT) +$(EXEFILE): $(OBJS_THUMB) $(OBJS_NOTHUMB) $(LDSCRIPT) @mkdir -p $(dir $@) ifeq ($(OPT_VERBOSE_COMPILE),yes) - @echo - $(XLD) $(OBJS) $(LDFLAGS) -o $@ + @echo . + $(XLD) $(OBJS_THUMB) $(OBJS_NOTHUMB) $(LDFLAGS) -o $@ else @echo Linking $@ - @$(XLD) $(OBJS) $(LDFLAGS) -o $@ + @$(XLD) $(OBJS_THUMB) $(OBJS_NOTHUMB) $(LDFLAGS) -o $@ endif ifeq ($(OPT_COPY_EXE),yes) @cp $@ . @@ -228,7 +303,6 @@ ifeq ($(USE_VERBOSE_COMPILE),yes) else @echo Creating $@ @$(XOD) -x --syms $< > $@ - @echo Done endif ifeq ($(OPT_COPY_EXE),yes) @cp $@ . diff --git a/tools/gmake_scripts/library_ugfx.mk b/tools/gmake_scripts/library_ugfx.mk index 24c501fe..450f6ff6 100644 --- a/tools/gmake_scripts/library_ugfx.mk +++ b/tools/gmake_scripts/library_ugfx.mk @@ -1,3 +1,10 @@ +# +# This file is subject to the terms of the GFX License. If a copy of +# the license was not distributed with this file, you can obtain one at: +# +# http://ugfx.org/license.html +# + # See readme.txt for the make API # Requirements: diff --git a/tools/gmake_scripts/os_chibios.mk b/tools/gmake_scripts/os_chibios.mk index a81c9803..b8205dd3 100644 --- a/tools/gmake_scripts/os_chibios.mk +++ b/tools/gmake_scripts/os_chibios.mk @@ -1,28 +1,60 @@ +# +# This file is subject to the terms of the GFX License. If a copy of +# the license was not distributed with this file, you can obtain one at: +# +# http://ugfx.org/license.html +# + # See readme.txt for the make API # Requirements: # # CHIBIOS: The location of the ChibiOS code eg CHIBIOS=../chibios -# CHIBIOS_BOARD The name of the ChibiOS board eg CHIBIOS_BOARD=OLIMEX_SAM7_EX256 # CHIBIOS_PLATFORM The name of the ChibiOS platform eg CHIBIOS_PLATFORM=AT91SAM7 # CHIBIOS_PORT The name of the ChibiOS port eg CHIBIOS_PORT=GCC/ARM/AT91SAM7 # # Optional: # -# CHIBIOS_LDSCRIPT The name of the loader script eg CHIBIOS_LDSCRIPT=$(PORTLD)/AT91SAM7X256.ld +# CHIBIOS_LDSCRIPT The name of the loader script eg CHIBIOS_LDSCRIPT=AT91SAM7X256.ld +# CHIBIOS_BOARD The name of the ChibiOS board eg CHIBIOS_BOARD=OLIMEX_SAM7_EX256 - if not specified you must include equivalent code yourself +# CHIBIOS_STM32LIB Use the STM32 library source for drivers instead of native drivers (yes or no) - default no +# CHIBIOS_VERSION Which version of ChibiOS is this (2 or 3) - default is 2 # PATHLIST += CHIBIOS -include $(CHIBIOS)/boards/$(CHIBIOS_BOARD)/board.mk -include $(CHIBIOS)/os/hal/platforms/$(CHIBIOS_PLATFORM)/platform.mk -include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/ports/$(CHIBIOS_PORT)/port.mk -include $(CHIBIOS)/os/kernel/kernel.mk -LDSCRIPT= $(CHIBIOS_LDSCRIPT) +ifeq ($(CHIBIOS_VERSION),3) + include $(CHIBIOS)/os/hal/hal.mk + include $(CHIBIOS)/os/hal/osal/rt/osal.mk + include $(CHIBIOS)/os/hal/ports/$(CHIBIOS_PLATFORM)/platform.mk + include $(CHIBIOS)/os/rt/rt.mk + include $(CHIBIOS)/os/rt/ports/$(CHIBIOS_PORT).mk +else + include $(CHIBIOS)/os/hal/hal.mk + include $(CHIBIOS)/os/hal/platforms/$(CHIBIOS_PLATFORM)/platform.mk + include $(CHIBIOS)/os/kernel/kernel.mk + include $(CHIBIOS)/os/ports/$(CHIBIOS_PORT)/port.mk +endif + +ifneq ($(CHIBIOS_BOARD),) + include $(CHIBIOS)/boards/$(CHIBIOS_BOARD)/board.mk +endif +ifeq ($(LDSCRIPT),) + ifneq ($(CHIBIOS_LDSCRIPT),) + LDSCRIPT= $(PORTLD)/$(CHIBIOS_LDSCRIPT) + endif +endif + +ifeq ($(CHIBIOS_STM32LIB),yes) + include $(CHIBIOS)/ext/stm32lib/stm32lib.mk + SRC += $(STM32SRC) + DEFS += USE_STDPERIPH_DRIVER + INCPATH += $(STM32INC) +endif + INCPATH += $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(PLATFORMINC) $(BOARDINC) + $(HALINC) $(PLATFORMINC) $(BOARDINC) SRC += $(PORTSRC) \ $(KERNSRC) \ $(TESTSRC) \ diff --git a/tools/gmake_scripts/os_linux.mk b/tools/gmake_scripts/os_linux.mk index 39610ca4..0893ca51 100644 --- a/tools/gmake_scripts/os_linux.mk +++ b/tools/gmake_scripts/os_linux.mk @@ -1,3 +1,10 @@ +# +# This file is subject to the terms of the GFX License. If a copy of +# the license was not distributed with this file, you can obtain one at: +# +# http://ugfx.org/license.html +# + # See readme.txt for the make API # Requirements: diff --git a/tools/gmake_scripts/os_osx.mk b/tools/gmake_scripts/os_osx.mk index 8b008f4b..9bfc7024 100644 --- a/tools/gmake_scripts/os_osx.mk +++ b/tools/gmake_scripts/os_osx.mk @@ -1,10 +1,18 @@ +# +# This file is subject to the terms of the GFX License. If a copy of +# the license was not distributed with this file, you can obtain one at: +# +# http://ugfx.org/license.html +# + # See readme.txt for the make API # Requirements: # # OSX_SDK The location of the SDK eg. OSX_SDK = /Developer/SDKs/MacOSX10.7.sdk -# OSX_ARCH The architecture flags eg. OSX_ARCH = -mmacosx-version-min=10.3 -arch i386 +# OSX_ARCH The architecture flags eg. OSX_ARCH = -mmacosx-version-min=10.3 # SRCFLAGS += -isysroot $(OSX_SDK) $(OSX_ARCH) LDFLAGS += -pthread -Wl,-syslibroot,$(OSX_SDK) $(OSX_ARCH) +OPT_CPU = x86 diff --git a/tools/gmake_scripts/os_win32.chibios.mk b/tools/gmake_scripts/os_win32.chibios.mk index 5a804c64..0eccf071 100644 --- a/tools/gmake_scripts/os_win32.chibios.mk +++ b/tools/gmake_scripts/os_win32.chibios.mk @@ -1,3 +1,10 @@ +# +# This file is subject to the terms of the GFX License. If a copy of +# the license was not distributed with this file, you can obtain one at: +# +# http://ugfx.org/license.html +# + # See readme.txt for the make API # Requirements: diff --git a/tools/gmake_scripts/os_win32.mk b/tools/gmake_scripts/os_win32.mk index 1b33ad85..07d15c20 100644 --- a/tools/gmake_scripts/os_win32.mk +++ b/tools/gmake_scripts/os_win32.mk @@ -1,6 +1,14 @@ +# +# This file is subject to the terms of the GFX License. If a copy of +# the license was not distributed with this file, you can obtain one at: +# +# http://ugfx.org/license.html +# + # See readme.txt for the make API # Requirements: # # NONE # +OPT_CPU = x86 diff --git a/tools/gmake_scripts/readme.txt b/tools/gmake_scripts/readme.txt index 979ca364..48ac2c9e 100644 --- a/tools/gmake_scripts/readme.txt +++ b/tools/gmake_scripts/readme.txt @@ -15,6 +15,7 @@ OPT_COPY_EXE=no|yes - Copy the final program to the local project directory - OPT_NONSTANDARD_FLAGS=no - Turn off adding the standard compiler language flags - default no OPT_LINK_OPTIMIZE=no - Remove unused code/data during link - default no OPT_OS=win32|win32.chibios|linux|osx|chibios|freertos|ecos|raw32|rawrtos - Mandatory: The operating system +OPT_CPU=x86|x64|stm32m4|at91sam7 - Add some cpu dependant flags BUILDDIR - Build Directory - default is ".build" or "bin/Debug" or "bin/Release" depending on the target PROJECT - Project Name - default is the name of the project directory @@ -27,6 +28,7 @@ XAS - Assembler - default is "$(ARCH)gcc -x assembler-with-cpp" XLD - Linker - default is "$(ARCH)gcc" XOC - Object Copy - default is "$(ARCH)objcopy" XOD - Object Dump - default is "$(ARCH)objdump" +XSZ - Report binary dump details - default is "$(ARCH)size" SRCFLAGS - Compiler defines for c, c++ and assembler files - default is "" CFLAGS - C specific compiler defines - default is "" @@ -43,8 +45,18 @@ LIBPATH - List of library include directories - default is "" DEFS - List of preprocessor defines (any -D prefix is ignored) - default is "" LIBS - List of libraries (any -l prefix is ignored) - default is "" SRC - List of c, c++ and assembler source files - default is "" +OBJS - List of additional object files - default is "" LDSCRIPT - Custom loader script - default is "" +ARM Specific options +---------------------------- +OPT_THUMB=no|yes - Compile normal sources in thumb mode - default is no + +SRC_THUMB - List of source files that MUST be compiled in thumb mode - default is "" +SRC_NOTHUMB - List of source files that MUST be compiled in non-thumb mode - default is "" +OBJS_THUMB - List of object files that MUST be linked in thumb mode - default is "" +OBJS_NOTHUMB - List of object files that MUST be linked in non-thumb mode - default is "" + Targets ---------------------------- -- cgit v1.2.3