Skip to content

Commit c361bc1

Browse files
committed
Improve documents and makefile, expose linker script makefile option
Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
1 parent 0b78766 commit c361bc1

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

doc/documents/getting_started/makefile_manual.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ In the following part of this manual, we will only use ``make`` in example, you
6565
" opt - Display Current MAKE options"
6666
" spopt - Display Supported MAKE options"
6767
"Available Configurations:"
68-
" BOARD=<board_name> - Specify the board(axs emsdp emsk hsdk iotdk nsim)"
69-
" BD_VER=<board_ver> - Specify the board verison"
68+
" BOARD=<board_name> - Specify the board(axs emsdp emsk hsdk iotdk nsim)"
69+
" BD_VER=<board_ver> - Specify the board verison"
7070
" OLEVEL=Os|O0|O1|O2|O3 - Specify Optimization level"
71-
" CUR_CORE=<core configuration> - Specify core configuration"
71+
" CUR_CORE=<core configuration> - Specify core configuration"
7272
" TCF=path/to/your tcf - Specify customized tcf file"
7373
" TOOLCHAIN=mw|gnu - Specify toolchain"
7474
" JTAG=usb|opella - Specify Hardware Debugger(Digilent JTAG or Ashling Opella-XD JTAG)"
@@ -78,6 +78,7 @@ In the following part of this manual, we will only use ``make`` in example, you
7878
" DIG_NAME=xxx - Specify Digilent JTAG which to be used, most useful when more than one Digilent USB-JTAG plugged in"
7979
" HEAPSZ=xxx - Specify heap size for program, xxx stands for size in bytes"
8080
" STACKSZ=xxx - Specify stack size for program, xxx stands for size in bytes"
81+
" LINKER_SCRIPT_FILE=xxx - Specify customized linker script, xxx stands for the relative path of linker script file to current directory"
8182
"Example Usage:"
8283
" make all - build example in current directory using default configuration"
8384
" make BOARD=emsk BD_VER=22 CUR_CORE=arcem7d OLEVEL=O2 TOOLCHAIN=gnu all - build example using configuration (emsk, 22, arcem7d, O2, gnu)"
@@ -108,6 +109,7 @@ The basic way of this command is to enter ``make cfg``, the makefile system will
108109
"Core Configurations (CUR_CORE) : arcem11d arcem7d arcem9d"
109110
"Build Toolchains (TOOLCHAIN) : gnu mw"
110111
"Debug Jtags (JTAG) : usb opella"
112+
"Linker Script (LINKER_SCRIPT_FILE): ../../../board/linker_template_mw.ld"
111113
112114
At supported Configurations, you can find different choices for your command, the uppercase words in parentheses are paramater names to be used in your command.
113115
For example, the command below will execute your command for an *EMSK* board with *arcem7d* core, toolchain will be *gnu* and JTAG connection is via *USB*.

options/rules.mk

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ help :
121121
@$(ECHO) ' opt - Display Current MAKE options'
122122
@$(ECHO) ' spopt - Display Supported MAKE options'
123123
@$(ECHO) 'Available Configurations:'
124-
@$(ECHO) ' BOARD=<board_name> - Specify the board($(SUPPORTED_BOARDS))'
125-
@$(ECHO) ' BD_VER=<board_ver> - Specify the board verison'
124+
@$(ECHO) ' BOARD=<board_name> - Specify the board($(SUPPORTED_BOARDS))'
125+
@$(ECHO) ' BD_VER=<board_ver> - Specify the board verison'
126126
@$(ECHO) ' OLEVEL=Os|O0|O1|O2|O3 - Specify Optimization level'
127-
@$(ECHO) ' CUR_CORE=<core configuration> - Specify core configuration'
127+
@$(ECHO) ' CUR_CORE=<core configuration> - Specify core configuration'
128128
@$(ECHO) ' TCF=path/to/your tcf - Specify customized tcf file'
129129
@$(ECHO) ' TOOLCHAIN=mw|gnu - Specify toolchain'
130130
@$(ECHO) ' JTAG=usb|opella - Specify Hardware Debugger(Digilent JTAG or Ashling Opella-XD JTAG)'
@@ -134,6 +134,7 @@ help :
134134
@$(ECHO) ' DIG_NAME=xxx - Specify Digilent JTAG which to be used, most useful when more than one Digilent USB-JTAG plugged in'
135135
@$(ECHO) ' HEAPSZ=xxx - Specify heap size for program, xxx stands for size in bytes'
136136
@$(ECHO) ' STACKSZ=xxx - Specify stack size for program, xxx stands for size in bytes'
137+
@$(ECHO) ' LINKER_SCRIPT_FILE=xxx - Specify customized linker script, xxx stands for the relative path of linker script file to current directory'
137138
@$(ECHO) 'Example Usage:'
138139
@$(ECHO) ' make all - build example in current directory using default configuration'
139140
@$(ECHO) ' make BOARD=emsk BD_VER=22 CUR_CORE=arcem7d OLEVEL=O2 TOOLCHAIN=gnu all - build example using configuration (emsk, 22, arcem7d, O2, gnu)'
@@ -155,6 +156,7 @@ cfg :
155156
@$(ECHO) 'Core Configurations (CUR_CORE) : $(SUPPORTED_CORES)'
156157
@$(ECHO) 'Build Toolchains (TOOLCHAIN) : $(SUPPORTED_TOOLCHAINS)'
157158
@$(ECHO) 'Debug Jtags (JTAG) : $(SUPPORTED_JTAGS)'
159+
@$(ECHO) 'Linker Script (LINKER_SCRIPT_FILE): $(LINKER_SCRIPT_FILE)'
158160

159161
opt :
160162
@$(ECHO) ======CURRENT CONFIGURATION=====
@@ -164,6 +166,7 @@ opt :
164166
@$(ECHO) TOOLCHAIN : $(TOOLCHAIN)
165167
@$(ECHO) OLEVEL : $(OLEVEL)
166168
@$(ECHO) JTAG : $(JTAG)
169+
@$(ECHO) LINKER_SCRIPT_FILE : $(LINKER_SCRIPT_FILE)
167170
@$(ECHO) EMBARC_ROOT : $(EMBARC_ROOT)
168171
@$(ECHO) OUT_DIR_ROOT : $(OUT_DIR_ROOT)
169172
@$(ECHO) COMPILE_OPT : $(subst $(MKDEP_OPT), , $(COMPILE_OPT))

0 commit comments

Comments
 (0)