[En-Nut-Discussion] RFC: Using CMake
Ulrich Prinz
uprinz2 at netscape.net
Fri Sep 18 15:59:39 CEST 2009
On Fri, 18 Sep 2009 11:11:22 +0200, Ole Reinhardt
<ole.reinhardt at embedded-it.de> wrote:
>
> How can we better support different platform in parallel using just a
> single NutOS tree.
>
> Right now I have several trees scatterd all over my harddisk. In this
> case the current nutconf feature to have several configurations at the
> same time works more or less for me, but could'nt we improve it a
> little?
>
> Just a simple idea:
>
> We have several configuration templates placed in nut/conf.
> A very simple solution would be to just save a copy of these templates
> modified by the user accordingly to his project. But extended by the
> settings the user made in the edit/settings dialog of Nutconf.
That's what I do actually. But I do it even with same project but different
hardware...
Example: For my radio project I have a self made addon board plugged ontop
of the ATMEL SAM7X-EK. This board features lots of hardware extensions that
might be used by some projects and some for other projects.
After prototype is running, I order a sample-hardware of the target product
and this hardware only has the parts from the EK and the devboard that are
needed. So while on the dev board I use a OLED display, the product only
has a 3-Number 7-Segment display. While the Dev-Board has 4 buttons
connected to a PCA9555 I2C Expander, the product has only 3 buttons
directly on GPIOs of the SAM7.
If I use the Platform option, I have to add my plattform to all of the
board.h definitions in the latest trunk version. That is better than the
older way, there I had to add it to several other files too.
>
> If the user places this file (his own project specific configuration) in
> his project folder nutconf will always be correctly configured even if
> you use several sourcetrees in parallel. Perhaps even in different
> revisions.
>
My guess for a simple missing feature is, that we should add a
BOARD_SUBTYPE definition. So all my development is based on the SAM7X_EK
and I need all includes the SAM7X256 needs. I don't need them all, but I am
happy with the default configuration.
But I need a second parameter to detect my sub type, i.e. development
platform or product platform or may be there will be several slightly
different products with the same functionality but all based on the same
base platform.
This could easily be established by only adding a second user definable
option into the target platform entry in nutconf and does not need any
special auto config tools.
The other thing I mentioned, that there is compiler platform ( Linux /
Windows) and target platform (ethernut) mixed code, and that the one code
generates the other code, that is a special thing that I would love to
have, but think twice if I really would like to support it.
It will truly pass more readable code, as we the have the option to
generate nutbld and nutapp reduced to the platform selected without
thousands of #ifdefs but it requires lots of attention from the system
builders.
Best regards
Ulrich
More information about the En-Nut-Discussion
mailing list