]> rtime.felk.cvut.cz Git - jenkicar/rpp-simulink.git/blob - rpp/rpp/target_tools.mk
Add hidden options for target specific parameters for linker
[jenkicar/rpp-simulink.git] / rpp / rpp / target_tools.mk
1 # Copyright (C) 2013-2014 Czech Technical University in Prague
2 #
3 # Authors:
4 #     - Carlos Jenkins <carlos@jenkins.co.cr>
5 #
6 # This document contains proprietary information belonging to Czech
7 # Technical University in Prague. Passing on and copying of this
8 # document, and communication of its contents is not permitted
9 # without prior written authorization.
10 #
11 # File : target_tools.mk
12 # Abstract:
13 #     Makefile for CCS toolchain support.
14 #
15 #     This file set variables to CCS tools to support build for this toolchain.
16 #     This file is included by rpp.tmf before declaring the rules for source
17 #     code.
18 #
19 # References:
20 #     "Include a tool specification settings" comment block in rpp.tmf
21 #      Compiler options documentation available in refs/armcl.pdf
22
23
24 include $(START_DIR)/slprj/target_paths.mk
25 include $(RPP_LIB_ROOT)/Makefile.config
26
27 # RPP options
28 RPP_STATIC_LIB   = rpp-lib.lib
29 RPP_OS_LAYER_INC = $(RPP_LIB_ROOT)/os/7.0.2/include/
30
31 # Options for target source files
32 TARGET_INCS      =
33 TARGET_SRCS      =
34
35 # Compiler command and options
36 CC      = "$(COMPILER_ROOT)/bin/armcl"
37 CFLAGS  = $(TARGET_CFLAGS)                                              \
38           -mv7R4 --code_state=32 --float_support=VFPv3D16               \
39           --abi=eabi --compile_only -O2 --gcc --diag_wrap=on            \
40           --diag_warning=225 --display_error_number                     \
41           --enum_type=packed --gen_func_subsections                     \
42           -DEXTMODE_DISABLEPRINTF                                       \
43           --include_path="$(RPP_LIB_ROOT)/rpp/include"                  \
44           --include_path="$(RPP_LIB_ROOT)/lwip/src/include"             \
45           --include_path="$(RPP_LIB_ROOT)/lwip/src/include/ipv4"        \
46           --include_path="$(RPP_LIB_ROOT)/lwip/src/include/ipv6"        \
47           --include_path="$(RPP_OS_LAYER_INC)"                          \
48           --include_path="$(COMPILER_ROOT)/include"
49
50 # Define when external mode should wait for host connection
51 # CFLAGS += -DON_TARGET_WAIT_FOR_START
52
53 CFLAGS          += $(EXT_CC_OPTS)
54 CFLAGS          += $(OPTS)
55 CDEBUG           = -g
56 CCOUTPUTFLAG     = --output_file=
57
58 CXX              =
59 CXXFLAGS         =
60 CXXDEBUG         =
61
62 # Linker command and options
63 LD      = $(CC)
64 LDFLAGS = -mv7R4 --code_state=32 --float_support=VFPv3D16 --abi=eabi    \
65           -O2 --diag_warning=225 --display_error_number                 \
66           --enum_type=packed --run_linker -m"$(MODEL).map" $(RPP_LD_FLAGS)  \
67           --diag_wrap=on --stack_size=$(RPP_STACK_SIZE)                 \
68           --heap_size=$(RPP_HEAP_SIZE) --reread_libs --warn_sections    \
69           --display_error_number --rom_model                            \
70           --search_path="$(RPP_LIB_ROOT)"                               \
71           --library="$(RPP_STATIC_LIB)"                                 \
72           --retain="$(RPP_STATIC_LIB)<sys_intvecs.obj>(.intvecs)"       \
73           --search_path="$(COMPILER_ROOT)/lib"                          \
74           --library="$(RPP_RTSV_LIB_FILE_NAME)"                         \
75           "$(RPP_LIB_ROOT)/rpp/$(RPP_LD_SCRIPT_FILE_NAME)"              \
76           --generate_dead_funcs_list=$(MODEL)-deadfuncs.xml
77
78 LDDEBUG          = -g
79 LDOUTPUTFLAG     = --output_file=
80
81 # Archiver command and options
82 AR               = "$(COMPILER_ROOT)/bin/armar"
83 ARFLAGS          = -r
84
85 # Binary file format converter command and options
86 ifeq ($(OS),Windows_NT)
87 OBJCOPY          = copy
88 else
89 OBJCOPY          = cp
90 endif
91 OBJCOPYFLAGS     =
92
93 # Specify the output extension from compiler
94 OBJ_EXT          = .obj
95
96 # Specify extension from linker
97 PROGRAM_FILE_EXT = .o
98
99 # Specify extension for final product at end of build
100 EXE_FILE_EXT     = .out