Subversion Repositories DevTools

Rev

Rev 5709 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
369 dpurdie 1
########################################################################
6177 dpurdie 2
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
369 dpurdie 3
#
4
# Module name   : MSP430.DEF
5
# Module type   : Makefile system
6
# Compiler(s)   : Perl
7
# Environment(s): jats
8
#
9
# Description   : Toolset definitions for the Texas Instruments CC Studio
10
#
11
#......................................................................#
12
 
13
toolset = msp430
14
 
15
o       = obj
16
s       = asm
17
a       = lib
18
exe     = bin
19
 
20
.SUFFIXES:  .asm
21
.PHONY:     msp430
22
 
23
#
24
#   Ensure that the compiler can be found
25
#   Use the environment varibales
26
#       GBE_MSP430          - Root of the CC Studio
27
#       GBE_MSP430_TOOLS    - Compiler tools
28
#       GBE_MSP430_CORE     - Some more header files
29
#
30
GBE_MSP430         ?= C:/Texas Instruments/ccsv4
31
GBE_MSP430_TOOLS   ?= $(GBE_MSP430)/tools/compiler/MSP430 Code Generation Tools 3.2.3
32
GBE_MSP430_CORE    ?= $(GBE_MSP430)/msp430
33
 
34
export GBE_MSP430 GBE_MSP430_TOOLS GBE_MSP430_CORE
35
 
36
msp430:
37
	@echo "[Toolset TI MSP430]";\
6177 dpurdie 38
    if [   -z "$$GBE_MSP430" ]; then echo 'GBE_MSP430 env var not set'; exit 2; fi; \
369 dpurdie 39
	if [ ! -d "$$GBE_MSP430" ]; then echo "ERROR: GBE_MSP430 directory not found ($$GBE_MSP430). Compiler not available"; exit 2; fi; \
6177 dpurdie 40
	if [   -z "$$GBE_MSP430_TOOLS" ]; then echo 'GBE_MSP430_TOOLS env var not set'; exit 2; fi; \
369 dpurdie 41
	if [ ! -d "$$GBE_MSP430_TOOLS" ]; then echo "ERROR: GBE_MSP430_TOOLS directory not found ($$GBE_MSP430_TOOLS). Compiler not available"; exit 2; fi; \
6177 dpurdie 42
	if [   -z "$$GBE_MSP430_CORE" ]; then echo 'GBE_MSP430_CORE env var not set'; exit 2; fi; \
369 dpurdie 43
	if [ ! -d "$$GBE_MSP430_CORE" ]; then echo "ERROR: GBE_MSP430_CORE directory not found ($$GBE_MSP430_CORE). Compiler not available"; exit 2; fi;
44
 
45
#
46
#   Define the compiler specfic names and paths for the various tools
47
#
48
msp430_compiler        := $(GBE_MSP430_TOOLS)/bin/cl430.exe
49
msp430_librarian       := $(GBE_MSP430_TOOLS)/bin/ar430.exe
50
msp430_hex             := $(GBE_MSP430_TOOLS)/bin/hex430.exe
51
 
52
#
53
#   Extend the PATH used by the toolset
54
#
55
MSP430_PATH := $(GBE_MSP430_TOOLS)/bin
56
 
57
ifeq "$(findstring $(VB_PATH),$(PATH))" ""
58
PATH    := $(MSP430_PATH);$(PATH)
59
endif
60
Path    := $(PATH)
61
export PATH
62
 
63
#
64
#   Define the toolset specific include and library directories
65
#   Careful. They will have spaces in them
66
#
67
MSP430_INCLUDES   := $(GBE_MSP430_CORE)/include;$(GBE_MSP430_TOOLS)/include
68
MSP430_LIBS       := $(GBE_MSP430_TOOLS)/lib
69
 
70
 
71
# EnvVars used by the toolchain
72
# Do not use
73
#
74
C_OPTION :=
75
C_DIR :=
76
MSP430_C_OPTION :=
77
MSP430_C_DIR :=
78
export C_OPTION C_DIR MSP430_C_OPTION MSP430_C_DIR
79