Commit graph

19 commits

Author SHA1 Message Date
bunnie
08cf863ff5 update SoC artifacts for 0.9.11 build 2022-12-12 16:05:15 +08:00
bunnie
156e60d1dd fix regressions from litex 2022.08 2022-11-17 22:12:32 +08:00
bunnie
280d61db34 trial commit latest soc artifacts
updating Litex, seems to have broken things. trying to see
if a rebuild with new SVD file helps.
2022-11-17 19:37:17 +08:00
bunnie
67fc21fbdd harmonize hosted mode selection, but retain an explicit hosted flag
In general, hosted mode is assumed "by default" if the target
is not Xous. This allows packages to be built cleanly on command
lines that don't know to pass a --feature flag to specify a target.

However, an explicit "hosted" flag is still retained so that we
can confirm the build system intent. This saves us from the failure
mode that we thought we were building for target A, but accidentally
ommitted the flag, and instead we've been silently building for
"hosted" mode without any warning. The main consumer of the "hosted"
flag is now just the build.rs script inside of the utralib.
2022-10-25 17:21:02 +08:00
bunnie
8fc79674dc
leave maintainer hints
cargo debugging is so hard. If you're OK with it, I really would like gems like how to debug this code to be included as a comment in the source where you might look to fix such problems. Google turns up crap results when you try to search for these hints, and the results have been really unstable as well. I know such comments pollute the source code but it'll save a lot of time in the future trying to remember the trick to debug a tricky thing later on, I think.
2022-10-20 15:55:24 +08:00
Sean Cross
37cbf2b598 utralib: don't unconditionally regenerate files
Generate files in-memory (which is a cheap operation) and only write the
file to disk if it is different from the existing file.

This prevents rebuilds in the following circumstances:

1. When changing utralibs, an extra rebuild is always generated due to
   the file being updated mid-build. This will no longer happen.
2. When switching targets, there will no longer be an unconditional
   rebuild. This is because the feature flags are mixed in with the
   package hash, and different builds use different feature flags.
3. When one svd file is updated, other variants of that feature flag are
   no longer rebuilt. For example, when updating the Renode SVD,
   Precursor DVT1 will not need to be rebuilt, since that has not
   changed.

Changing a given SVD file will cause that target's version of utralib to
be rebuilt, and only that target's version.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-10-20 15:03:38 +08:00
bunnie
dcbf028c5c bump soc rev
minor rev to fix a dangling git reference
2022-10-20 04:58:48 +08:00
bunnie
77e1379fc0 add SoC with new Vex core
updated codebase, hopefully pulls in fixes for cache clear
2022-10-20 04:24:00 +08:00
bunnie
74fe8c989c add dvt target
resurrecting some old hardware as an efuse testing target;
new hardware is too precious at the moment given the ridiculous
shortage of FPGAs on the market.
2022-10-18 21:47:16 +08:00
eupn
e616f5348e
utralib: employ macros to simplify features check
Use declarative macros and compile-time computations to make feature flags checks more cleaner and future-proof at the cost of introducing some macros
2022-10-12 16:32:16 +04:00
bunnie
d0dc2e2a9f add renode as a target to utralib 2022-09-27 18:09:33 +08:00
bunnie
fad43a1e0f add target routing to build.rs 2022-09-27 16:30:45 +08:00
bunnie
895957e53a pass the SVD config back to xtask
this is necessary because we need the full SVD path to generate
the whitelist of physical pages that can be addressed. Since the
SVD path is now domiciled in utralib, a file called "SVD_PATH"
is created in the target/ directory which contains the resolved
path to the SVD file given the abstract target/rev feature pair.
2022-09-27 15:12:28 +08:00
bunnie
2f016c3876 handle case of a "clean" build without failure 2022-09-27 03:12:08 +08:00
bunnie
3a6f69a4ad fix SVD spec toggle trigger
this fix makes it so that

1) you always get a correct build when the SVD spec is toggled
2) you don't always rebuild when nothing has changed

(2) is with the caveat that the no-change flag is only clean
after your second build (i.e. your third run will be fast).
I'm not quite sure why but I think it's because the "changes"
to the config file tracker are computed throughout the first
build and the second build still sees that file as recently
changed, so, it'll trigger a rebuild (could also just be
a race condition because the timestamp of the rebuild is
at the same second that the file was regenerated, so conservatively
you'd rebuild the next time).
2022-09-27 03:06:42 +08:00
bunnie
17248fdbf1 revise utralib to use features to select the SVD file 2022-09-26 23:24:22 +08:00
Sean Cross
c36615d014 utralib: use canonicalized path for svd in rebuilding
Use the full path to the .svd file to ensure it is rebuilt when the file
changes.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 17:18:44 +08:00
Sean Cross
a2ede7adf6 utralib: fix build dependency on svd file
Previously, the svd file was treated as an environment variable to
watch. Naturally this never changed, so an updated svd file never
triggered a rebuild.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-13 14:18:00 +08:00
bunnie
9a50de8b4e refactor: utra -> utralib naming
this cleans up some namespace issues when including
the utra crate which also refers to utra::generated::utra,
and there are CONST at the crate-level, and also functions
at the module-level which need disambiguation. By naming
the crate utra-lib this saves a bit of syntatic wrangling
at the top of every file.
2020-10-12 03:56:10 +08:00
Renamed from utra/build.rs (Browse further)