I have a sparkfun Logomatic v2 Serial SD Datalogger. I can wirte c code using WINARM GCC, complie it, and load it ok into the Logomatic using the SD card with sparkfun boot loader installed on the LPC2148. Using sparkfuns make file, it makes a file suitable to copy onto the SD card which the boote loader see’s and load’s into the LPC2148. All ok to this point.
Problem: When I complie the software using WINARM GCC (new make file) and load the *.hex file directly into the LPC using philips LPC2000 flash utility, sparkfuns LPC serial boot loader interface. Software programs ok, but does not work. Now when I compile the sparkfun boot loader using the boot loader make file, program the boot loader into the Logomatic, it does not run either.
So there is a problem with compiling or uploading to the Logomatic that is causing my problems. I would like to upload somebody’s boot loader hex file first to see where my problem is.
So can somebody upload a known good hex file that I can test with please? Don’t care what it does, as long as I can tell it’s runing ok. Then I can go from there to find out whats wrong.
Note I did try flash magic to program the logomatic, but could not get it going with logomatic board and the sparkfun LPC serial boot loader interface. I don’t know what the setting are for flash magic should be set too. I am also using a usb to serial converter to program the LPC if that makes any different.
DBE, did you make sure the “magic checksum” is in the 0x14 location in your vector table? Some loader tools do this for you - the Phillips loader does not.
If you have a UART connection to your logomatic, you can use flash magic and program the attached hex file.[Correction 2010 07 11: re-added the file as a .zip; apparently it failed to record the first time around.]
Then you will have a console (you will need hyperterminal or Teraterm set on the proper com port with 115200 8 N 1) that might help you find your issue.
This should be enough to identify if you can successfully program the code.
From there on you can use that customized boot loader or you may want to reprogram the SFE one.
If you want to use this one, you can type “help” on teh console and see what it says.
If you want to restore the initial behavior of the SFE bootloader, do as follows:
You should be able to access your uSD when powered up while plugged in and write a file on there named “autoExec” (case sensitive, no extension) that contains the following text:
upgrade FW.SFE
delete FW.SFE
start
Or you can do as I do:
autoExec :
button script upgrade_and_start
upgrade_and_start (another file):
upgrade FW.SFE
delete FW.SFE
start
Then once you have booted and unplugged the USB you can upgrade and start by pressing the STOP button on your PCB.
Thanks everybody for your replies as it helped heaps.
I can now program the board, my problem has turned out to be not a programming problem but a compiler problem, so there must be something wrong with my make file which I will sort out latter. Good to have a sample of a hex file which loaded ok and ran ok, thanks. I have compiled a test program to flash a led which works ok.