NEC ELECTRONICS GLOBAL
nec electronics global
HOME
APPLICATIONS
PRODUCTS
TECHNOLOGY
SUPPORT
BUY ONLINE
NEWS & EVENTS
ABOUT US
header
GO
AdvancedParametric
SITE MAP CONTACT US

[RA78K0S] Link and Memory Mapping

Contents

    
FAQ-ID = RA_Link-nnnn
0541: If a variable is located in the external memory space, an error occurs during linking.
0543: Can it be checked to where the stack is assigned?
0705: When the vacant area of ROM is filled with NOP instructions and then execution jumps to initial settings by using the jump instruction as a countermeasure against a microcontroller hang-up, is there any way other than using manual input?
RA_Link
-0541
If a variable is located in the external memory space, an error occurs during linking.
Q1
If a variable is located in the external memory space, the following error occurs during linking.

*** ERROR F206 Segment segment name can't allocate to memory - ignored.

The following definition is made with the assembler. How should it be changed?
	        	PUBLIC _val0,_val1
	DATASEG 	DSEG	AT 0F100H
	_val0:  	DS  	2
	_val1:  	DS  	2
	        	END
A1
To use an external memory space, a memory area must be defined
(internal ROM and internal RAM are defined by default).

In the above case, an error occurs during linking because the memory area of the external memory space is not defined.

Define an external memory area by a link directive, and specify so that the segment is located in that area.
	MEMORY ERAM :(0F100H,0100H)
	MERGE DATASEG := ERAM

-78K0- -78K0S- -78K4-

Is this information useful for you ?
back to top  
(2006/07)

RA_Link
-0543
Can it be checked to where the stack is assigned?
Q1
The symbol generation specification option -S for resolving stack of the linker is used.
Can it be checked to where the stack is assigned?
A1
When the symbol generation specification option -S for resolving stack is used, symbol "_@STEND" that has the value of the lowest address of the stack, and symbol "_STBEG" that has the value of the highest address +1 are generated.



Specify the -KP option of the linker so that a public symbol list is output in the link list file.
The stack area is between the above symbols "_@STEND" and "_STBEG".

*** Public symbol list ***

MODULE	ATTR	VALUE	NAME

	NUM	FE20H	_@STBEG 
	NUM	FB7EH	_@STEND

-78K0- -78K0S- -78K4-

Is this information useful for you ?
back to top  
(2006/07)

RA_Link
-0705
When the vacant area of ROM is filled with NOP instructions and then execution jumps to initial settings by using the jump instruction as a countermeasure against a microcontroller hang-up, is there any way other than using manual input?
Q1
When the vacant area of ROM is filled with NOP instructions and then execution jumps to initial settings by using the jump instruction as a countermeasure against a microcontroller hang-up, is there any way other than using manual input?
A1
The following method is possible if, for example, the 78K0S is used and the internal ROM area is from 0 to 3FFFH.

(1) Describe the assembler source test2.asm in which the BR instruction to return to the initialization routine at address 3FF8H is as follows.
--- test2.asm ---
CODE    CSEG    AT 3FF8H    
        MOV     A, !0H       ; 3 bytes
        XCH     A, X         ; 1 byte
        MOV     A, !1H       ; 3 bytes
        BR      AX           ; 1 byte
        END
-----------------
(2) Assemble the above module.
> ra78k0s -cpXXX test2.asm

(3) Link with user-created object test.rel.
> lk78k0s s0sl.rel test.rel test2.rel -s -bcl0s.lib -otest -ptest

(4) Fill the vacant ROM area with NOP (00H) using the object converter.
> oc78k0s -u00h test.lmf

For debugging, download the Hex file created in (4) above.
Also download the lmf file for symbol debugging.

-78K0S-

Is this information useful for you ?
back to top  
(2008/01)









































 LEGAL  RSS Feeds       © 1995-2008  NEC Electronics Corporation