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

Harald Kipp harald.kipp at egnite.de
Thu Aug 23 13:33:34 CEST 2012



On 23.08.2012 12:58, Ole Reinhardt wrote:
 
>>  arch/arm_v4 for arm7tdmi
>>  arch/arm_v5 for arm9e
>>  arch/arm_v7 for arm-cortex-m3 and arm-cortex-m4 
> If not objections from other developers, I think we should change it.

Let's wait a few more days to give everyone a chance to respond.

 
> I would like to suggest another move of files:
> 
> What about moving
> 
> nut/include/arch/avr
> 
> to nut/arch/avr/include
> 
> (same for all other architectures as well)

Not really. Several other projects collect header files in _1_ main directory for good reasons: Preprocessor options.

With your suggestion we would either have to write lengthy includes

 #include <nut/arch/avr/include/foobar.h>

or specify several include paths in the compiler options

 -I nut/include -I nut/arch/arm/include -I nut/arch/arm_v7/include -I nutbld/arch/arm_v7/include/cfg ....

and then use short

 #include <foobar.h>

which does not reflect the actual location. In some other projects the header files are wide spread all over the place and it is hard to find them.

May be you concerns are more related to include/dev?

In that case using

 #include <dev/avr/foobar.h>

instead of the current

 #include <dev/avr_foobar.h>

makes sense to me.

 
> I know this is just cosmetic, but I would appreciate to have the files
> located more closely to each other.

I made the opposite experience. When looking into a new project, I need to grep over the complete structure over and over again to find the related header, if they are spread around. If you are not familiar with the project, you don't know, if you will find the right file in include, arch/include, hal/include, bios/include or where else.

Regards,

Harald







More information about the En-Nut-Discussion mailing list