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
There is a wrong address ..... How can i work around. Do not understand the problem - change the address to the right one. Erik
In putchar.c is written : // this version of putchar is configured for the Keil MCB2100 Board so it won't work with ADUC7026
Hello thanks for your advice. The problem seems easy to be solved, just changing the wrong address or using another putchar-routine for ADUC7026. But how can i tell UVision3 that it chould use this. I dont know how to translate and link another putchar.c routine. I stepped through the programm, the Printf-function jumps to some other functions and then in _putchar is this 0xE0010014 address witch causes the abort. There is a hint in top of the putchar.c-routine "To translate this file use CARM with the following invocation: CA PUTCHAR.C" The second hint: "To link the modified Putchar.OBJ file to your application use the following LA invocation: LA <your object file list>, PUTCHAR.OBJ <controls> Sorry, don't understand it. Can you help?
I have no idea how to find it in the IDE, I do not use it,but I can tell you how to do it. Background: When the linker has linked all "directly addressed" .obj files, it will start hunting through the libraries "it is told about" for any unresolved external. The moment if finds it it will link that part of the library in. Solution: If you get the linker to find your putchar routine before the standard putchar, your routine will "win". Erik
/***********************************************************************/ /* */ /* 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! :-)