[En-Nut-Discussion] Devnut_m3n: architecture dependend directories

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Mon Jan 16 12:04:14 CET 2012


Hallo Ole,
  
thinking about getting your massive file move into and later out of my
playground make my (few) hairs even greyer ;-)
  
But shouldn't we have even more destinction, between vendor supplied files
and NutOs-supplied files? At least for the stm32 files like
nut/include/arch/cm3/stm/stm32f10x_rtc.h
are still the ST-Lib files with few modification, while files like
nut/arch/cm3/dev/stm/stm32_spi1.c
are rewritten by Ulrich. The postion of the file in the file tree should
clearly indicate the origin of the file.
If all your lpc files are self written, this doesn't hold for you...
  
Otherwise I suggest that conditional includes like in
nut/include/arch/cm3/cortexM3.h

should read
#if defined(MCU_SAM3U)
#include <arch/cm3/atmel/sam3u.h>
#elif defined(MCU_STM32)
#if defined (MCU_STMF1)
#include <arch/cm3/stm/stm32f10x.h>
#elif defined (MCU_STML1)
#include <arch/cm3/stm/stm32l1xx.h>
#else
#warning "Unknown STM32 family"
#endif
#elsif (MCU_LPC)
#if defined (MCU_LPC176x)
#include <arch/cm3/nxp/lpc17xx.h>
#elif defined(MCU_LPC177x_8x)
#include <arch/cm3/nxp/lpc177x_8x.h>
#else
#warning "Unknown LPC family"
#endif
#else
#warning "Unknown CM3 manufacturer"
#endif

and the include/cfg/arch.h should define the family additional to manufacturer.

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



More information about the En-Nut-Discussion mailing list