Merging Kinetis Enhancements

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

Moderator: utzig

jstruebel
Posts: 19
Joined: Sat Oct 17, 2015 5:59 am
Has thanked: 2 times
Been thanked: 3 times
Contact:

Merging Kinetis Enhancements

Postby jstruebel » Mon Feb 22, 2016 2:02 am

Is there a plan to merge the Kinetis enhancements that flabbergast has been making into the ChibiOS master? I've been using it for my own development since I need the USB functionality.

This is coming up because I've been working on a shell that wraps the microrl library into the same format that Giovanni created under os/various that I figured would be useful in the Contribs repository. However, when I went to build it against the ChibiOS master there were some definitions missing or changed vs flabbergast's fork. If it is not planned to try and merge it, I'll make the necessary changes to the demo so that it will build against the ChibiOS master. I just didn't want to do that if it would be made obsolete by an eventual merge.

If there is anything that I can help with to speed up merging it into the ChibiOS master let me know as I'd like to see Kinetis supported well by ChibiOS.

Jonathan

utzig
Posts: 353
Joined: Sat Jan 07, 2012 6:22 pm
Location: Brazil
Has thanked: 1 time
Been thanked: 15 times
Contact:

Re: Merging Kinetis Enhancements

Postby utzig » Mon Feb 22, 2016 12:24 pm

Where are the patches?

flabbergast
Posts: 71
Joined: Sat Aug 22, 2015 1:22 pm

Re: Merging Kinetis Enhancements

Postby flabbergast » Tue Feb 23, 2016 12:55 am

Well there are no patches because I've made a lot of changes. The tree is here: https://github.com/flabbergast/chibios/tree/kinetis
I try to keep up with with master, but I've postponed pulling this week because of Giovanni's big update.

EDIT: I'd be happy if it got merged somehow (maybe to contrib?), but I understand that there may be lots of places where the code isn't 'up to standards'. I'd appreciate suggestions as to how/what to change it to make it merge-able.

utzig
Posts: 353
Joined: Sat Jan 07, 2012 6:22 pm
Location: Brazil
Has thanked: 1 time
Been thanked: 15 times
Contact:

Re: Merging Kinetis Enhancements

Postby utzig » Tue Feb 23, 2016 1:14 am

Sorry but I ain't got all the time in the world to keep looking for other's people work and bring it in. I see two options here:

1) People send patches through forum or SF issues (argh!)

2) I can move the Kinetis port to ChibiOS-Contrib and people can use the wonderful collaboration tools of Github to send pull requests, etc. I suggested this before but it seemed very offensive to some! But this is my preferred way to work and how I started the NRF51 port and will repeat for any port I may do in the future if that eventually happens.

What would you prefer?

utzig
Posts: 353
Joined: Sat Jan 07, 2012 6:22 pm
Location: Brazil
Has thanked: 1 time
Been thanked: 15 times
Contact:

Re: Merging Kinetis Enhancements

Postby utzig » Tue Feb 23, 2016 1:16 am

flabbergast wrote:but I understand that there may be lots of places where the code isn't 'up to standards'.

You're probably being modest, but even if the code is not that great, It's better to have the code than not, because something that exists can be improved.

flabbergast
Posts: 71
Joined: Sat Aug 22, 2015 1:22 pm

Re: Merging Kinetis Enhancements

Postby flabbergast » Tue Feb 23, 2016 1:35 am

Yep, I fully understand that there's probably no way anyone would review that many changes. I would personally welcome moving the kinetis port to contrib, especially if that means that we can then use github's pull request infrastructure to collaborate.

In any case, the currently my kinetis branch is at a relatively good stage - there's of course stuff to do but most of the stuff I wanted to accomplish is there. To summarise the work: added USB driver (mostly from RedoX, fixed some bugs (thanks jstruebel!)), moved most of the drivers to LLD (as opposed to KL2x/ and K20x/), added some MCUs (KL26Z, KL27Z wip), boards (Teensy LC and 3.x), demos, updated CMSIS defs. More annoyingly - I've changed the structure of the port a bit, so that it resembles the STM32 tree a bit more (kinetis_registry.h and things like that).

I consider the USB driver tested (a few people tried/used it, I use it in a bunch of actual keyboards). I haven't touched the other drivers too much except for cleanup.

Anyway, what I can do is start again from a clean master tree (be it official or contrib), copy the 'new' code over, and thus 'squash' the commits to a few logically grouped patches. The individual patches will still be probably big, but (hopefully) more reviewable than cca 120 commits. {I have to find a way to give proper credit to RedoX for writing the original version of the driver, and jstruebel for bugfixes.}

utzig
Posts: 353
Joined: Sat Jan 07, 2012 6:22 pm
Location: Brazil
Has thanked: 1 time
Been thanked: 15 times
Contact:

Re: Merging Kinetis Enhancements

Postby utzig » Tue Feb 23, 2016 9:52 pm

I'll try to copy the KINETIS port to ChibiOS-Contrib in the weekend.

User avatar
RoccoMarco
Posts: 596
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 72 times
Been thanked: 53 times
Contact:

Re: Merging Kinetis Enhancements

Postby RoccoMarco » Tue Feb 23, 2016 10:03 pm

Hi. Can I suggest to help you in the review process in order to add somehow these patches under the main svn trunk?

utzig
Posts: 353
Joined: Sat Jan 07, 2012 6:22 pm
Location: Brazil
Has thanked: 1 time
Been thanked: 15 times
Contact:

Re: Merging Kinetis Enhancements

Postby utzig » Tue Feb 23, 2016 10:27 pm

I believe moving to Github might be the best option. Btw, I will not remove the port from SVN at first (just in case). Github is the right place for collaborative work. I don't really like receiving files/patches/etc when there is a really good online ecosystem which provides a way for a reviewer to do a lot of the work like adding comments, suggestions without having to download anything. Also checking out branches from other contributors to do testing is trivial, contributing to projects is trivial, etc. All of which lowers the complexity of contributing and attracts more people. I don't really nurture hopes of the main ChibiOS repo ever moving to GH anymore because people are much more focuses on a lonely work style and writing code rather than building a community. But it's kind of clear right now that there's only one way to grow a project which is adding more people and making it easier for them to contribute and we should try that.

Cheers,
Fabio Utzig

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

Re: Merging Kinetis Enhancements

Postby Giovanni » Wed Feb 24, 2016 1:40 pm

utzig wrote:lonely work style


Lonely work style? ChibiOS is meant to be a commercial-quality product not some random "me too" RTOS.

There is the community repository for collaborative efforts and it is working so well that most of demos there don't get updated when HAL or RT evolve, forgive me if I feel the need to keep the core code up to a somehow higher standard.

Anyway, even in case of a git migration it would not be github.

Giovanni


Return to “Kinetis Support”

Who is online

Users browsing this forum: No registered users and 2 guests