after reading the thread viewtopic.php?t=8407 I wrote a hex file to some memory bank… I’m quite new to this as this is my first ARM project and now I’m trying to verify if I got my HW setup working. I need some pushes and kicks in the right way, so… here we go .
The board with AT91SAM7S64 is powered up, I got the USBjtag hooked up to it, OpenOCD running (and configured, so it can find and use that USBjtag). I compiled the example from WinARM (at91sam7s64_Hello) which produced the ‘main.hex’ file.
I opened up the telnet (telnet localhost 4444) and entered:
to write the .hex file to bank 0, reallocate to 0. Then the OpenOCD was quiet for a while and gave me a successfull message ('wrote file C:\WinARM\examples\at91sam7s64_Hello\main.hex to flash bank 0 at offs
et 0x00000000’).
Now I’m not sure if the bank 0 and address 0 was the right choice… What parameters should I use?
Now I’m trying to figure out how to really see if it works (the board) or not. Does anyone have some ideas?
“flash write” is deprecated in current versions of the OpenOCD. You should use “flash write_binary” or “flash write_image” instead.
A “HEX” file is an image file, it can possibly specify disjunctive sections that span several memories, and has to be written using “flash write_image”.
The “flash write” command now aliases to “flash write_binary”, and writes the content of the file as is, it treats the file as a plain binary. This variant expects a bank and an offset.
The “flash write_image” command expects the , an optional [offset], and an optional [type]. It writes to all flash memories of the current target as defined by the addresses in the image file.
OK, so I got now the latest OpenOCD, configured it, and this is what it shows at startup:
c:\Program Files\openocd-2007re204\bin>openocd-ftd2xx.exe
Info: openocd.c:93 main(): Open On-Chip Debugger (2007-09-05 09:00 CEST)
Warning: arm7_9_common.c:734 arm7_9_assert_reset(): srst resets test logic, too
Error: arm_jtag.c:38 arm_jtag_set_instr_error_handler(): setting the new JTAG
instruction failed, debugging is likely to be broken
And then when I’m trying to flash the ARM, it looks like this:
Open On-Chip Debugger
> flash write_image C:\main.hex
didn't write section at 0x00100000, size 0x000005c8
wrote 0 byte from file C:\main.hex in 0s 15625us (0.000000 kb/s)
>
Do I have something in my configuration of OpenOCD wrong, or is my HW faulty? (the ARM board and / or the USB JTAG)?
Then I flashed the ARM, and measured voltage on pins PA0…31 to see if the are HIGH (and used pPIO->PIO_CODR to see if they are LOW), but they were always HIGH - looks like that something just isn’t working…
I tried both my JTAGs (wiggler and USBjtag based of FT2232) and both gave me the same result…