In testing this, I stripped everything down to a 60 byte program (that would blink some LEDS), no interrupts, linked to load at, and execute from 0x4000 0200.
According to the above discussion, this should work.
It worked fine when loaded through JTAG.
It loads fine with Flash Magic (even though it loads TWO 512 byte blocks, even though the image is only 60 bytes!?)
Issueing the Go 0x40000200 A command, however, didn't do anything (it got echoed, so I guess I AM in ISP).
Then I noticed, when I gave the Go command, an LED would blink (twice) that otherwise only blinks when the board gets reset!
Obviously this reset comes from FM (when I disable use of RTS/DTS just prior to doing the GO, I would get an autobaud failure, indicating that FM indeed started the whole reset-autobaud sequence again -would think a simple state variable "isp-ready" could prevent this-).
Although I don't see how, I'm beginning to suspect this reset to be part of the problem.
Anyway, wouldn't this be simple to reproduce for the FM-guys?
Here's my test program (for an LPC2378, maybe it will run on most LPC2xxx's) (I'm using Keil's µVision to build):
AREA RESET, CODE, READONLY
ARM
mystart LDR R3, =0x1FFFF ; Delay loop count
MOV R1, #0xFF ; Leds
LDR R0, =0x3FFFC000 ; FIO2 base
STR R1, [R0, #0x40] ; DIR output
lp0 STR R1, [R0, #0x5C] ; CLR
MOV R2, R3 ; Delay loop
lp1 SUBS R2, R2, #1
BNE lp1
STR R1, [R0, #0x58] ; SET
MOV R2, R3 ; Delay loop
lp2 SUBS R2, R2, #1
BNE lp2
B lp0
END
And the scatter file:
LR_IROM1 0x40000200 0x00005C00 { ; load region size_region
ER_IROM1 0x40000200 0x00005C00 { ; load address = execution address
*.o (RESET, +First)
}
}