I had success building Braids and flashing that with an FTDI adaptor, so I thought I would take on building and programming Yarns via JTAG as another challenge.
I was wondering if anyone had advice on how to use the STM32f4 Discovery board in ST-LINK mode to transmit firmware to Yarns? I am working on Mac but have set up a PC environment to run the ST-LINK utility. Through the ST-LINK utility I can connect to the on-board STM32f4 of the Discovery board but I can not connect to the STM32f4 on Yarns. I am using the SWD port with an adaptor to connect to the miniJTAG port on Yarns, and I believe my wiring is correct:
STM32 SWD -> Yarns miniJTAG
1 VDD -> 1 VDD
2 TCK -> 4 TCK
3 GND -> 3 GND
4 TMS -> 2 TMS
5 RST -> 10 RST
6 TDO -> 6 TDO
Am I overlooking something obvious? Thanks in advance!
Have you removed the two jumpers on the Discovery board?
I have, yes, though that could surely be an obvious one to overlook!
With them in place I was able to target the Discovery MCU, but with them off I was unable to target the MCU on Yarns, which makes me think it’s either a bad connection or pinout translation between the boards or the MCU itself (I have 2 Yarns made and can not connect to either)
You have to connect yarns also to your Eurorack-Power Rail during the flash process
Yes, it was plugged in to my bus board. Maybe I’ll try a different ribbon cable for it… it was a cable I quickly made and did not check it for continuity.
It would be better if you posted such requests for help elsewhere, such as the DIY forum on Muff Wigglers. Olivier has indicated repeatedly that he doesn’t want to receive or see any requests for support from DIY builders of this modules – which is an entirely reasonable position to take. Since this is his forum, if you post such help requests here he can’t help but see them.
My apologies. I haven’t been on this forum much so I did not realize it was an issue.
I thought it could benefit anyone that wants to experiment with firmware since this workflow could apply to anyone who already has a Yarns. It just happens that I DIY’d mine.
I will take this elsewhere… thanks for the responses though!
If you are posing the question because you are intending to hack the firmware and share the results of your hacking efforts with others, then it may well be acceptable to ask such questions here. But if it is just to upload firmware for your own personal DIY build, I think it is reasonable to respect Olivier’s wishes, which he has explicitly stated on several occasions. However, it is his forum, and it is up to him. The other strategy is to spend a few minutes researching who may have already done what you are trying to do, and then contacting them directly by PM or email to ask for advice.
PS Why are you connecting pin 6 on the Discovery SWD interface to a JTAG pin on the Yarns? The Discovery documentation clearly states that the Discovery ST-LINK-v2 interface only supports SWD, and pin 6 on the CN2 connector is labelled “reserved”.
Connecting the SWO pin shouldn’t do any harm. The connection looks right, anyhow. Are you sure you’re counting right? ie
This works very well on a Mac, btw, no need to set up a PC environment (?)
I definitely understand the concern, but I’m really not here to just get a quick fix. What I find unfortunate is that if I didn’t mention anything about building the unit myself, there probably would be no issue with my line of questioning. I was proud that I got that far on my own and wanted to express that it was a springboard for the current endeavor. I’m really just trying to learn, but obviously jumping in past my level of understanding. Would I like to hack the firmware? Yes. Do I know what I’m doing? Not really. Will I be able to contribute anything back? Who knows, but definitely not if I can’t learn how to initiate communication between my devices. Everyone has to start somewhere, though. It’s hard to find the right angle of entry into all of this when you don’t know the right questions to ask, so I apologize if my approach is off or my choices don’t make sense.
As I said, it is Olivier’s forum - it is up to him to set policy about what sorts of support and assistance questions are welcome here, and which he would prefer, or require, to go elsewhere. I am in no way a moderator or gatekeeper here. I was just mentioning views which Olivier has expressed previously regarding support questions for DIY MI module builds.
However, there are many other places and ways of seeking help. You can approach people directly, and privately, although I don’t recall any mention here or on MuffWigglers of a completed Yarns DIY Yarns build, but that doesn’t mean someone hasn’t done it. I suspect that a lot of people are put off by need for a high-precision bench multimeter in order to properly calibrate it (that’s why I decided not to attempt a Yarns DIY build). You can ask on Muffwigglers. And there are lots of embedded device forums, some specialising in STM32 devices, where you could seek expert advice on using the STM32F4 Discovery board. I don’t have anything else to add to the advice that has already been given above.
A next step might be to purchase an Olimex OpenOCD programmer and cable adapter as Olivier recommends in his instructions for flashing firmware. There is a good chance it will work if you use exactly the same equipment and software that he uses.