[En-Nut-Discussion] Which is the latest greatest branch

Ulrich Prinz ulrich.prinz at googlemail.com
Sun Oct 30 20:06:52 CET 2011


Hi Harald,

On 29.10.2011 12:14, Harald Kipp wrote:
> Hi Ulrich,
> 
> In contrast to the Linux project, I do not want to be the guy who
> incarnates the final authority. The advantage of a small project like
> Nut/OS is, that it is able to cope with democracy. ;-)
> 
Let's just pick some of their strategies, not all of them :)
> 
> On 28.10.2011 23:19, Ulrich Prinz wrote:
>> On 28.10.2011 06:19, Henrik Maier wrote:
>>> arch/arm                  [generic ARM stuff like context.c]
>>> arch/arm/at91       [stuff for all AT91 devices]
>>> arch/arm/at91/sam9  [specific to this series]
>>> arch/arm/at91/sam7
>>> ...
> 
> I'm still not convinced, that this is the best long term solution. But I
> see the point and try to be realistic. My priority is, to reduce porting
> effort and maintenance to a minimum number of files for all platforms.
> On the other hand, Nut/OS is mainly driven by developers, who need a
> working solution for a specific product. These developers, including me,
> are always under deadline pressure. They simply do not have the time to
> adapt a solution to all platforms.
> 
> So, finally yes, let's move forward in the direction that Henrik proposed.
> 
> Regards,
> 
> Harald
> 
> 
> === OFF TOPIC ===
> 
> Nevertheless, I stumbled over one inconsistency.
> 
>> I agree, that we should look at those who did that job for a long time
>> now before we try to develop something on our own. And yes, the linux
>> structures look pretty fine to me.
> 
> Just the fact that Linux uses it, seems to sanctify everything these
> days. But wait....

No, definitely not, but they have some good ideas, so why not picking
them out. I had to do some driver development in Linux for the past few
month and I could start right in pretty fast. So there must be something
intelligent in the way they did it.
> 
>> ATMEL works with absolute register addresses while Cortex (and the whole
>> rest of the world) works with pointers to struct that represents a set
>> of registers.
> 
> Now what? As far as I know, Linux doesn't use structure pointers to
> access registers.

As I said, Not everything is perfect in one system or the other.

But if you work with an editor that supports you with fast text
completion, it is one thing to have a list of a billion of GPI...
registers, flags and masks or the other that you in the first few hits
have the real registers.
This pointer-way declaration reduces the list of candidates to a minimum
and speeds up you work a lot.

> 
> Btw., your statement about Atmel isn't fully correct. For specific
> reasons, avr-libc, not Atmel, uses absolute addresses. Atmel started to
> use structure pointers, when introducing the first ARM cores. Nut/OS for
> ARM, not Atmel, continued to use preprocessor macros for the AT91 family.
> 
> Don't get me wrong, I understand, that both versions have their pros and
> cons. I just wanted to correct the Atmel vs. whole world conclusion.

I never checked any original ATMEL driver library, just used what nutos
gave me. And I never ported an ATMEL CPU to nutos. So if ATMEL really
uses the pointer way, I have to excuse myself!

We must really again discuss the pros and cons, cause I couldn't find
any cons by using the pointer way.

Best regards
Ulrich



More information about the En-Nut-Discussion mailing list