6 years, 8 months ago.

Compatibility with other boards than KL25Z ?

I wish to use this library on a KL46Z or KL64F, but I fail to compile it with those platforms (error 5).

I noticed that mbed is included inside the library, and I believe this mbed version is for KL25Z. Which I suppose is causing the issue. How can I fix it ?

Question relating to:

Official library for the FRDM-TFC shield Cup, Freescale

2 Answers

6 years, 8 months ago.

We don't know the error numbers directly: It is useful to copy the complete message.

However it seems like the mbed lib is really old in there, and shouldn't be in there. So easiest is to just delete the mbed lib from it if you have it also in your program.

6 years, 8 months ago.

The library was designed specifically for the KL25Z board. At the time of the design, it was the only FRDM board. The K64F did not come until much later. It is possible to port it but you will have to do some work.

1.) The only files you need are TFC.cpp and TFC.h 2.) See the Implementation notes here:

https://developer.mbed.org/users/emh203/code/FRDM-TFC/

The IO (PWM, etc) DO NOT use the mbed API. To get the correct signals driving the servos and motors, we needed extra PWM channels with separate time bases. You will need to look at the pinout of the K64F and may have to cut some traces, etc to route appropriately.

Also, the KL25Z peripherals (i.e. timers) are based upon Freescale's TPM timers from the HC08 series. The K64F timers are more complicated. You will have to look at the K64F peripherals manual to see what to change.

3.) This would be a good porting exercise BUT it will take some time. Some of the compiler errors will probably be due to registers in the KL25z that not present in the K64F.