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

[CA850] Link and Memory Mapping

Contents

    
FAQ-ID = CA850_Link-nnnn
0968: Message "F4257. segment "CONST" overflowed highest address of target machine." is displayed during linking.
0972: Message "F4264. start address (0x00000070) of section "SECURITY_ID" overlaps previous section "ILGOP" ended before address (0x00000080)." is displayed during linking.
0987: How can variables be allocated in the order in which they have been declared?
CA850_Link
-0968
Message "F4257. segment "CONST" overflowed highest address of target machine." is displayed during linking.
Q1
Table data is placed in external ROM, and the following error message is output during linking.

F4257: segment "CONST" overflowed highest address of target machine.

A1
Check if the setting of the address space of the CPU of the target device and the setting of the address space of the CPU of the CA850 are not different.

The address space of the CPU of the CA850 is treated as 64 MB by default.
If the address space of the CPU of the target device is 256 MB, therefore, the -X256M option must be specified.

To use PM+, specify "256M Byte Mode" in the [Device] tab of the Compiler Common Option setting dialog box.

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

CA850_Link
-0972
Message "F4264. start address (0x00000070) of section "SECURITY_ID" overlaps previous section "ILGOP" ended before address (0x00000080)." is displayed during linking.
Q1
The following error message is output when setting of a security ID for an on-chip debugger is embedded in the startup file with the CA850 V3.00.

F4264: start address (0x00000070) of section "SECURITY_ID" overlaps previous section "ILGOP" ended before address (0x00000080).

A1
The CA850 V3.00 or later assumes that "0xffffffffffffffffffff" (ten 0xff's) is specified if no security ID is specified for a device that supports a security ID function.

Consequently, the above error message is displayed because the ILGOP section and the default security ID overlap.

Take either of the following preventive actions.
(Information of the security ID must be registered in the device file.)
  1. Specify the +Xsid option of the linker to suppress the security ID generation function.

  2. Change the program so that ILGOP is not used and so that a security ID and the section of option byte are used.

    Example:
[Description before modification]
#-------------------------------------------------------------------
#	ILGOP handler
#-------------------------------------------------------------------
	.section	"ILGOP"	--interrupt handler address 0x60
	.org	0x10		--skip handler address to 0x70
#-------------------------------------------------------------------
#	SECURITY_ID(continue ILGOP handler)
#-------------------------------------------------------------------
	.word	0xffffffff	--0-3 byte code,Address is 0x70-0x73
	.word	0xffffffff	--4-7 byte code,Address is 0x74-0x77
	.hword	0xffff		--8-9 byte code,Address is 0x78-0x79
#-------------------------------------------------------------------
#	OPTION_BYTES(continue ILGOP handler)
#-------------------------------------------------------------------
	.hword	0x0000		--0-1 byte code,Address is 0x7a-0x7b
	.hword	0x0000		--2-3 byte code,Address is 0x7c-0x7d
	.hword	0x0000		--4-5 byte code,Address is 0x7e-0x7f

[Description after modification]
#-------------------------------------------------------------------
#	SECURITY_ID
#--------------------------------------------------------------------
	.section	"SECURITY_ID"
	.word	0xffffffff	--0-3 byte code,Address is 0x70-0x73
	.word	0xffffffff	--4-7 byte code,Address is 0x74-0x77
	.hword	0xffff		--8-9 byte code,Address is 0x78-0x79
#-------------------------------------------------------------------
#	OPTION_BYTES
#-------------------------------------------------------------------
	.section	"OPTION_BYTES" 
	.hword	0x0000		--0-1 byte code,Address is 0x7a-0x7b
	.hword	0x0000		--2-3 byte code,Address is 0x7c-0x7d
	.hword	0x0000		--4-5 byte code,Address is 0x7e-0x7f

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

CA850_Link
-0987
How can variables be allocated in the order in which they have been declared?
Q1
How can variables be allocated in the order in which they have been declared?
A1
If an object file that makes extern declaration of a variable is linked before an object file that temporarily defines a variable, the linker determines the location of the variable of extern declaration first.
To locate variables in the order of declaration, the object file that temporarily defines a variable must be linked before the object file that makes extern declaration of that variable.
Example:
/* func1.c */
extern  int b;
void func1( void )
{
    ...
}

/* func2.c */
int a;
int b;
int c;
void func2( void )
{
    ...
}
c: \> ld850.exe file1.o file2.o
Variables b, a, and c are located in that order because variable b is located first by file1.o of extern declaration.

c: \> ld850.exe file2.o file1.o
Variables a, b, and c are located in that order because extern declaration of variable b of file1.o is made after variables a, b, and c of file2.o are located.


When variables are defined by using the #pragma section, they are located in the order in which they have been defined.
Example:
#pragma section sdata begin
    unsigned short  a;
    unsigned short  b;
    unsigned short  c;
#pragma section sdata end

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









































 LEGAL  RSS Feeds       © 1995-2008  NEC Electronics Corporation