Add debug test.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 18 Oct 2007 14:52:30 +0000 (14:52 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 18 Oct 2007 14:52:30 +0000 (14:52 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@906 38d2e660-2303-0410-9eaa-f027e97ec537

app/at91sam7s/appconfig.h
app/at91sam7s/at91sam7s.c
app/at91sam7s/at91sam7s.mk

index 27d6fcfd958d0cd12f561df828369ff6ed370519..3d08e4f9d7606b145f5eb2dce7f2e8ea031d1ddc 100644 (file)
@@ -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
 
index 3fa65da7400fd53934c7de9e791a83a06abf0e25..13388a557fa4a6110d14dffa3270623414d32f08 100644 (file)
@@ -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;
index 858670aa0943d2edf9f7826c5e6b3fa9582cf36f..234c2aa9a0109d7b3d7b649431f235c3f316d799 100644 (file)
@@ -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