Kinetic M - Bare metal ADC example code linker errors

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kinetic M - Bare metal ADC example code linker errors

5,531 Views
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

Labels (1)
5 Replies

3,456 Views
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 Kudos
Reply

3,456 Views
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,456 Views
Jaya
Contributor II

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

0 Kudos
Reply

3,456 Views
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 Kudos
Reply

3,456 Views
Jaya
Contributor II

Thanks Jingjing. your idea helps me a lot.

0 Kudos
Reply