armtest_CROSS = arm-elf-
armtest_CPPAFLAGS = -O0 -g -gdwarf-2 -g -gen-debug
-armtest_CPPFLAGS = -O0 -D'ARCH=0xFFFFFF' -D__ARM_AT91SAM7S256__ -g3 -gdwarf-2 -fverbose-asm -Iapp/test -Ibertos/cpu/arm
+armtest_CPPFLAGS = -O0 -D'ARCH=ARCH_NIGHTTEST' -D__ARM_AT91SAM7S256__ -g3 -gdwarf-2 -fverbose-asm -Iapp/test -Ibertos/cpu/arm
armtest_LDFLAGS = -nostartfiles -T bertos/cpu/arm/scripts/at91sam7_256_rom.ld -Wl,--no-warn-mismatch
armtest_CPU = arm7tdmi
avrtest_PCSRC += bertos/mware/formatwr.c
avrtest_CROSS = avr-
-avrtest_CPPFLAGS = -D'ARCH=1' -Iapp/test -Ibertos/cpu/avr
+avrtest_CPPFLAGS = -D'ARCH=ARCH_NIGHTTEST' -Iapp/test -Ibertos/cpu/avr
avrtest_CFLAGS = -Os -mcall-prologues -fno-strict-aliasing
#include "hw/hw_cpu.h"
#include <cpu/detect.h>
+#include <cfg/cfg_arch.h>
#if CLOCK_FREQ != 48023000L
-#error Clock registers set for 48MHz operation, revise following code if you want a different clock.
+ /* Avoid errors on nightly test */
+ #if !defined(ARCH_NIGHTTEST) || !(ARCH & ARCH_NIGHTTEST)
+ #error Clock registers set for 48MHz operation, revise following code if you want a different clock.
+ #endif
#endif
#define VERS_MINOR 1
#define VERS_REV 0
#define VERS_LETTER ""
+#elif ARCH & ARCH_NIGHTTEST
+ #define VERS_MAJOR 0
+ #define VERS_MINOR 1
+ #define VERS_REV 0
+ #define VERS_LETTER ""
#else
#error unknown architecture
#endif