Hello to all. I have this EVAL-ADUC7026 Board from Analog Devices. Now i have a problem with the "hello world" Example: The ADUC7026 enters the Abort-Mode. I debuged it: The printf-function seems to use a putchar-function. There is a wrong address in C:\keil\arm\lib\putchar.c The Adress is 0xE0010014 (a LPC21xx address) So the ADUC7026 is in abort-mode. How can i work around. SOS HELP SOS Thanks in advice
/***********************************************************************/ /* */ /* SERIAL.C: Low Level Serial Routines */ /* */ /***********************************************************************/ #include <aduc7024.H> /* ADuC7024 definitions */ #define CR 0x0D int putchar(int ch) { /* Write character to Serial Port */ if (ch == '\n') { while(!(0x020==(COMSTA0 & 0x020))) {} COMTX = CR; /* output CR */ } while(!(0x020==(COMSTA0 & 0x020))) {} return (COMTX = ch); } int getchar (void) { /* Read character from Serial Port */ while(!(0x01==(COMSTA0 & 0x01))) {} return (COMRX); } int write (int file, char * ptr, int len) { int i; for (i = 0; i < len; i++) putchar (*ptr++); return len; }
Hi Victor, thanks, but sorry, i didn't managed it. I have added this "serial.c" file, it don't work. Messages like "unresolved external symbols". Had a sleepless night. Now i'am afraid i become habitant of a funny-farm. :-)
Hi Peter, Which external symbols were being reported as missing? Copy-and-paste the exact error message and somebody should be able save you from the funny-farm!
Yould add the following line at the start of serial.c to avoid undefined externals:
#pragma INTERWORK int putchar (int c) { ... } ...
#pragma thumb int putchar(int ch) { /* Write character to Serial Port */ if (ch == '\n') { while(!(0x020==(COMSTA0 & 0x020))) {} COMTX = CR; /* output CR */ } while(!(0x020==(COMSTA0 & 0x020))) {} return (COMTX = ch); } Thank you all, your'e the greatest! :-)