On Sat, Nov 20, 2010 at 4:51 AM, Jonathan dumaresq
<[email protected]> wrote:
> Hi all,
>
> I try to get my cfi external nor flash programmed with openocd.
>
> I use en stm32 chip with the FSMC to talk to the CFI flash. Write now I can
> get the openocd reconised the cfi chip.
> <snip>
>> flash write_image test.hex 0x64000000 bin
> current target isn't an ARMV7M target
> error writing to flash at address 0x64000000 at offset 0x00000000 (-902)
> Command handler execution failed
> in procedure 'flash' called at file "command.c", line 650
> called at file "command.c", line 361
>>
>
> I have no idea why ARMV7M is listed here...
>
> Any idea ?

Ciao Jonathan,
OpenOCD runs binary code on the target CPU to speed-up some operation
that through JTAG would take too long.
Programming the Flash is one of them.

In the CFI driver there is the binary code for generic ARM only.
       armv4_5_info.common_magic = ARM_COMMON_MAGIC;
STM32 is a Cortex M3 CPU, and it requires code to be labelled
"ARMV7M_COMMON_MAGIC" to run it. This is why you get that error.

At this point I already see something to double check in the code:
Cortex M3 code defines the macro CORTEX_M3_COMMON_MAGIC, but then
requires ARMV7M....

What you found is a missing feature of OpenOCD.
The fix would require one of the following:
- a specific code for ARMV7M (this will solve your case only)
- a fall-back C code in case of no binary for target (solves all
cases, but slow)

Best Regards
Antonio Borneo
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to