From: batt Date: Thu, 18 Oct 2007 14:52:30 +0000 (+0000) Subject: Add debug test. X-Git-Tag: 1.0.0~336 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;ds=sidebyside;h=9fc47ff8814e045ac498acb1bc92946950a6a5f9;p=bertos.git Add debug test. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@906 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/app/at91sam7s/appconfig.h b/app/at91sam7s/appconfig.h index 27d6fcfd..3d08e4f9 100644 --- a/app/at91sam7s/appconfig.h +++ b/app/at91sam7s/appconfig.h @@ -72,6 +72,9 @@ #ifndef APPCONFIG_H #define APPCONFIG_H +/** Kdebug console on debug unit */ +#define CONFIG_KDEBUG_PORT KDEBUG_PORT_DBGU + /** Baud-rate for the kdebug console */ #define CONFIG_KDEBUG_BAUDRATE 115200 diff --git a/app/at91sam7s/at91sam7s.c b/app/at91sam7s/at91sam7s.c index 3fa65da7..13388a55 100644 --- a/app/at91sam7s/at91sam7s.c +++ b/app/at91sam7s/at91sam7s.c @@ -72,15 +72,15 @@ static void leds_toggle(void) int main(void) { - //kdbg_init(); + kdbg_init(); sysirq_init(); timer_init(); IRQ_ENABLE; /* Disable all pullups */ PIOA_PUDR = 0xffffffff; - /* Set all port pin connected to PIOA */ - PIOA_PER = 0xffffffff; + /* Set PA0..3 connected to PIOA */ + PIOA_PER = 0x0000000f; /* Set PA0..3 as output */ PIOA_OER = 0x0000000f; /* Disable multidrive on all pins */ @@ -99,6 +99,7 @@ int main(void) // Main loop for(;;) { + kprintf("W la figa!\n"); iort+= 1; iort1+= 1; iort2+= 1; diff --git a/app/at91sam7s/at91sam7s.mk b/app/at91sam7s/at91sam7s.mk index 858670aa..234c2aa9 100644 --- a/app/at91sam7s/at91sam7s.mk +++ b/app/at91sam7s/at91sam7s.mk @@ -11,7 +11,7 @@ # Set to 1 for debug builds -at91sam7s_DEBUG = 0 +at91sam7s_DEBUG = 1 # Our target application TRG += at91sam7s @@ -20,19 +20,22 @@ at91sam7s_CSRC = \ app/at91sam7s/at91sam7s.c \ drv/timer.c \ cpu/arm/drv/sysirq_at91.c \ - mware/event.c + mware/event.c \ + mware/formatwr.c \ + mware/hex.c + at91sam7s_CPPASRC = cpu/arm/hw/crtat91sam7s256_rom.S at91sam7s_CPPAFLAGS = -O0 -g -gdwarf-2 -g -gen-debug at91sam7s_CPPFLAGS = -O0 -D'ARCH=0' -D__ARM_AT91SAM7S256__ -g3 -gdwarf-2 -fverbose-asm -Iapp/at91sam7s/hw -Iapp/at91sam7s -Icpu/arm -at91sam7s_LDFLAGS = -nostartfiles -T cpu/arm/scripts/at91sam7s256_rom.ld -Wl,--no-warn-mismatch +at91sam7s_LDFLAGS = -nostartfiles -T cpu/arm/scripts/at91sam7s256_ram.ld -Wl,--no-warn-mismatch at91sam7s_CPU = arm7tdmi # Debug stuff ifeq ($(at91sam7s_DEBUG),1) at91sam7s_CFLAGS += -D_DEBUG - at91sam7s_PCSRC += drv/kdebug.c + at91sam7s_CSRC += drv/kdebug.c endif