Forum: Mikrocontroller und Digitale Elektronik Use your STMxx-Discoveryboard as JTAG (SWD)


von Bingo (Gast)



Lesenswert?

Ich habe versaloon angepasst (nur SWD) fur die onboard ARM debugger am :
1: STM8S-Discovery
2: STM32VL-Discovery

vsprog funktioniert , so ich kann programmiere meiner STM32VL-Discovery 
via die eingebaute USB.

Und Simon arbeitet am einer neues OpenOCD patch , ich habe problemen mit 
OOCD und die neue versaloon firmware.


Siehe weiter hier

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=101700&start=0&postdays=0&postorder=asc&highlight=

Die sources kommt bald , wann OOCD is fixed.

mfg
Bingo Dänemark

von Bingo (Gast)


Lesenswert?

Ohh

Tested on Versaloon SVN rev 669 , also for vsprog

/Bingo

von Bingo (Gast)


Lesenswert?

Yess

OpenOCD funktioniert auch

http://www.versaloon.com/bbs/viewtopic.php?p=63#p63

mfg
Bingo Dänemark

von Bingo (Gast)


Lesenswert?

Und sourcecode als versprochen

http://www.versaloon.com/bbs/viewtopic.php?p=65#p65

mfg
Bingo

von Tom (Gast)


Lesenswert?

Was erzählt der da uns?

von Stefan B. (stefan) Benutzerseite


Lesenswert?

Tom schrieb:

> Was erzählt der da uns?

Du musst das nicht nutzen. Einfach weitergehen...

Bingo arbeitet kräftig an dem OpenSource & OpenHardware Projekt 
Versaloon mit und stellt seine Arbeiten der Community zur Verfügung. 
Ich finde das Projekt spannend. "Uns anderen" kann das z.B. bei ISP 
und JTAG nutzen.

von Bingo (Gast)


Lesenswert?

Neu funktionierende OpenOCD BuildScript hier

http://www.versaloon.com/bbs/viewtopic.php?p=74#p74

Bingo Dänemark

von Bingo (Gast)


Lesenswert?

Die Versaloon SWD port für STM8S & STM32VL ist jetzt im Versaloon trunk 
(Rev 688+).

svn checkout http://vsprog.googlecode.com/svn/trunk/


Da sind einer kleiner fehler (rev 688) für die STM8S im
dongle/firmware/Projects/board_defs.mk

LD_FILE     = sd-discovery.ld

soll

LD_FILE     = st-discovery.ld

werden.

Build OOCD als hier
http://www.versaloon.com/bbs/viewtopic.php?p=74#p74

mfg
Bingo Dänemark

von Trockenpflaume (Gast)


Lesenswert?

Die Seite ist ziemlich uninformativ, aber es ist wohl eine Art USBProg 
auf STM32 Basis.

von Bingo (Gast)


Lesenswert?

Versaloon ist einer ARM JTAG am STM32 basis.

Und ich habe die ARM JTAG SWD angepasst für die OnBoard ST-Link am 
STm8S-Discovery und STM32VL-Discovery boards angepasst.

Nur SWD (Serial Wire Debug), als die ausführte pins (0.1" pinheaders) am 
die 2 boards , nur habe 2 pins.

Wann die Versaloon ist im ST-Link ARM chip programmiert , dan können sie 
die board brauchen als ARM SWD debugger mit OpenOCD.

Und am die STM32VL-Discovery kann man die onboard STM ARM-ValueLine 
direkt programmiere via OpenOCD oder vsprog , nur die standard STM32VL 
USB kabel ist connected zu PC. Und die eingebaute ARM-USB chip (ST-Link 
mit Versaloon firmware) programmiere die onboard STM32-VL chip via SWD.

Ich hoffe sie verstehe meiner "Schule Deutch"

mfg
Bingo Dänemark.

von Bingo (Gast)


Lesenswert?

Ich habe einer fehler mit "Target Reset / Value-Line MCU" am 
STM32VL-Discovery board korrigiert.

Siehe veiter hier (erste post)
http://www.versaloon.com/bbs/viewtopic.php?f=2&t=17&start=0

OpenOCD funktioniert jetzt ok.
Aber ich glaube das ich release noch einer version in die nexte 2 
wochen.


mfg
Bingo Dänemark

von Bingo (Gast)


Lesenswert?

Tim hast einer nettes guide macht hier
Um einer STM32VL brauchen zum konvertiere ein andere STM32VL zum 
Versaloon

http://takenapart.com/?p=82

Die firmware und OOCD sind hier (erste post)
http://www.versaloon.com/bbs/viewtopic.php?f=2&t=17

mfg
Bingo Dänamark

von Uwe Bonnes (Gast)


Lesenswert?

Was fehlt noch fuer die JTAG Programming mit den modifizierten STM 
Adaptern?

von Bingo (Gast)


Lesenswert?

Die STM32VL hast nur 2 ST-Link-MCU pins am "Pinheaders"

Die STM8S hast auch nur 2 , und die ST-Link-MCU "Native JTAG" pins

Ob Versaloon die "Native Pins" brauchen kann , dann sind Jtag villeicht 
possible.

Ich habe Simon fragt ob Jtag specielle funktionen braucht (SPI), oder 
nur normales GPIO pins ?

Kein antvort bis heute


mfg
Bingo Dänemark

von Info (Gast)


Lesenswert?

So I could use two STM8S to flash your branch of versaloon's Vsprog onto 
one with the other?

von klausr (Gast)


Lesenswert?

Hallo,

ich wollte eines meiner zwei STM32VL Boards nach versaloon konvertieren 
- leider kann ich nicht mehr auf das Versaloon Forum 
(http://www.versaloon.com/bbs/viewtopic.php?f=2&t=17) zugreifen. Gibt es 
die unter http://takenapart.com/?p=82 erwähnte binaries auch woanders 
zum runterladen? Woher bekomme ich einen aktuellen OpenOCD? Vielen Dank 
im Voraus für eure Hilfe!

-Klaus

von Info (Gast)


Lesenswert?

> leider kann ich nicht mehr auf das Versaloon Forum .. zugreifen.
Das ging vorhin noch. Bestimmt nur temp..

von klausr (Gast)


Lesenswert?

Ja Danke! Geht wieder...

-Klaus

von Bingo (Gast)


Lesenswert?

@Info

I have used a normal "ARM-Jtag" to convert the STM8S to versaloon.

Quite easy , as the jtag headers is available on a STM8S.

Once i have Versaloon in a STM8S i can program a STM32VL via SWD.

/Bingo

von klausr (Gast)


Lesenswert?

@Bingo: My problem was, that www.versaloon.com/bbs was down. It works 
again now. I have two STM32 discoveries and I want to convert one to 
versaloon, and I needed the files mentioned in that thread in the 
versaloon forum.

-Klaus

von Info (Gast)


Lesenswert?

Ok so I can convert an STM discovery board into versaloon with another 
discovery board.
Can I use that firmware to flash MSP430 via JTAG? You mentioned two 
pins, but I'm not sure what this implies - so please be so kind and tell 
what the limitations of versaloon on the ST-Link are.

von Bingo (Gast)


Lesenswert?

The STM-Discovery boards only supports ARM Cortex SWD for the moment.

This is due to the 2 pin limit.

If you need a full Versaloon (Jtag & other features) , i suggest you get 
a "Real Versaloon" dongle.

When i get the bootloader working , i might be able to convert the 
STM8S-Discovery to a Jtag & SWD versaloon. As i might be able to use the 
"Native Jtag" pins for the missing JTAG pins.
But it depends on how Simon drives the other pins , and if he uses the 
pins in a "Non GPIO" mode , that is bound to a specific pin.


/Bingo

von Info (Gast)


Lesenswert?

Tak for det.

von Bingo (Gast)


Lesenswert?

@klausr

What do you need ?

I suggest you grab the bootloader from here
http://www.versaloon.com/bbs/viewtopic.php?p=742#p742

Program the bl_GCC.bin file into a STM32 , using the other one.
I haven't tried the using a STM32-Discovery with STM's windowsprogrammer
But Tim says it works. Just remember to to unlock the STM32 first , as 
ST enables the protection bits ... And so does the bootloader.

Then you can build your own firmware , but remember to change the 
flash-origin and load-offset in the 2 files (make room for the 
bootloader) , as described the the quote above.
See http://www.versaloon.com/bbs/viewtopic.php?f=2&t=17&start=130#p1391


For OpenOCD ... It's a bit more tricky (and i have only tried on Linux)

OpenOCD changes often , and is sometimes broken.
I made changes to Simons script here (forcing checkout of a specific 
version)
http://www.versaloon.com/bbs/viewtopic.php?f=2&t=29&start=30#p996

This is the version i'm currently using.
http://www.versaloon.com/bbs/viewtopic.php?f=2&t=17&start=140#p1486

Change the
WORKING_GIT_REV=4994c6008382d14875f122d2036dcabbde53221b
to
WORKING_GIT_REV=0123985abc88876ca8ecd03e9a5462cc8e911693

In the script i modified (listed) above , should check out that 
revision.

/Bingo

von Bingo (Gast)


Lesenswert?

@klausr

I forgot ...

You still need to get Simons "OOCD" package from here , as it contains 
the OOCD patches.
http://www.versaloon.com/bbs/viewtopic.php?f=2&t=29

Get this one (the 01-30)
http://www.versaloon.com/bbs/download/file.php?id=38

Just edit/replace the oocd_update with the script i made.

Or you can try the latest OOCD (using Simons script unmodified)... 
Sometimes it works :-)

@Info ... Selv tak

/Bingo

von J. V. (janvi)


Lesenswert?

as far as I can understand, your posting explains how to connect openOCD 
with the 2 pin Serial Wire Debug Interface from ST. Versaloon seems to 
be a hardware board what can do the cable link to the target (?). I 
already have a ST-Link but up on today, this seems to be limited for 
JTAG connections only? Your STM32VL-Discovery is used as a target system 
or programming cable ?

Is anybody able to provide a a step by step instruction on how to 
install OOCD debugger with STM32 2 pin SWD connection ?

von OppaErich (Gast)


Lesenswert?

Hallo,

ich kenne bisher nur Bootloader und besitze keinen ST-Link. Kann ich 
einen 8S oder 32VL nehmen um einen weiteren 8S zu konvertieren ?

Oppa

von Karsten F. (Firma: von Dänemark) (bingo600)


Lesenswert?

Einer 32VL sollte funktioniere als ST-Link , und kann ein andere 32VL 
oder 8S programmiere (Ich habe nut 8S konvertiert mit JTAG , nicht SWD).
Aber ich glaube das 8S und SWD kein problem werde.

http://takenapart.com/?p=82

mfg
Bingo

von Oliver R. (sourcebox)


Lesenswert?

Ich würde das aktuell gerne mit einem VL-Discovery ausprobieren, aber 
ich stelle fest, dass ich zu blöd bin, an ein aktuelles Binary zu 
kommen. Alle Links zum Versaloon-Forum laufen ins Leere und wenn ich bei 
Google-Code aus dem SVN eine aktuelle Revision auschecke, dann ist dort 
kein ST-Link Support mehr drin.

von Karsten F. (Firma: von Dänemark) (bingo600)


Angehängte Dateien:

Lesenswert?

Oliver R. schrieb:
> Alle Links zum Versaloon-Forum laufen ins Leer

Simon hast die neue Versaloon forum am yahoogroups macht.
http://tech.groups.yahoo.com/group/versaloon/

Einer backup von die alte group sind hier
http://www.versaloon.com/~bbs/viewtopic.php?p=22587
Aber die interne links im alte posts  muss manuelt anpassen verden bbs 
muss /~bbs/ verden

Ich habe fungerende binaries (svn-968) und OOCD buildacript als anhang 
macht


Hoffe das hilfe

mfg
Bingo Dänemark

von Oliver R. (sourcebox)


Lesenswert?

Vielen Dank, das hilft mir schon mal weiter. Ich versuche gerade zu 
verstehen, wie das ganze funktioniert. Zum Flashen wollte ich einmalig 
das ST-Link Utility unter Windows benutzen und später unter Linux bzw. 
OSX arbeiten. Brauche ich dazu die Version mit oder ohne Bootloader?

von Karsten F. (Firma: von Dänemark) (bingo600)


Lesenswert?

I'll have to continue in english here.

For a start i'll recommend that you install the version without 
bootloader.
Then you only have to install/flash the firmware. And it will work.

Play around , and when comfortable , maybe reflash with bootloader.



For bootloader
You have to make 2 steps

1: Flash the bootloader
2: Use vsprog & bootloader to load "real versaloon" firmware
See /svn-986/STM32VL/Bootloader/Simon-BL/Versaloon-BL-How2.txt

Advantage of bootloader is that you hopefully never have to flash it 
again , you can just load new firmware with vsprog & the bootloader.


Ps: Every time you flash , remember to remove the "Write protect" fuses.
    You will have to find out how , depending on what programmer you 
use.


Rgds
Bingo

von Oliver R. (sourcebox)


Lesenswert?

I got the no-bootloader version running. Now moving on to the OpenOCD 
stuff.

von Karsten F. (Firma: von Dänemark) (bingo600)


Lesenswert?

Super

There might be some OOCD tips here
http://www.versaloon.com/~bbs/viewtopic.php?f=2&t=10695


******** For STM32L , ans maybe STM4F ********

Here is a link to the STM32L (not VL) thread if anyone has one.
http://www.versaloon.com/~bbs/viewtopic.php?p=23356#p23356

I'd suspect the STM32L mod and the STM4F mod , to be the same as the 
ST-Link hardware on the board is 99% equal (STM32L just has Zeners added 
to the SWD i/f)

Simon says he new SVN trunk supports STM4F , see yahoo.

Rgds
Bingo

von Info (Gast)


Lesenswert?

Hallo,

wie ist der aktuelle Stand der JTAG-Funktion für STM32F4?

Die frischesten Spuren sind 
http://groups.yahoo.com/neo/groups/versaloon/conversations/topics/383 
und dort gibt es offenbar Probleme.

Hier ist ein log (nur Stichworte, schwer zu folgen):
https://dl.dropboxusercontent.com/u/85069787/versaloon-gerbers/gerbers.html
1
Current attempts on the F4 discovery board do not look good for installing versaloon. This research is collected in attempts to find ways to resolve it. Flashing VSL to your F4 board may render it unusable. More to come as the situation evolves.

Hier ist ein Binary (vsprog - Revision 1504: /trunk/release/firmware):
https://code.google.com/p/vsprog/
http://vsprog.googlecode.com/svn/trunk/release/firmware/Versaloon_GCC-STM32F4_Discovery-0x0000.hex

Hier ist die Versaloon hompeage
http://www.versaloon.com/ und ein Release
http://www.versaloon.com/download/versaloon_release.7z

Ist MSP430-JTAG mit dem STM32F4 Port unterstützt? Wie ist die 
Pinbelegung? Welche Rolle spielt der ST-Link des Discovery-Boards?

http://www.versaloon.com/doc/versaloon/doc_versaloon_programmer_platform.html#doc_versaloon_programmer_msp430

                  STM32 F4 Discovery
    JTAG_TRST  -  ?
    JTAG_SRST  -  ?
    JTAG_TCK   -  ?
    JTAG_TDO   -  ?
    JTAG_TDI   -  ?
    JTAG_TMS   -  ?
    JTAG_RTCK  -  ?

von Info (Gast)


Lesenswert?

ST-Link Utility
http://www.st.com/web/en/catalog/tools/PF258168

Damit werden auch die Treiber kopiert (die ich dann aber noch manuell 
auswählen musste).

Mit dem Utility lässt sich "Versaloon_GCC-STM32F4_Discovery-0x0000.hex" 
nach 0x08000000 schreiben (und erfolgreich verifizieren). Die Adresse 
wird ja wohl aus dem Hex kommen?

Mit dem User-USB verbunden, aber es wird kein Gerät erkannt...

von Uwe Bonnes (Gast)


Lesenswert?


von Info (Gast)


Lesenswert?

Versaloon unterstuetzt viele Targets, interessant fuer mich ist das 
MSP430 JTAG

[code]
Black Magic Probe is an open source project to provide firmware for 
STM32 processors able to

- flash and debug STM32, SAM3, TI Stellaris and some NXP processors
- expose an UART link
- expose a TRACESWO link
[code]
http://www.blacksphere.co.nz/main/blackmagic

von H4ck3r :-) (Gast)


Lesenswert?

versaloon.com ist leer.
Projekt tot? Yahoo Group tot.
Code evtl. https://github.com/versaloon/versaloon ? "simonqian" ist da 
aktiv..

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.