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 277 commits into
blackmagic-debug:mainfrom
ALTracer:feature/hazard3-ice40-support
Open

Feature: Hazard3 example SoC on Icebreaker support#2113
ALTracer wants to merge 277 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
dragonmux added 28 commits March 8, 2026 16:27
…adability in the USB configuration setup code
…per use of atomics, resulting in smaller and more correct code
…roper use of atomics, resulting in smaller and more correct code
…change notifications so it's a little more responsive without being overwhelming for traffic
…correctly and the pins are driven suitably hard
…ng the dual target serial interfaces up to the second host serial interface
…n steering macros weren't available when they should be
lethalbit and others added 29 commits May 18, 2026 16:25
… function that requires `target` to be a valid non-NULL pointer
…rd response when the argument decoder fails
…K blocks as found on the Lattice Versa boards
…ommand

This was found by looking at the JTAG traffic the lattice diamond programmer generated when programming the ispCLOCK device, and the name was extracted from a JED for the ispCLOCK being converted to an svf file, as the name for this command was included in a comment in the resulting file.
…_done`

These now properly handle the setup and exit for programming ispCLOCK devices
…e attached ispCLOCK device.

After much mucking about and trying to figure out what the lattice programmer was doing and how much of it is required, the method for properly programming the ispCLOCK devices was figured out, which does include wiggling TCK, for some reason....
This is used so we can verify the contents of the the ispCLOCK device and ensure that the correct configuration for it was written
* Extract the memory write into a dedicated helper function
* Wrap it into TRY-CATCH macros
* Drop the extraneous 10ms delay introduced back in PR2072
@ALTracer ALTracer force-pushed the feature/hazard3-ice40-support branch from 7eed088 to 57daea4 Compare June 13, 2026 20:22
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.

9 participants