shibboleth has quit [Remote host closed the connection]
shibboleth has joined #openocd
Andy_P has joined #openocd
<Andy_P>
Hola! Quick question. I have a board with two devices on the JTAG chain. One is a RISC-V embedded in a PolarFire FPGA and the other is an Igloo FPGA. I'd like to debug the RISC-V firwmare. I have the latest SoftConsole from Microchip, and if the PolarFire's RISC-V is the only thing on the chain, it works as expect. I need to know how to set up the
<Andy_P>
board script so it knows about the Igloo and can pass JTAG signals through it. Anyone have an example board file that's reasonably close (one device to debug, the other to bypass)?
<PaulFertser>
Hi
<PaulFertser>
Andy_P: you just add another tap with the right irlen and that's it.
<PaulFertser>
Andy_P: I'd first try running openocd without any taps defined to see if autodetection works.
Haohmaru has quit [Ping timeout: 260 seconds]
<Andy_P>
i figured that adding another tap should do it, but I'm new to this, and I don't know where/how to do that
<PaulFertser>
Andy_P: how do you normally start openocd?
<Andy_P>
from within SoftConsole, the typical Eclipse debug session
<Andy_P>
I'm looking to see if there's a shell from which I can start it
<PaulFertser>
Hm, SoftConsole. Isn't that the product that violates GPL of OpenOCD developers?
<Andy_P>
I honestly have no idea. It's what Microsemichip provides.
<PaulFertser>
Can you request source code from them, including the source code for all the libraries they link with?
<Andy_P>
I have not requested the source code because I don't need it.
<PaulFertser>
Please do. I think I tried to look at their distro and came to the conclusion they're in violation.
<Andy_P>
but that's not my issue. I'm just looking for what I need to add to the chain so that it bypasses a device
<PaulFertser>
So you want to use an illegal copy of the software, and have the original developers help you?
<Andy_P>
you know, I have no proof that Microchip bundling OpenOCD with their Eclipse distribution violates any licenses.
<PaulFertser>
I once downloaded their binaries and couldn't get the full corresponding source code from them as GPL requires.
<Andy_P>
so you want I should contact Microchip and ask for the source for their OpenOCD distribution and then come back to you with them before you'll help? Should I have instead said, "I am using OpenOCD to debug a product I designed" without indicating where I got it from? Should I instead just download OpenOCD directly and do that? Because I just did
<Andy_P>
that.
<PaulFertser>
I've already said that you just need to define another tap, and that should work. And suggested to run without config to see autodetection results.
<PaulFertser>
It's not like I'm not trying to help at all.
<PaulFertser>
And of course if you're using vanilla upstream OpenOCD that makes me much more comfortable, yes.
<Andy_P>
Then the question is "how to define another tap."
Andy_P has quit [Quit: Client closed]
Andy_P has joined #openocd
<Andy_P>
autodetect didn't work. I removed the line source [find target/microsemi-riscv.cfg] from the board config file and the autoprobe found two devices
<PaulFertser>
Andy_P: in the right order. So you add that source command for the target back, and then you need the jtag newtap command before or after it (depending on the JTAG chain order).
<Andy_P>
jtag newtap auto0 tap -irlen 8 -expected-id 0x1ba141cf
<Andy_P>
source [find target/microsemi-riscv.cfg]
<Andy_P>
OpenOCD only supports Debug Module version 1, not 0.
<PaulFertser>
I do not see interface/microsemi-flashpro.cfg in upstream OpenOCD though.
<PaulFertser>
Other than that looks right.
<Andy_P>
it's in what Microchip distributes.
<Andy_P>
I'm looking at what Microchip includes with SoftConsole and it appears to be a standard binary of OpenOCD with no modifications. All they did was to add config files for their JTAG dongles and their processor cores.
<PaulFertser>
I saw them linking with some proprietary DLLs to support some additional JTAG adapters apparently.
<Andy_P>
likely for their FlashPro dongles.
<PaulFertser>
But linking GPL with proprietary DLLs is illegal.
<Andy_P>
does TI publish the source code for their debugger stuff?
<PaulFertser>
I remember Analog Digital published.
<PaulFertser>
Not sure TI has an OpenOCD fork.
<PaulFertser>
ST certainly publishes.
<Andy_P>
TI xds110 is supported in the standard OpenOCD distro
<PaulFertser>
Yes, TI contributed it directly properly.
<Andy_P>
anyway this is all very nice and academic and I don't want to get dragged into a discussion about whether a particular vendor abides by a license because I have no control over any of that.
<PaulFertser>
As a user you have certain control because you can demand compliance.
<Andy_P>
As a user I get precisely dick from Microchip because I don't buy enough parts. They will, quite honestly, tell me to pound sand.
<PaulFertser>
For me personally it was always very practical, as I'm spending my free time and energy to help the community, and I do not want vendors to abuse the work of me and the others who think similarly.
<Andy_P>
you as the developer have more pull than I do. Can't you demand that Microchip pulls OpenOCD from their tools?
<PaulFertser>
I kinda tried but I think they didn't reply me at all.
<PaulFertser>
Enforcing GPL is problematic.
<Andy_P>
i understand. but from the perspective of the tool user, I either use what they provide or go down a painful path of finding alternative solutions.
<Andy_P>
and since money talks and I do not buy enough parts, they don't listen to me either.
<Andy_P>
so I honestly don't know what to tell you.
<PaulFertser>
Is your project a hobby or open source hardware or non-commercial?
<Andy_P>
no, it is a product we sell to commercial customers. Nothing in the product uses open source software.
<PaulFertser>
So you can choose between different hardware vendors and give the money to an ethical one, or at least the one that doesn't abuse free software developers.
<PaulFertser>
Also, commercial products are often made by commercial companies, so there might be some lawyer that can try negotiating licensing details with Microchip if needed.
peepsalot has joined #openocd
<Andy_P>
if only other vendors offered devices which fit our requirements.
<PaulFertser>
Tough call
<Andy_P>
well we either use the parts that meet our requirements or we all go home and get jobs at the supermarket.
<Andy_P>
look, I understand your position. I don't see anything in the SoftConsole distribution that's different from the standard OpenOCD other than Microchip added config files to support their M1 and RISC-V cores.
<PaulFertser>
Can you please pastebin interface/microsemi-flashpro.cfg ?
<PaulFertser>
So "interface microsemi-flashpro" it is. That means this OpenOCD binary includes some additional compiled binary code, something not present in upstream. So it's not just a config file.