EmbDev.net

Forum: ARM programming with GCC/GNU tools OpenOCD STR7 Flash


Author: rekisum (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi,

I recognized lately that OpenOCD is included in WinARM.
Martin even wrote some make- and script files to programm a LPC2000?s
flash.
Some testing proved that STR7 RAM debugging should work with my Wiggler
clone
and OpenOCD under WinXP.
Now I want the the flash programming, of course, as someone said
OpcenOCD can flash STR7 too.
Unfortunately the documentation for OpenOCD is rare and outdated.
So I wonder if someone has the right configuration for an STR71x
controller?
I think the magic lies in the flash lines like:
flash bank str7 0 0x2000 0 0 ???
For LPC Martin uses much more parameters wich I couldn't find anywhere.
I don't need any checksum generation.
But the STR7 flash starts with small banks of 8k.
So I have to provide more of that lines for each bank one?

Regards,
Joerg

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 useful
not useful
rekisum wrote:
> Hi,
>
> I recognized lately that OpenOCD is included in WinARM.
> Martin even wrote some make- and script files to programm a LPC2000?s
> flash.
> Some testing proved that STR7 RAM debugging should work with my Wiggler
> clone
> and OpenOCD under WinXP.
> Now I want the the flash programming, of course, as someone said
> OpcenOCD can flash STR7 too.
> Unfortunately the documentation for OpenOCD is rare and outdated.
> So I wonder if someone has the right configuration for an STR71x
> controller?
> I think the magic lies in the flash lines like:
> flash bank str7 0 0x2000 0 0 ???
> For LPC Martin uses much more parameters wich I couldn't find anywhere.
> I don't need any checksum generation.
> But the STR7 flash starts with small banks of 8k.
> So I have to provide more of that lines for each bank one?

Fist: go to the WinARM page and get the latest precompiled version of
OpenOCD or compile it yourself from Dominic's code in the SVN. I don't
know from which version STR7-flashing has been supported.

The options are different for the different targets. For the LPC a lot
of options have to be given, for AT91SAM7 most(all?) needed values are
deteteced automaticly. Last time I have looked into the openocd-sources
I had the impression that most of the STR7-parameters are already in the
code or get detected too. At least the bank-sizes are somehow
predefined. Take a look into the source-code the options for the
flash-configuration might be given in a comment and you can follow the
code to find out more. IRC there is a parameter for the "STR-Type"
needed.

I do not own a STR7 board so I can not test OpenOCD.

Ah, and there is an openocd-forum on the berliOS OpenOCD site. Dominic
Rath and the contributors read the forum.

Martin Thomas

Author: rekisum (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi,

flashing works now with help from the Berlios forum.
Now I have trouble with Breakpoints and RAM debugging.
I think OpenOCD is great but maybe needs some more time
and documentation.

Bye,

Author: Spencer Oliver (ntfreak)
Posted on:

Rate this post
0 useful
not useful
rekisum wrote:
> Hi,
>
> flashing works now with help from the Berlios forum.
> Now I have trouble with Breakpoints and RAM debugging.
> I think OpenOCD is great but maybe needs some more time
> and documentation.
>
> Bye,

Are you still having problems with the str7 and openocd.
It works fine, we use it as part of the STR7 package which now has
replaced OCDRemote as the default debugging agent.

I am refeering to IDEaliST from:
http://www.st-angliamicro.com/software.asp
http://www.anglia.com/columbus/index.asp

Regards
sjo

Author: rekisum (Guest)
Posted on:

Rate this post
0 useful
not useful
Spencer Oliver wrote:

> Are you still having problems with the str7 and openocd.
> It works fine, we use it as part of the STR7 package which now has
> replaced OCDRemote as the default debugging agent.

Hi, no this post is rather old and I got OpenOCD running so far.
I even build a USB to JTAG interface with the DLP2232M, and it works.
Only flashing of large files is too slow.
But I think someone ( you? :) is still working on it.
Regards,

Author: Joemanu (Guest)
Posted on:

Rate this post
0 useful
not useful
rekisum wrote:
> Spencer Oliver wrote:
>
>> Are you still having problems with the str7 and openocd.
>> It works fine, we use it as part of the STR7 package which now has
>> replaced OCDRemote as the default debugging agent.
>
> Hi, no this post is rather old and I got OpenOCD running so far.
> I even build a USB to JTAG interface with the DLP2232M, and it works.
> Only flashing of large files is too slow.
> But I think someone ( you? :) is still working on it.
> Regards,

Hi Rekisum,

Well, I'm fighting with openOCD, it seems to be very nice, i've
installed drivers from FTDI, when i plug the module it sounds great,
peripheral seems to be right installed.
But when i launch openOCD, it manages to list device but can't open it
:(

openocd-ftd2xx -f str7xx_jtagkey.cfg

Error: ftd2xx.c:717 ftd2xx_init(): unable to open ftdi device: 2
Error: ftd2xx.c:732 ftd2xx_init(): ListDevices: 2

Error: ftd2xx.c:734 ftd2xx_init(): 0: DLP2232M A
Error: ftd2xx.c:734 ftd2xx_init(): 1: DLP2232M B

if you've got an idea, i would appreciate.

Best regards,
                      Joemanu

Author: Dominic (Guest)
Posted on:

Rate this post
0 useful
not useful
Hello Joemanu,

Joemanu wrote:
> Well, I'm fighting with openOCD, it seems to be very nice, i've
> installed drivers from FTDI, when i plug the module it sounds great,
> peripheral seems to be right installed.
> But when i launch openOCD, it manages to list device but can't open it
> :(
>
> openocd-ftd2xx -f str7xx_jtagkey.cfg
>
> Error: ftd2xx.c:717 ftd2xx_init(): unable to open ftdi device: 2
> Error: ftd2xx.c:732 ftd2xx_init(): ListDevices: 2
>
> Error: ftd2xx.c:734 ftd2xx_init(): 0: DLP2232M A
> Error: ftd2xx.c:734 ftd2xx_init(): 1: DLP2232M B
>
> if you've got an idea, i would appreciate.
>
> Best regards,
>                       Joemanu

The config file you're using specifies a device description
(ftd2xx_device_desc) for the Amontec JTAGkey, but it seems you're using
an interface built with the DLP2232M evaluation module. Just change the
ftd2xx_device_desc to "DLP2232M A", and OpenOCD should be able to access
your JTAG interface.

Regards,

Dominic

Author: Joemanu (Guest)
Posted on:

Rate this post
0 useful
not useful
> The config file you're using specifies a device description
> (ftd2xx_device_desc) for the Amontec JTAGkey, but it seems you're using
> an interface built with the DLP2232M evaluation module. Just change the
> ftd2xx_device_desc to "DLP2232M A", and OpenOCD should be able to access
> your JTAG interface.
>
> Regards,
>
> Dominic

Hi Dominic,

yesterday before i read your answer
i've download latest driver from FTDI and after:

openocd-ftd2xx -f str7xx_jtagkey.cfg

Error: ftd2xx.c:717 ftd2xx_init(): unable to open ftdi device: 2
Error: ftd2xx.c:732 ftd2xx_init(): ListDevices: 2

Error: ftd2xx.c:734 ftd2xx_init(): 0: USB <-> Dual Serial A
Error: ftd2xx.c:734 ftd2xx_init(): 1: USB <-> Dual Serial B

so I switch in my config file ftd2xx_desc to "USB <-> Dual Serial A" as
you advise me, and great! i manage to connect to target.

I also manage to connect and run my firmware with gdb, but i can't put
any breakpoint?

Info:  arm7_9_common.c:264 arm7_9_add_breakpoint(): sw breakpoint
requested, but software breakpoints not enabled
Info:  breakpoints.c:63 breakpoint_add(): can't add software breakpoint,
resource not available

Author: Dominic (Guest)
Posted on:

Rate this post
0 useful
not useful
Hello,

Joemanu wrote:
> I also manage to connect and run my firmware with gdb, but i can't put
> any breakpoint?
>
> Info:  arm7_9_common.c:264 arm7_9_add_breakpoint(): sw breakpoint
> requested, but software breakpoints not enabled
> Info:  breakpoints.c:63 breakpoint_add(): can't add software breakpoint,
> resource not available

Software breakpoints require one of the hardware comparators, and are
therefor disabled by default. You have to enable them with:
arm7_9 sw_bkpts enable

If your code is running in Flash, you have to use hardware breakpoints
instead. Do not enable software breakpoints, to have both breakpoints
available for hardware breakpoints, and force OpenOCD to use HW bkpts
even if GDB requested a software breakpoint:
arm7_9 force_hw_bkpts enable

See the wiki at
http://openfacts.berlios.de/index-en.phtml?title=O...
for additional information.

Regards,

Dominic

Author: Joemanu (Guest)
Posted on:

Rate this post
0 useful
not useful
Thanks you Dominic, for all your help,I appreciate.

Best regards.
                      Joemanu

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.