Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Feature: Hazard3 example SoC on Icebreaker support#2113

Open
ALTracer wants to merge 247 commits into
blackmagic-debug:mainfrom
ALTracer:feature/hazard3-ice40-support
Open

Feature: Hazard3 example SoC on Icebreaker support#2113
ALTracer wants to merge 247 commits into
blackmagic-debug:mainfrom
ALTracer:feature/hazard3-ice40-support

Conversation

@ALTracer
Copy link
Copy Markdown
Contributor

Detailed description

  • This is a minor new feature (basic new target board support).
  • The existing problem is BMDA detecting the JTAG TAP of Hazard3/ice40 but it's unknown to it. So no debugging is possible even though riscv32 debug should be already supported.
  • The PR solves it by registering 0xdeadbeef TAP ID in jtag_devs.c table, and registering 0xe77 manufacturer to hazard3_probe which simply adds 0x0+128 KiB SPRAM of ice40up5k. I also add the icebreaker FTDI interface A configuration to BMDA ftdi_bmp table so that no solderbridge mods are required, which was convenient to me.

I didn't touch rp2350.c because uniprocessor Hazard3 is unrelated to that (also no flash support and no bootrom) but creating an entire translation unit for this seemed excessive buildsystem-wise.
Tested on 1bitSquared Icebreaker-v1.0e (FT2232H, iCE40UP5k) flashed with https://github.com/Wren6991/Hazard3 modified gateware, and BMDA.
Because progbuf-based memory access is unsupported in BMD, and Abstract Access Memory is not implemented in Hazard3, you need to synthesize with HAVE_SBA=1 (then it doesn't fit 5280 LC so I had to FAST_BRANCHCMP=0 and it also may fail 12 MHz timings, but hit 10 MHz). Also I changed PCF to swap Interface B and Interface A, likewise you can use PMOD 1 or 2 for JTAG DTM and wire up a real BMP that's faster than BMDA+FTDI HS MPSSE (10 KiB/s load/verify).

Your checklist for this pull request

Closing issues

@ALTracer ALTracer force-pushed the feature/hazard3-ice40-support branch from b47738f to 2daf09d Compare May 14, 2025 20:17
gojimmypi and others added 28 commits March 8, 2026 09:20
…p USB, timing, and setting up the correct vector table address
dragonmux and others added 29 commits May 2, 2026 00:53
* Any delays necessary will exist at callsites
* Most platforms do not have this delay
* Duration of 10000 iterations depends on Hclk and architecture (stlinkv3 CM7 may complete faster)
The first was that we forgot a `!` on a `calloc` check, the second is we were doing a `CMD_LSC_READ_CRC` vs a `CMD_LSC_RESET_CRC`
It seems to have inexplicably changed? It was 0x5U, but now it's 0x1U? I have no idea what happened.
…he `final_tms` adjustment for `bits` into account
@ALTracer ALTracer force-pushed the feature/hazard3-ice40-support branch from 971540b to 7eed088 Compare May 14, 2026 11:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants