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.
Port for Freescale Kinetis?
Moderator: utzig
- Giovanni
- Site Admin
- Posts: 14461
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Port for Freescale Kinetis?
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
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
Re: Port for Freescale Kinetis?
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
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
Re: Port for Freescale Kinetis?
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.
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.
- Giovanni
- Site Admin
- Posts: 14461
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Port for Freescale Kinetis?
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
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
Re: Port for Freescale Kinetis?
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
I'm glad to hear you'll be working on supporting the Kinetis L at some point!
I look forward to it.
Regards,
Colin
Re: Port for Freescale Kinetis?
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
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
- Giovanni
- Site Admin
- Posts: 14461
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Port for Freescale Kinetis?
Hi,
Post it in the contributions forum, somebody could be looking exactly for that.
Giovanni
Post it in the contributions forum, somebody could be looking exactly for that.
Giovanni
Who is online
Users browsing this forum: No registered users and 1 guest