[riot-devel] Naming of source files

Oleg Hahm oliver.hahm at inria.fr
Fri Jan 10 18:52:44 CET 2014


Dear rioters,

we've just come across a problem resulting from the recent change to
consolidate all binaries in one folder: if the project contains a file with
a name that already exists somewhere within in RIOT, the build system will at
some point create a second object file with the same name, overwriting the
first one.

Even worse, this problem already exists within RIOT: for example, there exist
two files called uart0.c (one in sys/uart0, the other in
boards/wsn430-common). This emerged probably during the consolidation of the
boards repository.

As I've stated already in the accompanying PR[1], I see two solutions:
1.) enforce naming conventions for files, so that all files are prefixed with
their module name (this could still lead to cases like the one Ludwig has
depicted, but are much more unlikely).
2.) revert the change to have all binaries in one folder, but having instead
something like 
 $(RIOTBASE)/bin/$(CPU)/ 
 $(PROJDIR)/bin/$(BOARD)/ 
Where the first directory contains all RIOT binaries and the second only
project specific binaries. While this solution also helps to reduce redundant
compilings, it still call for a consistent naming scheme - but only within RIOT
itself which is much more manageable.

However, I'd vote for the first solution for now, because it's simpler.

Anyone with a better solution?

Cheers,
Oleg

[1] https://github.com/RIOT-OS/RIOT/pull/494
-- 
panic("No information about myself?");
        linux-2.6.6/arch/mips/sgi-ip27/ip27-timer.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20140110/761dcc08/attachment.sig>


More information about the devel mailing list