SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By obilix
#14909
This might be a toughie...

Writing my appilcation image to the LPC2148 consistently locks up OpenOCD.
My image as a BIN file is around 412KB.
So, using 'dd' i create different sized files ranging from 32KB up to 256KB.

aside: For 'dd', I first tried 'dd if=/dev/rand of=out.bin count=32 bs=1024'.
When downloaded that file, it really messed up the MCU! :lol:
poor thing! it did know what it was running! I had to reflash using
the lpc21isp program to give back its sanity...
So for the test images, I used my application binary. At least
when the MCU starts up, it has a fighting chance!


I then use the following steps before doing the write:
Code: Select all
o) restart OpenOCD -d3 -l Output.<sizeOfImage>
o) soft_reset_halt - make sure it is halted
o) flash erase 0 0 26
o) flash write 0 <sizeOfImage> 0
and then 'tail -f Output.<sizeOfImage>

I retry the same sized image a few times to ensure a I get a constistent write.
At 64KB, 96KB and 128KB, it is progressively difficult to get consistent runs.
Images >128KB always ends up locking OpenOCD.

My jtag_speed is set to 30.

Dominic, before I send you the 64KB debug output,
do you want a successfull trace along with the failled trace?

cheers!

luis...
By Dominic
#14912
Hello Luis,

please send me a debug output from the first size that failed to download reliably. Something that works once in a while isn't what I'm looking for, so please keep bugging me with every little bit you discover :)

Thanks for all your effort!

Regards,

Dominic