1 # Copyright (C) 2013-2015 Czech Technical University in Prague
4 # - Carlos Jenkins <carlos@jenkins.co.cr>
6 # Permission is hereby granted, free of charge, to any person
7 # obtaining a copy of this software and associated documentation
8 # files (the "Software"), to deal in the Software without
9 # restriction, including without limitation the rights to use,
10 # copy, modify, merge, publish, distribute, sublicense, and/or sell
11 # copies of the Software, and to permit persons to whom the
12 # Software is furnished to do so, subject to the following
15 # The above copyright notice and this permission notice shall be
16 # included in all copies or substantial portions of the Software.
18 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20 # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 # OTHER DEALINGS IN THE SOFTWARE.
27 # File : target_tools.mk
29 # Makefile for CCS toolchain support.
31 # This file set variables to CCS tools to support build for this toolchain.
32 # This file is included by rpp.tmf before declaring the rules for source
36 # "Include a tool specification settings" comment block in rpp.tmf
37 # Compiler options documentation available in refs/armcl.pdf
40 include $(START_DIR)/slprj/target_paths.mk
41 include $(RPP_LIB_ROOT)/Makefile.config
43 # ARM_COMPILER_DIR is needed by Makefile.rules
44 ARM_COMPILER_DIR = $(COMPILER_ROOT)
45 include $(RPP_LIB_ROOT)/build/Makefile.rules
48 RPP_STATIC_LIB = rpp-lib.lib
50 # Options for target source files
54 # Compiler command and options - use CC and RPP_CFLAGS from Makefile.rules
55 #CC := "$(COMPILER_ROOT)/bin/armcl"
56 CFLAGS = $(RPP_CFLAGS) -O2
58 # Define when external mode should wait for host connection
59 # CFLAGS += -DON_TARGET_WAIT_FOR_START
61 CFLAGS += $(EXT_CC_OPTS)
64 CCOUTPUTFLAG = --output_file=
70 # Linker command and options
72 LDFLAGS = $(TARGET_CFLAGS) \
73 -O2 --diag_warning=225 --display_error_number \
74 --enum_type=packed --run_linker -m"$(MODEL).map" $(TARGET_LDFLAGS) \
75 --diag_wrap=on --stack_size=$(RPP_STACK_SIZE) \
76 --heap_size=$(RPP_HEAP_SIZE) --reread_libs --warn_sections \
77 --display_error_number --rom_model \
78 --search_path="$(RPP_LIB_ROOT)" \
79 --library="$(RPP_STATIC_LIB)" \
80 --retain="$(RPP_STATIC_LIB)<sys_intvecs.obj>(.intvecs)" \
81 --search_path="$(COMPILER_ROOT)/lib" \
83 "$(RPP_LIB_ROOT)/build/$(TARGET)/$(TARGET_LDCMD)" \
84 --generate_dead_funcs_list=$(MODEL)-deadfuncs.xml
87 LDOUTPUTFLAG = --output_file=
89 # Archiver command and options
90 AR = "$(COMPILER_ROOT)/bin/armar"
93 # Binary file format converter command and options
94 ifeq ($(OS),Windows_NT)
101 # Specify the output extension from compiler
104 # Specify extension from linker
105 PROGRAM_FILE_EXT = .o
107 # Specify extension for final product at end of build