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
Open
Conversation
6 tasks
b47738f to
2daf09d
Compare
… writing firmware
…v8-M main profile
…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
…the on-board Flash
…ng the dual target serial interfaces up to the second host serial interface
…oesn't get upset by them
…fer and more reasonable
…n steering macros weren't available when they should be
… 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
…nk v2 firmware to make things fit again
…and stubs for manipulating it
…ulation to implement Flash functions
…ut of programming mode
…lock_flash_erase`
…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
7eed088 to
57daea4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detailed description
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