From 8bb07ff83a1f0706b42dcd0b684a6f8f39a70511 Mon Sep 17 00:00:00 2001 From: batt Date: Tue, 21 Apr 2009 13:13:52 +0000 Subject: [PATCH] Rafactor ARM modules to be compiled explicitly (without C file stub). git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2604 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/arm/drv/adc_arm.c | 22 +++++++++++++++------- bertos/cpu/arm/drv/pwm_arm.c | 20 ++++++++++++-------- bertos/cpu/arm/drv/ser_arm.c | 20 ++++++++++++-------- bertos/cpu/arm/drv/stepper_arm.c | 19 +++++++++++-------- bertos/cpu/arm/drv/timer_arm.c | 25 +++++++++++++++---------- bertos/cpu/arm/drv/twi_arm.c | 20 ++++++++++++-------- wizard/mktemplates/template.mk | 2 +- 7 files changed, 78 insertions(+), 50 deletions(-) diff --git a/bertos/cpu/arm/drv/adc_arm.c b/bertos/cpu/arm/drv/adc_arm.c index 78878551..f2906721 100644 --- a/bertos/cpu/arm/drv/adc_arm.c +++ b/bertos/cpu/arm/drv/adc_arm.c @@ -37,13 +37,21 @@ * * \author Daniele Basile * + * This module is automatically included so no need to include + * in test list. + * notest: arm + * */ -#include +#ifndef WIZ_AUTOGEN + #warning This file is deprecated, you should use adc_at91.c + + #include -#if CPU_ARM_AT91 - #include "adc_at91.c" -/*#elif Add other ARM families here */ -#else - #error Unknown CPU -#endif + #if CPU_ARM_AT91 + #include "adc_at91.c" + /*#elif Add other ARM families here */ + #else + #error Unknown CPU + #endif +#endif /* WIZ_AUTOGEN */ diff --git a/bertos/cpu/arm/drv/pwm_arm.c b/bertos/cpu/arm/drv/pwm_arm.c index d643739c..77a6a68b 100644 --- a/bertos/cpu/arm/drv/pwm_arm.c +++ b/bertos/cpu/arm/drv/pwm_arm.c @@ -36,17 +36,21 @@ * * \author Daniele Basile * - * This module is automatically included so no need to include + * This module is automatically included so no need to include * in test list. * notest: arm * */ -#include +#ifndef WIZ_AUTOGEN + #warning This file is deprecated, you should use pwm_at91.c -#if CPU_ARM_AT91 - #include "pwm_at91.c" -/*#elif Add other ARM families here */ -#else - #error Unknown CPU -#endif + #include + + #if CPU_ARM_AT91 + #include "pwm_at91.c" + /*#elif Add other ARM families here */ + #else + #error Unknown CPU + #endif +#endif /* WIZ_AUTOGEN */ \ No newline at end of file diff --git a/bertos/cpu/arm/drv/ser_arm.c b/bertos/cpu/arm/drv/ser_arm.c index 7f7e7f9f..44cb894d 100644 --- a/bertos/cpu/arm/drv/ser_arm.c +++ b/bertos/cpu/arm/drv/ser_arm.c @@ -36,17 +36,21 @@ * * \author Daniele Basile * - * This module is automatically included so no need to include + * This module is automatically included so no need to include * in test list. * notest: arm * */ -#include +#ifndef WIZ_AUTOGEN + #warning This file is deprecated, you should use ser_at91.c -#if CPU_ARM_AT91 - #include "ser_at91.c" -/*#elif Add other ARM families here */ -#else - #error Unknown CPU -#endif + #include + + #if CPU_ARM_AT91 + #include "ser_at91.c" + /*#elif Add other ARM families here */ + #else + #error Unknown CPU + #endif +#endif /* WIZ_AUTOGEN */ diff --git a/bertos/cpu/arm/drv/stepper_arm.c b/bertos/cpu/arm/drv/stepper_arm.c index a51abf84..485a3903 100644 --- a/bertos/cpu/arm/drv/stepper_arm.c +++ b/bertos/cpu/arm/drv/stepper_arm.c @@ -36,16 +36,19 @@ * * \author Daniele Basile * - * This module is automatically included so no need to include + * This module is automatically included so no need to include * in test list. * notest: arm */ +#ifndef WIZ_AUTOGEN + #warning This file is deprecated, you should use stepper_at91.c -#include + #include -#if CPU_ARM_AT91 - #include "stepper_at91.c" -/*#elif Add other ARM families here */ -#else - #error Unknown CPU -#endif + #if CPU_ARM_AT91 + #include "stepper_at91.c" + /*#elif Add other ARM families here */ + #else + #error Unknown CPU + #endif +#endif /* WIZ_AUTOGEN */ \ No newline at end of file diff --git a/bertos/cpu/arm/drv/timer_arm.c b/bertos/cpu/arm/drv/timer_arm.c index b6f4d845..adeee6f6 100644 --- a/bertos/cpu/arm/drv/timer_arm.c +++ b/bertos/cpu/arm/drv/timer_arm.c @@ -35,18 +35,23 @@ * \author Francesco Sacchi * * \brief Low-level timer module for ARM (inplementation). + * + * This module is automatically included so no need to include + * in test list. + * notest: arm */ -#include -#include +#ifndef WIZ_AUTOGEN + #warning This file is deprecated, you should use timer_at91.c -#if !(ARCH & ARCH_NIGHTTEST) + #include + #include -#if CPU_ARM_AT91 - #include "timer_at91.c" -/*#elif Add other ARM families here */ -#else - #error Unknown CPU -#endif + #if CPU_ARM_AT91 + #include "timer_at91.c" + /*#elif Add other ARM families here */ + #else + #error Unknown CPU + #endif -#endif /* (ARCH & ARCH_NIGHTLYTEST) */ +#endif /* WIZ_AUTOGEN */ diff --git a/bertos/cpu/arm/drv/twi_arm.c b/bertos/cpu/arm/drv/twi_arm.c index 5a3cbe1c..8395f392 100644 --- a/bertos/cpu/arm/drv/twi_arm.c +++ b/bertos/cpu/arm/drv/twi_arm.c @@ -36,17 +36,21 @@ * * \author Daniele Basile * - * This module is automatically included so no need to include + * This module is automatically included so no need to include * in test list. * notest: arm * */ -#include +#ifndef WIZ_AUTOGEN + #warning This file is deprecated, you should use twi_at91.c -#if CPU_ARM_AT91 - #include "twi_at91.c" -/*#elif Add other ARM families here */ -#else - #error Unknown CPU -#endif + #include + + #if CPU_ARM_AT91 + #include "twi_at91.c" + /*#elif Add other ARM families here */ + #else + #error Unknown CPU + #endif +#endif /* WIZ_AUTOGEN */ diff --git a/wizard/mktemplates/template.mk b/wizard/mktemplates/template.mk index a411a815..9d7dabce 100644 --- a/wizard/mktemplates/template.mk +++ b/wizard/mktemplates/template.mk @@ -83,7 +83,7 @@ $pname_ASRC = $($pname_WIZARD_ASRC) $($pname_USER_ASRC) $pname_CFLAGS = $cflags $pname_LDFLAGS = $ldflags -$pname_CPPFLAGS = -D'CPU_FREQ=($cpuclockfreqUL)' -D'ARCH=(ARCH_DEFAULT)' $cppflags -I$pname/ +$pname_CPPFLAGS = -D'CPU_FREQ=($cpuclockfreqUL)' -D'ARCH=(ARCH_DEFAULT)' -D'WIZ_AUTOGEN' -I$pname/ $cppflags $pname_CPPAFLAGS = $cppaflags $pname_CXXFLAGS = $cxxflags $pname_ASFLAGS = $asflags -- 2.25.1