Hi giusseppez,
I forgot to insert the lcf file (LinkerConfigurationFile).You find the content of my lcf file of my running example. Probably the problem you have is caused by the stack (the USB need big stack...).
The lcf file is inside your project folder:
{PrjFolder}\Project_Settings\Linker_Files\ProcessorExpert.lcf
Try this and let me know.
/**************************/
## ###################################################################
####
#### THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
####
#### Filename : ProcessorExpert.lcf
####
#### Project : ProcessorExpert
####
#### Processor : MK60DN512ZVLQ10
####
#### Compiler : CodeWarrior ARM C Compiler
####
#### Date/Time : 2013-01-25, 15:35, # CodeGen: 5
####
#### 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 {
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x000001E0
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007FBF0
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
m_data_20000000 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00010000
m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
}
SECTIONS {
## Heap and Stack sizes definition
__heap_size = 0x1000;
___stack_size = 0x1000;
.interrupts :
{
__vector_table = .;
* (.vectortable)
. = ALIGN (0x4);
} > m_interrupts
.cfmprotect :
{
*(.cfmconfig)
. = ALIGN (0x4);
} > m_cfmprotrom
.text :
{
* (.text)
. = ALIGN(0x4);
* (.rodata)
. = ALIGN(0x4);
___ROM_AT = .;
___DATA_ROM = .;
} > m_text
.data : AT(___ROM_AT)
{
___DATA_RAM = .;
* (.ARM.extab)
. = ALIGN(0x4);
__exception_table_start__ = .;
EXCEPTION
__exception_table_end__ = .;
__sinit__ = .;
STATICINIT
___DATA_START =.;
* (.data)
. = ALIGN (0x4);
## Additional data sections defined by components
. = ALIGN (0x0200);
* (.USB1_memory_section)
___DATA_END =.;
__SDATA_START =.;
* (.sdata)
. = ALIGN (0x4);
__SDATA_END = .;
__SDA_BASE = .;
. = ALIGN(0x4);
} > m_data
___m_data_20000000_ROMStart = ___ROM_AT + SIZEOF(.data);
.m_data_20000000 : AT(___m_data_20000000_ROMStart)
{
. = ALIGN(4);
___m_data_20000000_RAMStart = .;
*(.m_data_20000000) /* This is an User defined section */
___m_data_20000000_RAMEnd = .;
. = ALIGN(4);
} > m_data_20000000
___m_data_20000000_ROMSize = ___m_data_20000000_RAMEnd - ___m_data_20000000_RAMStart;
.bss :
{
__START_SBSS = .;
* (.sbss)
*(SCOMMON)
__END_SBSS = .;
__START_BSS = .;
* (.bss)
* (COMMON)
__END_BSS = .;
. = ALIGN(0x4);
} >> m_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) +SIZEOF(.m_data_20000000);
.romp : AT(_romp_at)
{
__S_romp = _romp_at;
WRITEW(___ROM_AT);
WRITEW(ADDR(.data));
WRITEW(SIZEOF(.data));
WRITEW(___m_data_20000000_ROMStart);
WRITEW(___m_data_20000000_RAMStart);
WRITEW(___m_data_20000000_ROMSize);
WRITEW(0);
WRITEW(0);
WRITEW(0);
}
}