[En-Nut-Discussion] Devnut_m3n: architecture dependend directories
ulrich.prinz at googlemail.com
Tue Jan 17 18:09:54 CET 2012
I use a cygwin installation to provide make and other utils fo the
Makefiles to run fast and easy.
But I never checked if symlinks work...
And I am sure that there lots of people around that don't like to
install cygwin first and it is not wasy too.
But what I originally meant was something different:
The board.h mentioned by Don is one big troublemaker. It works for
egnite boards but gets really scrambled if you add several other
Second we have some boards that need special attention, they require a
Example: the AT91SAM7X-EK needs a reset sequence to get the PHY to the
So my idea is to:
1) split the board.h into several arch.h placed in the different
This arch.h provide all the unified tokens like NUT_DEV_UART2 or
whatever was its name.
Alternatively we mirror the diretory structure from nut/arch to
/nut/include/arch and spread them there
2) Put all board related things into a board_samenameasconf.h into nut/board
3) Put all board related code in a file board_samenameasconf.h into nut/board
4) Add a Makefile to nut/board that provides a lib for the board related stuff.
Only in this Makefile you have to add lots of ifeq sequences to select
the right board.
But for beginners or people adding new boards, it is a copy and paste
to add something
5) Add a Makefile to nut/arch to select the right ./myarch/Makefile
or, like the board thing it contains a lot of if sequences.
That kills all the unreadable horrible if defined() || defined() ||
defined()... from a single file.
And this should make symlinking and other hard to follow things obsolete.
It would be a real cool feeling to only add 2 board files, one
archtitecture dir tree and all the devices to your project editor.
Instead of that you now have lots of multiply defined tokens where you
have to search every time if that one belongs to your system or is
irrelevant or even breaking it.
More information about the En-Nut-Discussion