KDS - problems with TSS library, GCC linker and my workaround

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

KDS - problems with TSS library, GCC linker and my workaround

Jump to solution
1,496 Views
lustfulrat
Contributor I

Hello all!

 

This is my first post on Freescale Community forum

 

A few days ago I dreged my FRDM-KL25 board up because of new project in my job, where I'd like to use L series processor. To check the board and new Kinetis Design Studio IDE I've created simple project:

- on LPTMR interrupt RGB led changes its colour: green, red, blue, green, red, blue...

- touching a slider changes a period of LPTMR from 1 to 1000ms

To setup peripherals and create appropiate event functions I'm using Processor Expert.

Everything works fine, but I've got some problems when I was trying to use TSS library component, this is my steps:

1. I've added TSS library component in Processor Expert and configured it to use analog slider from FRDM-KL25 board - OK

2. Processor Expert created some files in folder named TSS and added callback function in events.c file - OK

3. I've added some code changing LPTMR period inside callback function and also Configure() (to initialize TSS) before main loop and TSS_Task() inside main loop - OK

4. Build project - FAIL, eclipse (KDS) shows many errors "undefined reference to TSS_..." in main file and in some files from TSS folder

5. After reading TSS library user guide, analyzing .c and .h TSS files and console log I've realized that all missing functions comes from library libTSS_KXX_M0.a from TSS folder. So, ok, I don't know why but it seems that gcc linker can't see that library.

6. In project properties (Project->Properties->C/C++ Build->Tool settings tab->Cross ARM linker->Libraries) I've manually added library search path "${workspace_loc:/${ProjName}/Sources/TSS}" and library "TSS_KXX_M0". Build project - FAIL, "undefined reference to TSS_..." errors disappear but KDS shows new errors with "undefined reference to asm" in file TSS_SensorTSIL.c.

7. In function TSIL_Recalibrate and TSIL_InitThresholds there are lines with asm("NOP"); I've changed asm to __asm__ and.. tadaaa... build project - OK!

 

So why do I have to made these changes? I'am asking because of this: http://mcuoneclipse.com/2012/09/30/tutorial-touching-the-freedom-kl25z-board/ Author creates very similar simple project with TSS library without any problems, but he uses CodeWarrior 10.3 (also based on Eclipse), some maybe problems comes from KDS?

Labels (1)
0 Kudos
Reply
1 Solution
776 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello lustfulrat:

You are correct, these are issues with the TSS library integration into KDS. This was already reported to developers with ticket number PEXMCU-531 mentioned in release notes in your KDS installation:

C:\Freescale\KDS_2.0.0\eclipse\ProcessorExpert\PEx_KDS_2_0_0_Release_Notes.pdf

This problem was discussed in the next thread: TSS library for KL46 board using new KDS+PE tool

The developers will try to fix this for the next release of PEx and KDS.


Regards!,
Jorge Gonzalez

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

View solution in original post

0 Kudos
Reply
1 Reply
777 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello lustfulrat:

You are correct, these are issues with the TSS library integration into KDS. This was already reported to developers with ticket number PEXMCU-531 mentioned in release notes in your KDS installation:

C:\Freescale\KDS_2.0.0\eclipse\ProcessorExpert\PEx_KDS_2_0_0_Release_Notes.pdf

This problem was discussed in the next thread: TSS library for KL46 board using new KDS+PE tool

The developers will try to fix this for the next release of PEx and KDS.


Regards!,
Jorge Gonzalez

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

0 Kudos
Reply