Hi,
First of all, I want to ask, is it possible to use uvision plus the ulink2 to debug code on the lpc2124. It says its possible on the keil lpc2124 web page, but maybe that is obsolete and is no longer true. If that's the case, then I'll move on and forget about it. If it is possible though, keep reading because I've been getting some weird errors and I cannot seem to fix them.
I have been working for 2 weeks trying to get an olimex lpc2124 board working with uvision. I have some old code that I need to compile so that I can debug. I have tried everything to get that to work to no avail. So I decided to back up a little bit and see if I can just get anything to work. I downloaded the blinky example project from the keil page http://www.keil.com/dd/chip/3647.htm but that is not working.
When I try to open up the project, it says that I do not have the right support downloaded for the philips lpc2124 and I should download the legacy software. However, I have already done that. So I open up the file anyway and go to options for target. In there I was able to change the device to be the lpc2124. But now when I try to compile, I get 58 errors saying that the startup.s has unexpected errors at the end of the line, and also that Serial.c(36): error: #20: identifier "UART1_LSR" is undefined. I pasted the full list below.
Can anyone help me figure this out? I just want to get something working. If this one won't work, could you explain why and point me to some example code that will work.
Thanks!
*** Using Compiler 'V5.05 update 2 (build 169)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' Rebuild target 'MCB2100 Flash' assembling Startup.s... Startup.s(1): error: A1167E: Invalid line start Startup.s(2): error: A1163E: Unknown opcode This , expecting opcode or Macro Startup.s(3): error: A1163E: Unknown opcode Copyright , expecting opcode or Macro Startup.s(4): error: A1167E: Invalid line start Startup.s(5): error: A1167E: Invalid line start Startup.s(6): error: A1163E: Unknown opcode STARTUP.S: , expecting opcode or Macro Startup.s(7): error: A1167E: Invalid line start Startup.s(8): error: A1167E: Invalid line start Startup.s(11): error: A1167E: Invalid line start Startup.s(12): error: A1167E: Invalid line start Startup.s(16): error: A1167E: Invalid line start Startup.s(19): error: A1163E: Unknown opcode Standard , expecting opcode or Macro Startup.s(21): error: A1137E: Unexpected characters at end of line Startup.s(22): error: A1137E: Unexpected characters at end of line Startup.s(23): error: A1137E: Unexpected characters at end of line Startup.s(24): error: A1137E: Unexpected characters at end of line Startup.s(25): error: A1137E: Unexpected characters at end of line Startup.s(26): error: A1137E: Unexpected characters at end of line Startup.s(27): error: A1137E: Unexpected characters at end of line Startup.s(29): error: A1137E: Unexpected characters at end of line Startup.s(30): error: A1137E: Unexpected characters at end of line Startup.s(33): error: A1167E: Invalid line start Startup.s(34): error: A1167E: Invalid line start Startup.s(35): error: A1167E: Invalid line start Startup.s(36): error: A1167E: Invalid line start Startup.s(37): error: A1167E: Invalid line start Startup.s(38): error: A1167E: Invalid line start Startup.s(39): error: A1167E: Invalid line start Startup.s(40): error: A1167E: Invalid line start Startup.s(41): error: A1167E: Invalid line start Startup.s(42): error: A1167E: Invalid line start Startup.s(43): error: A1167E: Invalid line start Startup.s(44): error: A1167E: Invalid line start Startup.s(46): error: A1137E: Unexpected characters at end of line Startup.s(47): error: A1137E: Unexpected characters at end of line Startup.s(48): error: A1137E: Unexpected characters at end of line Startup.s(49): error: A1137E: Unexpected characters at end of line Startup.s(50): error: A1137E: Unexpected characters at end of line Startup.s(51): error: A1137E: Unexpected characters at end of line Startup.s(52): error: A1137E: Unexpected characters at end of line Startup.s(55): error: A1163E: Unknown opcode Phase , expecting opcode or Macro Startup.s(56): error: A1137E: Unexpected characters at end of line Startup.s(57): error: A1137E: Unexpected characters at end of line Startup.s(58): error: A1137E: Unexpected characters at end of line Startup.s(59): error: A1137E: Unexpected characters at end of line Startup.s(60): error: A1137E: Unexpected characters at end of line Startup.s(61): error: A1137E: Unexpected characters at end of line Startup.s(62): error: A1137E: Unexpected characters at end of line Startup.s(63): error: A1137E: Unexpected characters at end of line Startup.s(64): error: A1137E: Unexpected characters at end of line creating preprocessor file for Serial.c... compiling Serial.c... Serial.c(17): error: #20: identifier "UART1_LCR" is undefined UART1_LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */ Serial.c(18): error: #20: identifier "UART1_DLL" is undefined UART1_DLL = 97; /* 9600 Baud Rate @ 15MHz VPB Clock */ Serial.c(26): error: #20: identifier "UART1_LSR" is undefined while (!(UART1_LSR & 0x20)); Serial.c(27): error: #20: identifier "UART1_THR" is undefined UART1_THR = CR; /* output CR */ Serial.c(29): error: #20: identifier "UART1_LSR" is undefined while (!(UART1_LSR & 0x20)); Serial.c(30): error: #20: identifier "UART1_THR" is undefined return (UART1_THR = ch); Serial.c(36): error: #20: identifier "UART1_LSR" is undefined while (!(UART1_LSR & 0x01)); Serial.c(38): error: #20: identifier "UART1_RBR" is undefined return (UART1_RBR); Serial.c: 0 warnings, 8 errors creating preprocessor file for Blinky.c... compiling Blinky.c... ".\Blinky.axf" - 58 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:00
Yes, it looks to be a file targeting uVision 2 from *2004*
The '#' at the starts of the lines in startup.s are not valid, and the .equ also not what the equivalent Blinky release in uVision 4 uses.
Download and Install the ARM7/9 Legacy Packs, then open the Blinky project that comes with that.
C:\Keil515\ARM\Boards\Keil\MCB2100\Blinky
Alter the path depending on where *you* installed Keil, perhaps Keil_v5
You can start a comment in assembler with the semicolon instead of the #
Thanks for your quick response! I was able to get the blinky to compile, but I cannot load it onto my device. Are there any settings that I need to change in order to do that? It says "error: flash download failed - ARM7TDMI"
Also,
I have some old code that I am trying to get working with this. It will compile using the make file it came with using winARM, but it won't work in uvision when I switch to the gcc compiler option. This is the error I get when that happens. Do you have any idea what this error is? Because if I could use the gcc compiler, things would be much easier!
.\startup._ia(1): error: junk at end of line, first unrecognized character is '-'
Okay, I got it to load, but when I go to debug and set a breakpoint in main, nothing happens... I am pretty sure I have all of my jumpers set correctly. What else should I do to allow debug to happen?
View all questions in Keil forum