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

[RA78K4] 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?
0706: 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?
0538: Error F111 is output during linking with the 78K4
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
-0706
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 78K4 is used and the internal ROM area is from 0 to 0F0FFH.

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

(3) Link with user-created object test.rel.
> lk78k4 s4l.rel test.rel test2.rel -s -bcl4.lib -otest -ptest

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

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

-78K4-

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

RA_Link
-0538
Error F111 is output during linking with the 78K4
Q1
When a link directive is created with the 78K4, error F111 is output during linking.
MEMORY RAM:(0E0000H,01FFFFH)
A1
With the 78K4, the SFR area must be included when memory RAM is redefined.
In the above case, memory RAM is from 0E0000H to 0FFFFEH, and an error occurs because the SFR area does not fit in.
Make correction as follows.
MEMORY RAM:(0E0000H,020000H)

-78K4-

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









































 LEGAL  RSS Feeds       © 1995-2008  NEC Electronics Corporation