Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚠️ Remove OCD's DM legacy mode #1056

Merged
merged 5 commits into from
Oct 12, 2024
Merged

⚠️ Remove OCD's DM legacy mode #1056

merged 5 commits into from
Oct 12, 2024

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Oct 12, 2024

  • debug module is compatible to spec. version 1.0 that has been ratified over a year ago and is widely supported (like upstream opcenOCD)
  • remove OCD_DM_LEGACY_MODE generic

@stnolting stnolting added risc-v compliance Modification to comply with official RISC-V specs. HW Hardware-related labels Oct 12, 2024
@stnolting stnolting self-assigned this Oct 12, 2024
@stnolting stnolting marked this pull request as ready for review October 12, 2024 18:53
@stnolting stnolting merged commit 5a4e0fc into main Oct 12, 2024
11 checks passed
@stnolting stnolting deleted the remove_ocd_dm_legacy branch October 12, 2024 19:45
@stokdam
Copy link

stokdam commented Nov 25, 2024

Hi @stnolting ! Unfortunately Microchip has not updated SoftConsole version yet. They're still stuck at version 2022.2. There is no easy way to obtain source code of their modified openocd (shipped with SoftConsole) which includes support for their proprietary JTAG controller FlashPro. This PR drops support for every Microchip FPGA.

@stnolting
Copy link
Owner Author

Hey @stokdam!

Unfortunately Microchip has not updated SoftConsole version yet. They're still stuck at version 2022.2.

Oh really? Wow, they should really catch up development. 🙈

I'm not familiar with SoftConsole, but under the hood it seems to be plain Eclipse, right? Maybe you could just configure a different openOCD version that supports newer RISC-V debug specs (just select a different openOCD installation - no source code modifications).

At least this is an approach I have used for some other "proprietary" RISC-V development environments that are also based on Eclipse (I*tel P*thfinder).

This PR drops support for every Microchip FPGA.

Basically, it is not the FPGA itself, right? It is just the internal JTAG access port. An external JTAG bridge would still work with Microchip FPGAs, wouldn't it?

I understand that this is annoying. I also don't like it when equipment manufacturers don't update their toolchain (or don't include instructions on how to do it yourself).

At the same time, however, it is also difficult to be backwards compatible and to maintain this in newer versions. So I am not really sure how to proceed. 🤔

The DM interface of NEORV32 did not change - so replacing the upstream one by the legacy one (that still provides compatibility with Microchip tools) should be possible. But I can also understand that this is quite fiddly and annoying in the long run.

@stokdam
Copy link

stokdam commented Nov 27, 2024

I'm not familiar with SoftConsole, but under the hood it seems to be plain Eclipse, right?

Yes, it is Eclipse, but actually I don't need anything else than their openocd.

Maybe you could just configure a different openOCD version that supports newer RISC-V debug specs

The problem is support to their proprietary JTAG programmer FlashPro, which is embedded in the modified openocd they ship with SoftConsole. Moreover, it implements the tunneling protocol needed to use the same pin for FPGA programming as user JTAG (main TMS signal is not available for user, they provide a bridge that decodes encapsulated JTAG "packets" just from TDI pin and regenarates all JTAG control signals https://ww1.microchip.com/downloads/aemDocuments/documents/FPGA/ProductDocuments/UserGuides/ip_cores/directcores/CoreJTAGDebug_UG.pdf).
immagine

What I can do for now is to connect neorv32 JTAG signals directly to some user pins and use a different JTAG adapter.
Don't know if it is feasible to use a differet JTAG adapter on main JTAG port instead. However, this would at least require to implement the tunneling protocol.

@stnolting
Copy link
Owner Author

The problem is support to their proprietary JTAG programmer FlashPro, which is embedded in the modified openocd they ship with SoftConsole.

Ah okay, I understand the problem. :(

What I can do for now is to connect neorv32 JTAG signals directly to some user pins and use a different JTAG adapter.

Sure, that should work. But I understand that this is not the best solutions (requiring an additional adapter + USB port).

I would recommend to use the last DM module that still supports the legacy mode and just use that instead of the one from the main branch.

Alternatively, we could try to figure out which specific DM features are required by your openOCD version. If it is just the version identifier (and maybe so blank register addresses) then we could try to come up with a DM that follows the up-to-date spec but is still backwards compatible to your setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HW Hardware-related risc-v compliance Modification to comply with official RISC-V specs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants