]> rtime.felk.cvut.cz Git - pes-rpp/rpp-simulink.git/blob - rpp/rpp/target_tools.mk
Fixing the Simulink build system for the static library. Untested.
[pes-rpp/rpp-simulink.git] / rpp / rpp / target_tools.mk
1 # Copyright (C) 2013 Czech Technical University in Prague
2 #
3 # Authors:
4 #     - Carlos Jenkins <carlos@jenkins.co.cr>
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 #
19 # File : target_tools.mk
20 # Abstract:
21 #     Makefile for CCS toolchain support.
22 #
23 #     This file set variables to CCS tools to support build for this toolchain.
24 #     This file is included by rpp.tmf before declaring the rules for source
25 #     code.
26 #
27 # References:
28 #     "Include a tool specification settings" comment block in rpp.tmf
29 #      Compiler options documentation available in armcl.pdf
30
31
32 include $(START_DIR)/slprj/target_paths.mk
33
34 # RPP options
35 RPP_STATIC_LIB   = "$(RPP_LIB_ROOT)/rpp-lib.lib"
36 RPP_OS_LAYER_INC = "$(RPP_LIB_ROOT)/os/7.0.2_tms570/include/"
37 RPP_RPP_LAYER_INC= "$(RPP_LIB_ROOT)/rpp/include"
38
39 # Options for target source files
40 TARGET_INCS      =
41 TARGET_SRCS      =
42
43 # Compiler command and options
44 CC      = "$(COMPILER_ROOT)/bin/armcl"
45 CFLAGS  = -mv7R4 --code_state=32 --float_support=VFPv3D16 \
46           --abi=eabi --compile_only -O2 --gcc --diag_wrap=on \
47           --diag_warning=225 --display_error_number --enum_type=packed \
48           --include_path="$(COMPILER_ROOT)/include" \
49           --include_path="$(RPP_OS_LAYER_INC)" \
50           --include_path="$(RPP_RPP_LAYER_INC)"
51
52 CFLAGS          += $(OPTS)
53 CDEBUG           = -g
54 CCOUTPUTFLAG     = --output_file=
55
56 CXX              =
57 CXXFLAGS         =
58 CXXDEBUG         =
59
60 # Linker command and options
61 LD      = $(CC)
62 LDFLAGS = -mv7R4 --code_state=32 --float_support=VFPv3D16 --abi=eabi \
63           -O2 --diag_warning=225 --display_error_number --enum_type=packed \
64           --run_linker -m"$(MODEL).map" --be32 --diag_wrap=on \
65           --stack_size=$(RPP_STACK_SIZE) --heap_size=$(RPP_HEAP_SIZE) \
66           --reread_libs --warn_sections --display_error_number --rom_model \
67           -i"$(COMPILER_ROOT)/lib" -i"$(COMPILER_ROOT)/include" \
68           --library=rtsv7R4_T_be_v3D16_eabi.lib \
69           --library="$(RPP_STATIC_LIB)" \
70           "$(RPP_LIB_ROOT)/rpp/TMS570LS313xFlashLnk.cmd"
71
72 LDDEBUG          = -g
73 LDOUTPUTFLAG     = --output_file=
74
75 # Archiver command and options
76 AR               = "$(COMPILER_ROOT)/bin/armar"
77 ARFLAGS          = -r
78
79 # Binary file format converter command and options
80 OBJCOPY          = cp
81 OBJCOPYFLAGS     =
82
83 # Specify the output extension from compiler
84 OBJ_EXT          = .obj
85
86 # Specify extension from linker
87 PROGRAM_FILE_EXT = .o
88
89 # Specify extension for final product at end of build
90 EXE_FILE_EXT     = .out
91