0.3.0 has a bug in target_alloc_working_area, and fixed in 0.3.1.
But head version has a problem with default_mmu, which will return
ERROR_FAIL, stm32 doesn't implement mmu, so it uses default_mmu, and will
cause target_alloc_working_area return ERROR_FAIL.
2009/11/7 Freddie Chopin <[email protected]>

> I've just checked the 0.3.1-dev branch and I confirm that it works for
> me - I can flash STM32 and LPC2103 normally. I've tried this:
>
> http://openocd.git.sourceforge.net/git/gitweb.cgi?p=openocd/openocd;a=commit;h=c6ac97cf3b95ad5a9582ad6e6ea159d9d2aa9e1b
>
> But... The current master in main branch still fails the same way... I'm
> talking about this -
>
> http://openocd.git.sourceforge.net/git/gitweb.cgi?p=openocd/openocd;a=commit;h=fb50efc6e712f413d109c3d77683d0358a557ed4
> This is extremely strange, because I open the target.c file and it HAS
> the fix ( (!enabled) ), but still doesn't work... For STM32 it gives:
>
> > c:\Program Files\OpenOCD\0.3.0\bin>openocd-fb50efc6-libftdi
> > Open On-Chip Debugger 0.4.0-dev-snapshot (2009-11-07-14:52)
> > $URL$
> > For bug reports, read
> >         http://openocd.berlios.de/doc/doxygen/bugs.html
> > 1000 kHz
> > jtag_nsrst_delay: 100
> > jtag_ntrst_delay: 100
> > trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
> > Info : clock speed 1000 kHz
> > Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b,
> part: 0xba0
> > 0, ver: 0x3)
> > Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020,
> part: 0x6410
> > , ver: 0x1)
> > Info : DWT dwtcr 0x40000000, comp 4, watch/trigger
> > Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b,
> part: 0xba0
> > 0, ver: 0x3)
> > Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020,
> part: 0x6410
> > , ver: 0x1)
> > target state: halted
> > target halted due to debug-request, current mode: Thread
> > xPSR: 0x01000000 pc: 0x08000130 msp: 0x20000000
> > auto erase enabled
> > Info : device id = 0x20036410
> > Info : flash size = 128kbytes
> > Error: Not implemented.
> > Warn : no working area available, can't do block memory writes
> > Warn : couldn't use block writes, falling back to single memory accesses
> > wrote 8928 byte from file i.hex in 49.937500s (0.174593 kb/s)
> > Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b,
> part: 0xba0
> > 0, ver: 0x3)
> > Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020,
> part: 0x6410
> > , ver: 0x1)
>
> For LPC2103:
>
> > c:\Program Files\OpenOCD\0.3.0\bin>openocd-fb50efc6-libftdi
> > Open On-Chip Debugger 0.4.0-dev-snapshot (2009-11-07-14:52)
> > $URL$
> > For bug reports, read
> >         http://openocd.berlios.de/doc/doxygen/bugs.html
> > trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull
> srst_open_drain
> > jtag_nsrst_delay: 100
> > jtag_ntrst_delay: 100
> > Info : clock speed 6000 kHz
> > Info : JTAG tap: lpc2103.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787,
> part: 0xf
> > 1f0, ver: 0x4)
> > Info : Embedded ICE version 4
> > Info : JTAG tap: lpc2103.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787,
> part: 0xf
> > 1f0, ver: 0x4)
> > Warn : srst pulls trst - can not reset into halted mode. Issuing halt
> after rese
> > t.
> > target state: halted
> > target halted in ARM state due to debug-request, current mode: System
> > cpsr: 0x8000001f pc: 0x00000144
> > auto erase enabled
> > Error: Not implemented.
> > Error: no working area specified, can't write LPC2000 internal flash
> > Error: failed erasing sectors 0 to 2 (-902)
>
> It's crazy... Am I doing something wrong here?
>
> 4\/3!!
>  _______________________________________________
> Openocd-development mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/openocd-development
>



-- 
Best Regards, SimonQian
http://www.SimonQian.com
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to