K60N512 .data and .data_init definition.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

K60N512 .data and .data_init definition.

890 次查看
Smiler
Contributor III

Hi,

I am trying to resurrect my Freescale Tower TWR-K60N512 (MK60N512VMD100).

The IAR linker is complaining...

Linking

Error[Li005]: no definition for "__VECTOR_RAM" [referenced from C:\Users\Peter Goddard\Documents\Freescale Tower\Kinetis\hello_world\RAM_128KB\Obj\

startup.o]

Error[Li005]: no definition for "__VECTOR_TABLE" [referenced from C:\Users\Peter Goddard\Documents\Freescale Tower\Kinetis\hello_world\RAM_128KB\Obj\

startup.o]

Error[Li005]: no definition for "__BOOT_STACK_ADDRESS" [referenced from C:\Users\Peter Goddard\Documents\Freescale Tower\Kinetis\hello_world\

RAM_128KB\Obj\vectors.o]

Warning[Lp012]: no sections with name .data included - special symbol .data$$Base (referenced from C:\Users\Peter Goddard\Documents\Freescale Tower\

Kinetis\hello_world\RAM_128KB\Obj\startup.o) will be zero

Warning[Lp012]: no sections with name .data_init included - special symbol .data_init$$Base (referenced from C:\Users\Peter Goddard\Documents\Freescale

Tower\Kinetis\hello_world\RAM_128KB\Obj\startup.o) will be zero

Warning[Lp012]: no sections with name CodeRelocateRam included - special symbol CodeRelocateRam$$Base (referenced from C:\Users\Peter Goddard\

Documents\Freescale Tower\Kinetis\hello_world\RAM_128KB\Obj\startup.o) will be zero

Warning[Lp012]: no sections with name CodeRelocate included - special symbol CodeRelocate$$Base (referenced from C:\Users\Peter Goddard\Documents\

Freescale Tower\Kinetis\hello_world\RAM_128KB\Obj\startup.o) will be zero

Error while running Linker

The file startup.c contains the following snippet...

data_ram = __section_begin(".data");

data_rom = __section_begin(".data_init");

data_rom_end = __section_end(".data_init");

n = data_rom_end - data_rom;

The linker is using the standard file

$TOOLKIT_DIR$\examples\Freescale\K60\TWR-K60\GettingStarted\config\K60X_ram.icf

.data and.data_init are not defined in it so how do I define it?

Thanks in advance.

标签 (1)
标记 (3)
0 项奖励
1 回复

434 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi Peter,

Thank you for your interest in NXP Semiconductor products and the opportunity to serve you.

I'd highly recommend you to use the sample code of the TWR-K60D100M and its link is below.

https://cache.nxp.com/files/microcontrollers/software/app_software/code_examples/KINETIS512_V2_SC.zi...

Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励