I recently built my own LPC2138 header board and I am having a few problems.
I am able to connect to the LPC2138 and upload a program via the Philips Flash Utility V2.2.1, but when I do compare flash it always says File Compare Failed. All other functions seem to work (read device ID, erase, etc.). I read somewhere that this may be a bug in the flash utility.
The main problem I’m having though is that I can’t get any of the programs written from C and compiled to work. I downloaded an led flashing program from here (http://www.dreamislife.com/arm/LED.S), compiled and flashed it with success. The led blinks as it should. But when I run an equivalent program written in C, compile, and flash it, it doesn’t do anything. I’m thinking that there may be something wrong with the linker script, crt.s, or makefile. I’m using the code from James Lynch’s blinking led tutorial.
I am able to connect to the LPC2138 and upload a program via the Philips Flash Utility V2.2.1, but when I do compare flash it always says File Compare Failed. All other functions seem to work (read device ID, erase, etc.). I read somewhere that this may be a bug in the flash utility.
I've run into the same problem and I'm pretty sure it's a bug in the flash loader, as I can run programs all day long in my LPC2148.
The main problem I’m having though is that I can’t get any of the programs written from C and compiled to work. I downloaded an led flashing program from here (http://www.dreamislife.com/arm/LED.S), compiled and flashed it with success. The led blinks as it should. But when I run an equivalent program written in C, compile, and flash it, it doesn’t do anything. I’m thinking that there may be something wrong with the linker script, crt.s, or makefile. I’m using the code from James Lynch’s blinking led tutorial.
Do you have the LED on the same pin of your board as Jim does in his tutorial? If not, your code will not look like it is running. I've been using the code that Jim has written for over a year now and not run into a single problem with it.
My LED is on P0.31 and I changed in the the code by replacing 0x00000080 with 0x80000000 or (1 << 31). I’m pretty sure that’s not the problem.
I didn’t follow Jim’s tutorial exactly. I just downloaded gnuarm and used the crt.s and linker script from the led example and made my own make.bat file based on his makefile.
Without being able to see your code or make.bat file, I can’t really tell you much more. I know that Jim’s code works fine, though, for all of my purposes.