[En-Nut-Discussion] Porting Nut/OS to atmel's SAM3U (cortex-m3)

Nikolay Zamotaev n.zamotaev at metrotek.spb.ru
Fri Apr 9 09:45:35 CEST 2010


quote on Fri, Apr 09, 2010 at 09:24:03AM +0200 (Harald Kipp):

> On 09.04.2010 02:59, Ulrich Prinz wrote:
> 
> > Let's get the platform in. Another LPC is waiting and I'll get some old 
> > Betty remotes that like to be driven by Nut/OS as well, driven by LPC 
> > ARMs too.
> 
> Michael Fischer and I inspected the code a bit further and unfortunately
> there are more problems than expected.
> 
> Nikolay got most of the header files from Atmel's framework. They are
> somewhat different from the headers used by Nut/OS. As a result we have
> a lot of duplicate code. For example gpioa_sam3u.c differs from
> gpioa_at91.c by a few lines only, simply because of different port names:
> 
> - outr(PIOA_IER, _BV(bit));
> + outr(AT91C_PIOA_IER, _BV(bit));
> 
> This may soon result in a maintenance nightmare.
> 
It already became one for me. I was planning rewriting code, but the
company I work for, found out that Atmel was unable to ship chips in
time. So we switched to readily awailable stm32f105 chip, also with
cortex m3 architecture.
While rewriting code for stm32 I found out that I should have written 
the code for handling interrupts and systick a bit differently, not 
using Atmels headers, but using Arm's core_cm3 library. This way it
would work on any cortex m3 processor by changing just a few defines.
There is already this code partly rewritten, but I need to clean it 
up and recheck that it runs both on sam3u-ek and stm32f105.

> What really stopped me from publishing is Nikolay's ease of handling
> copyrights. ;-) Michael found several lines, which had been directly
> copied from Atmel's code without mentioning this in the copyright notice.
> 
> Don't get me wrong, IMHO this doesn't reduce Nikolay's credit making
> Nut/OS run on Cortex. But before adding this to our code base, it'd need
> some "fine tuning".
Ouch. I am sorry. What else can I say? It is my first experience of
publishing code (except for some selfwritten pieces).
> 
> Harald
> 
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion

-- 
Nikolaj Zamotaev
STC Metrotek
St.Petersburg



More information about the En-Nut-Discussion mailing list