[En-Nut-Discussion] Thoughts on memory maps...
Harald Kipp
harald.kipp at egnite.de
Fri Nov 5 09:33:26 CET 2004
Curtis,
At 16:24 05.11.2004 +1100, you wrote:
>On a slightly different note, we were going to try to test Nut/OS on an
>existing mega32 board we have, only to find far too much of the
>configuration is conditional defined on the specific chip. For example,
>instead of saying "Simple UART" for the type on the mega103, and "Advanced
>UART" for that on the mega64/mega128, it specifically checks for mega103.
>
>Now, I understand this is most likely because they were the only
>distinctions for you, either "the old board" or "the new board". But I
>can see a great advantage in trying to split these definitions away from
>the specific implementation.
>
>My thinking was that a specific CPUs define set would specify more
>abstract tags, such as:
>
>#define HW_UART_ADVANCED 2
>
>for the mega128 to say it has two Advanced UARTS. Then the UART code
>could have:
>
>#ifdef HW_UART_ADVANCED
>[uart0 config/setup here]
>#if HW_UART_ADVANCED > 1
>[uart1 config/setup here]
>#endif
>#endif
>
>Given that most MCU platforms generally use the same peripheral modules,
>and their IO addresses are #defined in an include, this would make
>supporting newer/other MCUs from the same family much simpler.
>
>I'm quite happy to make the effort, but I would rather start knowing the
>sort of naming conventions you'd prefer.
I fully agree with your view. In early days the ATmega103/128 were
the only chips availably with enough flash for Nut/OS including
Ethernet support. In fact Nut/OS was designed as a helper for
the TCP stack. In the meantime more Nut/OS applications exists,
which do not use Nut/Net at all and Nut/OS may nicely work on
several other AVRs. I'd welcome support for the ATmega32 and
the suggested naming looks OK to me.
Harald
More information about the En-Nut-Discussion
mailing list