Kinetic M - Bare metal ADC example code linker errors

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

Kinetic M - Bare metal ADC example code linker errors

5,528 次查看
Jaya
Contributor II

I tried building IAR project for ADC example from following bare metal driver samples.

C:\Freescale\KM128SWDRV_R3_0_0\build\iar_6_50\projects\adc_test 

I got following linker errors. I am new to Kinetics, any help?

Error[Lp049]: there was no reference to __iar_data_init3, but it is needed to
initialize section .bss (adc.o #8)
Error[Lp048]: the init table "Table" is needed to initialize some variables,
but there are no references to it

Thanks

Jayaraman

标签 (1)
5 回复数

3,453 次查看
terry_lv
NXP Employee
NXP Employee

Hi,

  It is suggested by IAR to add:

do not initialize {readwrite }; to the icf link file.

  So the icf file will look like:

...

do not initialize { section .noinit };

do not initialize { readwrite };

...

  Thanks!

Regards

Terry

0 项奖励
回复

3,453 次查看
MarMi
NXP Employee
NXP Employee

Hi Jayaraman,

seeing this report, I guess that you're using IAR 7.50.x or higher revision where the linker started to emit an error when some initialization has been requested, but the program contains no reference to the initialization routine, or to the init table . You can get rid of this error by replacing this line in linker file: do not initialize   { section .noinit }; by the following one: do not initialize   { zeroinit }.

Other option is to use a newer version of bare metal drivers (KMSWDRVAPIRM_SW.zip R 4.1.5) which can be downloaded from MKM34 Documentation Page.

Kind regards,

Martin M.

3,453 次查看
Jaya
Contributor II

Hi Martin, yes, i am using IAR 7.5 and the change you suggested works. thanks.

0 项奖励
回复

3,453 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Jayaraman,

    Could you tell me where you get the KM128SWDRV example? And what the chip you are using? Tell me the part number.

   In fact, you can use our KSDK2.0 code for KM34, you can download KSDK2.0 code from this link:

Welcome to Kinetis Expert | Kinetis Expert 

  Choose the KM34 chip, and generate the according KSDK2.0.

Wish it helps you!

If you still have question,  please let me know!


Have a great day,
Jingjing

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

0 项奖励
回复

3,453 次查看
Jaya
Contributor II

Thanks Jingjing. your idea helps me a lot.

0 项奖励
回复