"Thomas A. Moulton" <t...@moulton.us> writes:

> I am trying to program the Internal Flash of a ADuC7021
> with OpenOCD and an Olimex OpenOCD JTAG TINY A
>
> If I use the other tool chain (IAR) to program the part
> I can use OpenOCD to 'verify_image file 0 elf'
>
> But if I try to do a
>
> flash write_image file.elf 0 elf
>
> It tells me there is no flash at 0
>
> flash write_image file.elf 0 elf
> No flash at address 0x00000000
>
> No flash at address 0x00008000
>
> No flash at address 0x00008140
>
> No flash at address 0x00009708
>
> wrote 0 byte from file file.elf in 0.000000s (nan kb/s)
>
> flash banks returns:
>
> flash banks
> #0: aduc702x at 0x00080000, size 0x0000f800, buswidth 0, chipwidth 0
>
> Which is where the flash is physically located, but at Reset (POR)
> it maps flash to 0 which where we expect to execute from.
>
> I did try adding an offset to get to the base of flash
>
> flash write_image file.elf 0x80000 elf
>
> but that crashes (using windows openocd-ftd2xx)
>
> Open On-Chip Debugger 0.2.0-in-development (2009-05-23-14:36) svn:1888M
> (snapshot 1888 from SVN tree + patch, no official release)
>
> Is the maintainer of ADuC702x active?
>
> Anyone else using this driver?

Hi Thomas, I am using it and can confirm that it generally works OK.

I think I did need to use the offset.

This should be my "programming" config file fragment:

======================================================================
init
halt

# Write to MEMMAP to enable access to flash below first 64 bytes
mwh 0xfffff804 0x8

#setup POWCON register to obtain the default 5.22MHz (RC osc) clock.
#  POWKEY1 = 0x01;
mwh 0xffff0404 0x01
#  POWCON = 0x0;
mwh 0xffff0408 0x0
#  POWKEY2 = 0xF4;
mwh 0xffff040c 0xf4

flash erase_address 0x80000 0xf800
flash write_image test.bin 0x80000 bin
verify_image      test.bin 0x80000 bin
======================================================================

I was using it on a windows machine to which I don't have easy access at
the moment, but I think it was as above. If you have no luck let me know
I will find out my exact configuration.

-- 

John Devereux
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to