Port for Freescale Kinetis?

ChibiOS public support forum for topics related to the Freescale Kinetis family of micro-controllers.

Moderator: utzig

wgreiman
Posts: 33
Joined: Sun Oct 23, 2011 3:21 pm
Been thanked: 2 times

Port for Freescale Kinetis?

Postby wgreiman » Sat Sep 29, 2012 3:12 pm

Has anyone explored porting ChibiOS to Freescale Kinetis Cortex M4 processors?

I am looking at this "Teensy 3.0" board http://www.kickstarter.com/projects/paulstoffregen/teensy-30-32-bit-arm-cortex-m4-usable-in-arduino-a.

I have used ChibiOS on AVR Arduino boards with the Arduino IDE by packaging ChibiOS as an Arduino library. I plan to try the same idea with Paul Stoffregen's Teensy 3.0 board.

Any advice for porting to Kinetis CM4 processors would be appreciated.

I have used ChibiOS on a number of Cortex boards and have ported other RTOSs like VxWorks to new processors/boards.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Port for Freescale Kinetis?

Postby Giovanni » Sat Sep 29, 2012 3:42 pm

Hi,

Very nice small board.

The use of the kernel alone should be straightforward, you just need to create the files vectors.c, cmparams.h and the linker script under a ports/GCC/ARMCMs/Kinetis directory. Just follow the pattern of other devices presents there, you can have it working in minutes.

If you plan to start implementing an HAL then it is longer process, I recommend starting with a simple HAL driver (the clock tree settings are the most complex part), then simple PAL and Serial drivers. Supporting a single device is easy enough, it is more complex if you want to support the whole Kinetis family.

Supporting the whole family requires keeping a directory of shared device drivers, see the platforms/STM32 directory for example, and the have a single directory for each family member with the specific parts.
The problem is to define the internal interfaces between the "family code" and the device-specific code, for the STM32 several abstractions were required: clock, DMA, ISR.

I am in the middle of creating a similar "family" support structure for the SPC5xx/MPC5xxx devices and probably next I will do the same for the new Atmel cortex devices.

Please let me know if I can assist you in your effort, I already had plans for the new Kinetis L after the others I mentioned so it is something I was already considering.

Giovanni

pricecw
Posts: 1
Joined: Wed Oct 03, 2012 4:37 am

Re: Port for Freescale Kinetis?

Postby pricecw » Wed Oct 03, 2012 4:44 am

I am interested in this too. I have just started looking at the code, and really like the idea of a good RTOS on this for simple projects.

Let me know what you get going, I need to carve out some time to work on this, but it would be nice to have others working on it also.

--Carl

colin
Posts: 149
Joined: Thu Dec 22, 2011 7:44 pm

Re: Port for Freescale Kinetis?

Postby colin » Fri Dec 07, 2012 12:40 am

Just saying WOW the Freedom FRDM-KL25Z board (US$13 including onboard SWD debugger) and the MKL25Z128 (16K of RAM!) are really sweet in terms of features, pin count (80 pins!) and cost (MCU only about US$2.00 on Mouser in qty 100). I have been an STM32 fan in the past but it has fallen out of my favor for various reasons. I am starting to like this Kinetis L line.

If I start using Kinetis MCUs much, I would like to contribute to a ChibiOS/RT board for Kinetis. I don't have much experience or deep knowledge of the family yet, but I hope the KL (Kinetis L Cortex-M0+) and K series (Kinetis K10, K20, etc. Cortex-M4) have good compatible peripherals.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Port for Freescale Kinetis?

Postby Giovanni » Fri Dec 07, 2012 9:21 am

Hi,

Thanks for your offer but I just received a freedom board :), I am really looking forward to support it. It is next in queue after the SAM4L.

I am still an STM32 fan however :)

Giovanni

colin
Posts: 149
Joined: Thu Dec 22, 2011 7:44 pm

Re: Port for Freescale Kinetis?

Postby colin » Fri Dec 07, 2012 6:49 pm

Hi Giovanni,

I'm glad to hear you'll be working on supporting the Kinetis L at some point!
I look forward to it.

Regards,
Colin

CalM
Posts: 15
Joined: Tue Jul 12, 2011 8:02 pm

Re: Port for Freescale Kinetis?

Postby CalM » Sun Jan 13, 2013 2:06 pm

Hi Giovanni,

sorry for being this late, but i found an old uVision Projekt for usage with the Kinetis KWIKSTIK-K40. Its just a Basic setup to get the MCU and ChibiOS running, but maybe it is usefull to someone.
Its a saml Sample of a Teatimer with some Threds and IPC working, as the Touch Perriperals. I there is any interrest i would like to hand over the files, may i find also the UART, GPIO and CAN Lowlevel drivers for the Chip along with the project.
If any interrest give some feedback.

Regards

CalM

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Port for Freescale Kinetis?

Postby Giovanni » Sun Jan 13, 2013 3:59 pm

Hi,

Post it in the contributions forum, somebody could be looking exactly for that.

Giovanni


Return to “Kinetis Support”

Who is online

Users browsing this forum: No registered users and 4 guests