1 introduction purpose this course gives an overview of assembler settings of the high-performance...

28
1 Introduction Purpose This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software for embedded systems built with microcontrollers (MCUs) from Renesas Technology Corp. Objectives Understand the five main categories of assembler configuration Learn how the settings affect the assembler compilation process Content 28 pages 2 questions Learning Time 35 minutes

Upload: julius-sutton

Post on 06-Jan-2018

218 views

Category:

Documents


0 download

DESCRIPTION

3 Five categories of options Options in Assembler To configure the source-file related information; for example, location of the include files, etc. To configure the output: debug information, optimization, output file directory, and more To adjust the symbol access format To adjust the symbol access format To select what will be provided in the list file To configure various other options, including those that are user-defined To configure various other options, including those that are user-defined 1. Source 2. Object 3. List 4. Tuning 5. Other 1. Source 2. Object 3. List 4. Tuning 5. Other

TRANSCRIPT

Page 1: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

1

Introduction

Purpose This course gives an overview of assembler settings of the

High-performance Embedded Workshop (HEW), used for developing software for embedded systems built with microcontrollers (MCUs) from Renesas Technology Corp.

Objectives Understand the five main categories of assembler configuration Learn how the settings affect the assembler compilation process

Content 28 pages 2 questions

Learning Time 35 minutes

Page 2: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

2

Invoke Assembler Configuration

Steps to invoke Assembler toolchain configuration Click on Build Select the H8 Standard Toolchain

Assembler settings for a specific project or file configuration can be selected here

Corresponding command-line entries for all settings appear in HEW linker dialog

Page 3: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

3

Five categories of options

Options in Assembler

To configure the source-file related information; for example, location of the include files, etc.

To configure the output: debug information, optimization, output file directory, and more

To adjust the symbol access format

To select what will be provided in the list file

To configure various other options, including those that are user-defined

1. Source2. Object3. List4. Tuning5. Other

Page 4: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

4

Source-file Related Information

Source Settings Include file directories

- Specifies destination path name of included files

Defines

- Defines replacement string literal

Preprocessor variables- Defines integer and character

preprocessor variables

Page 5: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

5

Include File Directories

Source settings Include file directories - Specifies directory of files to be included or linked to current source program

Example: HEW workspace named “tutorial”

contains “header.h” file at: C:\tutorial\tutorial\include\header.h

The steps shown here would be required to add/include the “header.h” file to the current source program search list.

Page 6: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

6

Defines

Source settings Defines - Based on same concept as “.DEFINE” directive

Example: SYM2: . DEFINE “r2”

: mov.w SYM2, r1

:

“SYM2” will be replaced with r2 at assembly.

Page 7: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

7

Preprocessor Variables

Source settings Preprocessor variables - Has same concept as

“.ASSIGNA” and “.ASSIGNC” directives.

Example:FLAG: .ASSIGNC “ON”

:.AIF “\&FLAG” EQ

“ON”mov.w r2, r1.AENDI

:FLAG is set to ON. if FLAG = ON, then“mov.w r2, r1” is assembled.

Page 8: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

8

Five categories of options

Options in Assembler

To configure the source-file related information; for example, location of the include files, etc.

To configure the output: debug information, optimization, output file directory, and more

To adjust the symbol access format

To select what will be provided in the list file

To configure various other options, including those that are user-defined

1. Source2. Object3. List4. Tuning5. Other

Page 9: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

9

Configuring Assembler Output

Object settings

Debug information

Generate assembly source file after preprocess

Optimize

Default of branch displacement size

Generate file for inter- module optimization

Output file directory

Page 10: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

10

Information for Debugging

Object settings

With/without debug information

- Specifies whether or not debugging information will be output

- Valid only when object module is generated

- Default: “Without debug information” (i.e., no debug information is produced)

Page 11: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

11

Source File after Preprocess

Object settings Generate assembly source file after preprocess - Outputs an assembler source file for which macro expansion, conditional assembly, structured assembly, and file inclusion have been performed - When this option is specified, no object is generated

Example of Macro expansion:.MACRO MCO, Rn Expanded results:add \Rn, \Rn add r1, r1inc.w \Rn inc.w r1.ENDMMCO r1 add r2, r2MCO r2 inc.w r2

Page 12: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

12

Adjust PC-related InstructionsObject settings Optimize - If selected, the assembler will adjust the the displacement size of register-indirect with displacement instructions, and the address size of the absolute addressing format

- This option is valid for executable instructions when a displacement (:8 or :16) is not specified, or an allocated size (:8, :16, :24, or :32) of an absolute address is not specified.

Page 13: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

13

Size of Branch Displacement

Object settings Default of branch

displacement size - This option specifies the

default size for the number of bits used to represent displacement for branch instruction

- Default bit setting depends on CPU type

This option is valid when a displacement size (8 or 16 bit) is specified and the optimize option is not specified.

Default bit settings: • 8 bits for H8/300, H8/300L, H8/300HN, H8S/2000N, H8S/2600N, and H8SXN CPU types • 16 bits for H8/ 300HA, H8S/2000A, H8S/2600A, H8SXM, H8SXA, and H8SXX CPU types

Page 14: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

14

Inter-module Optimization

Object settings

Generate file for inter-

module optimization

- Outputs additional information

for inter-module optimization

Output file directory

- Controls object module output

Page 15: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

PROPERTIESOn passing, 'Finish' button: Goes to Next SlideOn failing, 'Finish' button: Goes to SlideAllow user to leave quiz: After user has completed quizUser may view slides after quiz: After passing quizUser may attempt quiz: Unlimited times

Page 16: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

16

Five categories of options

Options in Assembler

To configure the source-file related information; for example, location of the include files, etc.

To configure the output: debug information, optimization, output file directory, and more

To adjust the symbol access format

To select what will be provided in the list file

To configure various other options, including those that are user-defined

1. Source2. Object3. List4. Tuning5. Other

Page 17: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

17

Contents of List File

List settings Generate list file

- Controls output of assembly listing

Source program - Controls output of source

program listing

Cross Reference - Controls output of cross-

reference listing

Section - Controls output of section

information listing

Source program:

Cross reference:

Section:

Page 18: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

18

List File Generation

List Settings

Generate list file - Select this option to output an assembly listing

Page 19: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

19

Include/Exclude Source Program

List settings Source program - Choice of “Shown” (include) or “Not shown” (exclude) - Default setting is “Shown,” so source program will be included in Assembly list file if “Generate list file” box

is not checked

Page 20: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

20

Contents of Source Program List

List settings Conditionals - Unsatisfied .AIF or .AIFDEF statements

Definitions - Macro definition parts, .AREPEAT and .AWHILE definition parts, .INCLUDE directive statements, .ASSIGNA and .ASSIDGNC directive statements Call - Macro call statements .AIF, .AIFDEF, and .AENDI directive statements Expansions - Macro expansion statements .AREPEAT and .AWHILE expansion statements

Structured - Structured assembly expansion statements

Code - Object code lines exceeding the source statement lines

Page 21: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

21

Cross Reference, Section

List settings

Cross reference

- Specifies whether or not to output a cross reference listing to the Assembly listing

Section

- Specifies whether or not to output a section information listing to the Assembly listing

Defaults: • Default setting for both Cross reference and Section is “Shown.” Thus,

each will be included in Assembly listing unless “Not shown” is selected.

Page 22: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

22

Five categories of options

Options in Assembler

To configure the source-file related information; for example, location of the include files, etc.

To configure the output: debug information, optimization, output file directory, and more

To adjust the symbol access format

To select what will be provided in the list file

To configure various other options, including those that are user-defined

1. Source2. Object3. List4. Tuning5. Other

Page 23: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

23

Symbol Access Format

Tuning settings

Option to set - Specifies whether symbols to

be accessed in 8-bit or 16-bit absolute address format

Specify all symbols - All symbols are set according

to the selected @aa:8 or @aa:16 format

Page 24: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

24

Restricting the Access Format

Tuning settings

Set symbol - “Specify all symbols” box is not checked, but sym1 and sym3 are entered - Only sym1 & sym3 are accessed in 8-bit absolute address (sym2 remains unchanged; it is accessed in 32-bit absolute address)

Example: .IMPORT sym1, sym2, sym3 mov.b @sym1, r1 ;8bit mov.b @sym2, r2 ;32bit mov.b @sym3, r3 ;8bit

Page 25: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

25

Five categories of options

Options in Assembler

To configure the source-file related information; for example, location of the include files, etc.

To configure the output: debug information, optimization, output file directory, and more

To adjust the symbol access format

To select what will be provided in the list file

To configure various other options, including those that are user-defined

1. Source2. Object3. List4. Tuning5. Other

Page 26: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

26

Options in “Other” Category

“Other” settings

Miscellaneous options

- Control output of the symbol information on import symbols that have not been referenced

User-defined options

- Add information that is not available for a setting can be included as command line

Example: sym1 & sym3 are set to 8-bit absolute address, but all

other symbols must be set to 16-bit absolute address. Instead of inputting all of the other symbols, a command line can be added.

Page 27: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

PROPERTIESOn passing, 'Finish' button: Goes to Next SlideOn failing, 'Finish' button: Goes to SlideAllow user to leave quiz: After user has completed quizUser may view slides after quiz: After passing quizUser may attempt quiz: Unlimited times

Page 28: 1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software

28

Categories for H8 Assembler configuration

Assembler settings within each category and

what they do

Course Summary

Download a free evaluation copy of HEW at: www.renesas.com/hew