This was possible thanks to DHowett's guides and help in the Framework Discord:
https://www.howett.net/posts/2022-04-adding-an-ec-feature-1/
https://gist.github.com/DHowett/c6ffed56eedcaa881a7eabb227e0e4ae
This was done using WSL2 Ubuntu, but should work on regular Ubuntu.
Install the required dependencies from Step 2
apt install build-essential libftdi1-dev gcc-arm-none-eabi