A correction to the upstream URL in this RFP, and two build problems
I've since found.
Upstream: the open Xilinx toolchain doesn't use chipsalliance/fasm.
It uses the openXC7 fork:
https://github.com/openXC7/fasm
chipsalliance/fasm has had no commits since 2022. The fork is
chipsalliance's master plus the CMake install fixes from
chipsalliance/fasm#87, which I mentioned in my first message. Other
packagers already use it: for example, a Nix packaging of the openXC7
toolchain builds fasm from openXC7/fasm. So a package would be
better based on openXC7/fasm than on chipsalliance/fasm or the PyPI
release.
Build problems, with fixes I've sent to openXC7/fasm:
- With setuptools 84.0.0 or later, the ANTLR parser silently fails
to build. setup.py uses the extension object as a dict key, and
setuptools 84 made extensions unhashable. setup.py catches the
TypeError, prints a warning that is only visible in a verbose
build, and installs fasm with only the slow textX parser, which
needs textX (not in Debian). Fix:
https://github.com/openXC7/fasm/pull/<N1>
- The ANTLR parser handles some invalid input badly. Input that
isn't UTF-8, or an address that doesn't fit in 32 bits, aborts
the whole Python process. A larger address is silently truncated
(A.B[4294967297] becomes A.B[1]). A value too large for its
feature makes the parser return None instead of raising an error.
Valid UTF-8 outside ASCII, even in a comment, fails. Fix:
https://github.com/openXC7/fasm/pull/<N2>
As before, building from git with the third_party/antlr4 submodule
works. The PyPI source package lacks it, so it can't build the ANTLR
parser.
Karl