Hi Kan,
I'm working with CW 10.3. I try with your code, but the problem is the same. I add the memory and section codes.
It reported me:
"Overflow in segment: code from section: .text Segment reserved size is: 0x0003f000 -- Overflow of: 0x00001d34 "
It doesn't recognize the new size of the code.
I attached you the complete file below.
Please, help me.
Very thanks again. Best regard,
Miguel
-------------------------------------------------------------------------------------
## ###################################################################
####
#### THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
####
#### Filename : ProcessorExpert.lcf
####
#### Project : ProcessorExpert
####
#### Processor : MK20DX256VLL7
####
#### Compiler : CodeWarrior ARM C Compiler
####
#### Date/Time : 2013-03-18, 13:58, # CodeGen: 54
####
#### Abstract :
####
#### This file is used by the linker. It describes files to be linked,
#### memory ranges, stack size, etc. For detailed description about linker
#### command files see compiler documentation. This file is generated by default.
#### You can switch off generation by setting the property "Generate linker file = no"
#### in the "Build options" tab of the CPU component and then modify this file as needed.
####
####
#### ###################################################################
KEEP_SECTION { .vectortable }
KEEP_SECTION { .cfmconfig }
MEMORY {
code (RX) : ORIGIN = 0x00000400, LENGTH = 0x0003F000
code1 (RX) : ORIGIN = 0x10000000, LENGTH = 0x00004000 //<<<---------------------------------
data (RW) : ORIGIN = 0x1FFF8010, LENGTH = 0x0000FFEF
cfmprotrom (RX) : ORIGIN = 0x00010400, LENGTH = 0x00000010
}
SECTIONS {
## Heap and Stack sizes definition
__heap_size = 0x0800;
___stack_size = 0x0800;
.interrupts :
{
__vector_table = .;
* (.vectortable)
. = ALIGN (0x4);
} > interrupts
.cfmprotect :
{
*(.cfmconfig)
. = ALIGN (0x4);
} > cfmprotrom
.text :
{
* (.text)
. = ALIGN(0x4);
* (.rodata)
. = ALIGN(0x4);
___ROM_AT = .;
___DATA_ROM = .;
} > code
.text1 : //<<<---------------------------------
{
* (.text1)
. = ALIGN(0x4);
* (.rodata)
. = ALIGN(0x4);
___ROM_AT = .;
___DATA_ROM = .;
} > code1
.data : AT(___ROM_AT)
{
___DATA_RAM = .;
* (.ARM.extab)
. = ALIGN(0x4);
__exception_table_start__ = .;
EXCEPTION
__exception_table_end__ = .;
__sinit__ = .;
STATICINIT
___DATA_START =.;
* (.data)
. = ALIGN (0x4);
___DATA_END =.;
__SDATA_START =.;
* (.sdata)
. = ALIGN (0x4);
__SDATA_END = .;
__SDA_BASE = .;
. = ALIGN(0x4);
} > data
.bss :
{
__START_SBSS = .;
* (.sbss)
*(SCOMMON)
__END_SBSS = .;
__START_BSS = .;
* (.bss)
* (COMMON)
__END_BSS = .;
. = ALIGN(0x4);
} >> data
___HEAP_START = .;
___HEAP_END = ___HEAP_START + __heap_size;
___SP_END = ___HEAP_END;
___SP_INIT = ___SP_END + ___stack_size;
__heap_addr = ___HEAP_START;
__heap_size = ___HEAP_END - ___HEAP_START;
__SP_INIT = ___SP_INIT;
_romp_at = ___ROM_AT + SIZEOF(.data);
.romp : AT(_romp_at)
{
__S_romp = _romp_at;
WRITEW(___ROM_AT);
WRITEW(ADDR(.data));
WRITEW(SIZEOF(.data));
WRITEW(0);
WRITEW(0);
WRITEW(0);
}
}