Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Freescale K20 MCUs and the mchck board #2271

Closed
wants to merge 3 commits into from
Closed

Add support for Freescale K20 MCUs and the mchck board #2271

wants to merge 3 commits into from

Conversation

felinira
Copy link

@felinira felinira commented Jan 9, 2015

This adds multiple things:

  • A cpu/kinetis_common module that includes drivers for Freescale Kinetis microcontrollers. This needs a lot of testing right now as it is only working on k20 CPUs.
  • The cpu/k20 module that includes code for the Freescale K20 series. This is in an early stage with some bugs remaining in the UART code (transmission is working, there still seem to be some problems with receiving data though.)
  • A very simple implementation for the mchck board.

This is very obviously not done yet. I am mainly creating this pull request so that people can look at the code, make suggestions and otherwise comment on the matter. As I added a kinetis_common module this would also be very relevant to the kinetis k60 port that is currently ongoing. I figured it would be easier if those drivers would reside in one directory instead of many different ones. I can split the pull requests if this is desired, I just thought that a _common module without anything to at least test build it would be more or less useless.

Finn Wilke added 3 commits January 9, 2015 07:52
This needs a lot of testing right now as it is only tested on k20 CPUs
The cpu/k20 module includes code for the Freescale K20 series. This is
in an early stage with some bugs remaining in the UART code
(transmission is working, there still seem to be some problems with
receiving data though.)
@miri64 miri64 added Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet labels Jan 9, 2015
@miri64
Copy link
Member

miri64 commented Jan 9, 2015

There is also an import of cpu/kinetis_common at #2265, or was that the port you were referring to?

@miri64
Copy link
Member

miri64 commented Jan 9, 2015

For those who are unfamiliar with the MCHCK: https://mchck.org/

@jnohlgard
Copy link
Member

See also #2188 for a coordination/tracker for all things related to Kinetis MCUs.
@Farthen Do you want me to add the K20 and your stuff to that todo-list so that we can coordinate our efforts better?

@OlegHahm OlegHahm added the Platform: ARM Platform: This PR/issue effects ARM-based platforms label Jan 9, 2015
@felinira
Copy link
Author

felinira commented Jan 9, 2015

This is interesting, I completely missed that kinetis_common PR. I checked a few days ago but not when creating the PR today. Should have :)

Thanks for adding it to that list. I will look through some of that existing code, compare it with mine, test it on my device and merge the things together.

@OlegHahm
Copy link
Member

OlegHahm commented Jan 9, 2015

Great work and welcome to RIOT!

@jnohlgard
Copy link
Member

I recommend that you find a CMSIS compliant header for the device rather than the memory map header found among the Freescale downloads, for easier integration with the other Kinetis ports and other Cortex-M4 code.

http://www.keil.com/dd/docs/arm/freescale/kinetis/mk20dz10.h is one example. A recent one can be found in the Keil MDK (Windows IDE).

@felinira
Copy link
Author

Ah thanks, I didn't know those were available, I searched for them before but probably just not enough. I'll use them then.

@jnohlgard
Copy link
Member

@Farthen Actually, that header has an incompatible license, sorry. We need to resolve this header situation some other way..

@felinira
Copy link
Author

Yup, the headers I found don't have any license information embedded in them at all (only Copyright: 1997 - 2012 Freescale, Inc. All Rights Reserved.) Should I write Freescale and ask them if they could (re)license them or would they just not care?

@jnohlgard
Copy link
Member

@Farthen My guess is that they won't care until someone complains. Could you write them asking for permission to distribute the files?

@felinira
Copy link
Author

I asked them. I hope I'll get a response soon, but we will see about that. I did ask them about all of the K20 headers so if I get an OK from them I'll just include them all to prevent future hassle with this.

Oh and I found out that the D10 header I used was wrong, I need the D5 header for the 50 MHz MCU I am using.

@felinira
Copy link
Author

Quick update: I got a response from Freescale telling me I should contact Keil because I obtained the header files through them. So now I wrote Keil about it… I am expecting a lot of ping-pong here but we'll see. This can only be a matter of months until it is resolved. ^^

@jnohlgard
Copy link
Member

@Farthen Could you ask them for redistribution licenses for all our other unresolved Kinetis CPU headers?

  • MK60DZ10.h
  • MKW22D5.h
  • MKW01Z4.h

@felinira felinira closed this Jan 17, 2015
@felinira felinira deleted the mchck branch January 17, 2015 10:03
@felinira
Copy link
Author

Whops, I was cleaning up and accidentally closed this. Well… I'll reopen once I have the license situation cleared.

@OlegHahm OlegHahm added the State: archived State: The PR has been archived for possible future re-adaptation label Jan 28, 2015
@thomaseichinger
Copy link
Member

@Farthen @gebart Seems Freescale is ok with distributing the header files with the copyright header untouched. I still would prefer a proper license header but ...

@jnohlgard
Copy link
Member

This is great news, now we can tick off another couple of points on the big tracker #2188

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR Platform: ARM Platform: This PR/issue effects ARM-based platforms State: archived State: The PR has been archived for possible future re-adaptation State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants