Commit graph

154 commits

Author SHA1 Message Date
bunnie
01c00194f0 clean up build issues for packaging 2024-01-15 00:24:29 +08:00
bunnie
0267a56989 format Cargo.tomls
because apparently cargo fmt doesn't format Cargo.toml files???
2024-01-15 00:14:39 +08:00
bunnie
e72bd86bb1 renode regenerated, add the format exclusion 2024-01-14 23:23:28 +08:00
bunnie
8ca1ee9bc2 suppress formatting of utralib files 2024-01-14 23:08:57 +08:00
bunnie
01853a500d format utralib
formatting of generated files is suppressed with a `rustfmt::skip`
directive on the `mod` import. HOWEVER, if a change is made to the
file and saved, it may still be formatted automatically until the
files are updated with codegens that put a format suppression
directive at the top
2024-01-14 23:05:01 +08:00
bunnie
8ec08c9c76 fix rust v1.75.0 warnings that are probably benign
a lot of re-import warnings have cropped up. While I appreciate
their studiousness on this, the problem is that removing some
of these exports in the API crate could mean that future users
who want access to some API features that aren't used in this
configuration are now unaccessible.

I think it's not a huge problem at the moment, just spam-cleaning
the warnings because there are too many to deal with carefully
at the moment.
2024-01-04 19:15:28 +08:00
bunnie
7db56d59f9 update generated soc utralib file 2023-09-15 20:45:43 +08:00
bunnie
f04d7bebe7 update latest SVDs to RTL 2023-09-15 20:45:15 +08:00
bunnie
62a424de1b partial progress on udma UART
just a hack-and-slash to get a feel for the peripheral subsystem

currently foiled by instability in loading large binary objects
to the emulated RAM
2023-08-21 03:56:25 +08:00
bunnie
f17ce555f7 sync latest cramium soc defs 2023-08-14 14:22:19 +08:00
bunnie
6fc3745ebd absorb latest cramium artifacts 2023-08-09 23:18:44 +08:00
bunnie
c79edf3fa5 harmonize simulation models to soc description 2023-08-09 03:10:11 +08:00
bunnie
162b87b9b0 update cramium register descriptions 2023-08-08 18:18:48 +08:00
bunnie
53469a68d0 publish package updates, sync to release tag 2023-08-08 14:35:49 +08:00
bunnie
e05c34c6be more fixes on the register space for cramium target 2023-08-04 01:31:28 +08:00
bunnie
b127cd093f bump version pins for change to xous-rs 2023-08-03 13:29:39 +08:00
bunnie
2e3c774604 pull in latest cramium artifacts 2023-08-03 13:28:04 +08:00
bunnie
bead89a6ac update utralib with latest soc model for cramium target 2023-07-29 01:02:19 +08:00
bunnie
51278451a0 update version pins to pull in cramium target 2023-07-19 21:07:56 +08:00
bunnie
56de4c586f bump utralib artifacts 2023-07-18 03:56:52 +08:00
bunnie
2c53eb0508 add cramium targets to utralib 2023-07-17 18:24:10 +08:00
bunnie
069edbc255 support multi-svd file designs
This patch set goes across all the toolchains and brings
in the support for split SVD descriptions of SoCs.

This is helpful for dealing with designs that have multiple
"top" files for the same core IP set. For exmaple, you may have
a SoC that you are developing that targets silicon, but
you have a version that wraps this in additional peripherals
available only in an FPGA emulator that are used for debugging.

In this case, you can have one SVD file be the description of
the SoC itself, and another SVD file describe just the "delta"
introduced by the FPGA wrapper that emulates/controls the SoC.
2023-07-17 16:27:09 +08:00
bunnie
952ba18fba commit vesrion pin bumps 2023-06-16 01:30:18 +08:00
bunnie
1300771a38 fixes to make PR work 2023-06-16 01:29:55 +08:00
bunnie
a8c1ac4d79 forgot to switch out this patch...dangit 2023-05-23 18:17:44 +08:00
bunnie
5a2df4432c technical debt: cleanup UTRA package
- make the "base" field no longer public. It is accessible, but only
through an `unsafe` method, because, it is unsafe.
- add accessors to offest/mask fields. Because, it's not at all
unsafe to access these, and it can be useful for bit-ops that are
not part of the generic set of UTRA.
- add Arc to AtomicCSR, and require `std` for AtomicCSR types.
This should not break anything, I checked inside @foundation-devices
keyOS and they don't seem to be using AtomicCSR anywhere.

The Arc makes it a bit safer to clone the AtomicCSR base pointer
and share it between threads, but it will have an impact on performance.
The USB stack (which requires AtomicCSR) was regression testing and the
impact seems minimal.

Recall that the main purpose of AtomicCSR is to provide a CSR accessor
that does not require a mutable reference to the base object. This
can make certain Rust idioms a bit cleaner. We wrap the base accessor
in Arc+Atomic to try and improve the safety of throwing the borrow
checker under the bus, but it's still not perfect because hardware
mutable state can have side-effects within hardware itself that cannot
be modeled or checked by Rust's borrow checker.
2023-05-23 18:11:24 +08:00
bunnie
697d44de3d bump version pins to absorb changes to svd2utra etc. 2023-05-03 23:11:12 +08:00
bunnie
8357ab31a5 bump all pins because utralib got updated 2023-04-09 00:48:35 +08:00
bunnie
f3dc258a6a reinstate app-uart into the svd tree 2023-04-09 00:46:28 +08:00
bunnie
e469eba167 bump version for utralib patch 2023-04-04 02:13:02 +08:00
bunnie
3ca8f669a3 breaking change in svd2utra: fix deprecation of quick-xml
quick-xml 0.19.0, a dependency of svd2utra, uses features
that Rust will deprecate.

Unfortunately, the only versions of quick-xml that do not
use the deprecated language features also break a portion
of the API. In particular, quick-xml will no longer take
a `File` as an input: it will only take a `Path`.

This means that the API for svd2utra is also broken, because
originally it was designed to take a `File`

This patch refactors svd2utra to work with the latest quick-xml,
but also breaks any code that calls svd2utra's generate
APIs.

Fortunately this is fairly easy to fix, the calling code
will typically already have the Path somewhere in it, so
instead of opening the Path and passing it into the function,
one may simply pass in the Path.
2023-04-04 02:03:35 +08:00
bunnie
5574744e14 commit lockfiles and verifiers 2023-03-14 16:46:04 +08:00
bunnie
f3c1b148ab note about publishing svd2utra first 2023-03-14 16:41:49 +08:00
bunnie
7749a6a5c1 add maintainer notes on how to publish the package 2023-03-14 16:41:07 +08:00
bunnie
dc58abfa04 commit latest renode.rs version 2023-03-14 16:37:45 +08:00
bunnie
303f595d6f bump versions to cleanup renode.rs sync issue 2023-03-14 16:34:53 +08:00
bunnie
7af6749877 harmonize renode.rs *again* 2023-03-14 16:18:12 +08:00
bunnie
1c67712912 fix renode harmonization issue 2023-03-08 04:37:21 +08:00
bunnie
dc5b844d02 commit lockfiles after publish bump 2023-03-08 04:09:08 +08:00
bunnie
b36290fd79 update the precursor_pvt.rs file with the autogen version to avoid errors on publish 2023-03-08 04:02:36 +08:00
bunnie
82e3aa322f bump toml files in prep for publish 2023-03-08 03:54:37 +08:00
bunnie
555c682ac9 cleanup hosted mode warning 2023-03-08 03:53:48 +08:00
bunnie
396c99b0a6 this was supposed to be renamed, not deleted 2023-03-08 03:48:29 +08:00
bunnie
dc75d8cd54 these were supposed to be renamed, not deleted 2023-03-08 03:48:06 +08:00
bunnie
0dd74fe7b3 remove gitrev from precursor soc type
in practice this has not been a useful indicator, and we
have stabilized the SVD format so that changes in the code don't
cause the SVD files to go incompatible anymore.

this should make maintenance a bit easier going forward, hopefully.

also merge in cramium support to harmonize the forks for easier
cross-patches in the future.
2023-03-08 03:46:03 +08:00
eupn
de296fb6c0
utralib: add SAMA5D27 svd and cargo feature 2023-03-05 16:39:23 +04:00
bunnie
5370ce396d bump all revs due to SoC artifact update 2022-12-12 16:07:20 +08:00
bunnie
08cf863ff5 update SoC artifacts for 0.9.11 build 2022-12-12 16:05:15 +08:00
bunnie
1d1b3a35b7 commit version bump 2022-11-26 10:00:44 +08:00
bunnie
aa9977cc58 bump all the things because we changed utralib again 2022-11-17 22:13:40 +08:00
bunnie
156e60d1dd fix regressions from litex 2022.08 2022-11-17 22:12:32 +08:00
bunnie
dabbfd6c35 bump all the things to absorb the SoC change 2022-11-17 19:39:18 +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
ba28dd8795 bump to absorb utralib straggler configs 2022-10-28 15:11:17 +08:00
bunnie
b5f4814bb4 cleanup some stragglers in utralib push 2022-10-28 15:10:00 +08:00
bunnie
a8fde09229 adjust build states to match 2022-10-27 03:30:11 +08:00
bunnie
7d80fb7598 rebuild and commit all the prebuild utralib artifacts 2022-10-27 03:27:39 +08:00
bunnie
87d3a32b3d commit utralib mods 2022-10-27 03:11:01 +08:00
bunnie
475e464efe bump versions due to svd2utra change 2022-10-27 03:04:22 +08:00
bunnie
d331d405ee bump version numbers for publication 2022-10-25 17:23:40 +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
eb7796b275 move the precursor binary artifacts out of the package
there is a limit on the size of a package that can be sent up
to crates.io and this doesn't scale
2022-10-20 17:07:53 +08:00
bunnie
805a7d528c flip back to using remote references 2022-10-20 16:30:06 +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
820f2d6180 ...and commit the artifacts referenced in the previous commit :P 2022-10-20 04:59:17 +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
bunnie
8e05925cfa somehow the transition to local paths got missed in the merge 2022-10-18 00:39:01 +08:00
bunnie
0584ad2f2c switch to local paths to see if this helps the build 2022-10-18 00:26:56 +08:00
bunnie
4b368d71db bump versions of crates 2022-10-15 01:31:54 +08:00
bunnie
d88f9cf685 absorb regenerated utralib files from previous patch 2022-10-15 01:29:49 +08:00
bunnie
63a87ca1bc bump all the versions 2022-10-14 16:54:43 +08:00
bunnie
4d52bb40f0 update artifacts from svd patch 2022-10-14 16:22:24 +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
d048372d46 absorb v0.9.10 soc artifacts 2022-10-09 17:53:12 +08:00
bunnie
4b293420c3 update utralib lockfile 2022-10-02 19:03:49 +08:00
bunnie
3ff1b66d2f absorb svd2utra rev 2022-09-29 22:16:24 +08:00
bunnie
8e86b58f06 add renode artifacts 2022-09-27 18:31:28 +08:00
bunnie
d0dc2e2a9f add renode as a target to utralib 2022-09-27 18:09:33 +08:00
bunnie
4f7f5855ec add the generated.rs top file which routes to specific configs with feature flags 2022-09-27 16:32:40 +08:00
bunnie
0cfc09f523 stop ignoring the generated files
generated files are now committed to tracked repo history
2022-09-27 16:32:15 +08:00
bunnie
b97a2f7042 bump rev and update readme 2022-09-27 16:30:57 +08:00
bunnie
fad43a1e0f add target routing to build.rs 2022-09-27 16:30:45 +08:00
bunnie
e35dc90ce5 add specific targets so we can pass crates.io guidelines 2022-09-27 16:30:09 +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
a4c9dabd0f add description 2022-09-27 03:14:45 +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
09842006f5 std should not be a default feauter 2022-09-27 01:15:55 +08:00
bunnie
ecd4aa2631 derp helps to name the default feature correctly 2022-09-26 23:25:58 +08:00
bunnie
17248fdbf1 revise utralib to use features to select the SVD file 2022-09-26 23:24:22 +08:00
bunnie
19c90c1cc7 move precursors to the utralib
this will allow us to package up utralib for generation of soc
dependencies
2022-09-26 16:49:49 +08:00
bunnie
f53bac3389 prep a version of utralib for push to crates.io 2022-09-26 14:23:10 +08:00
bunnie
e32ea4d3f5 fix #174 2022-06-10 21:36:53 +08:00
Sean Cross
7cd86b4fcf Merge branch 'main' of github.com:betrusted-io/xous-core into kernel-monorepo
Signed-off-by: Sean Cross <sean@xobs.io>
2022-01-14 15:33:10 +08:00
Sean Cross
35af35381a kernel: integrate kernel into main monorepo
This moves the kernel into the main monorepo, allowing it to share
packages with the rest of the system. This change will allow us to
reduce the number of rebuilds that take place, as well as reducing disk
usage.

Note that the loader is still an indepenent project, and the integration
of that into the monorepo is pending.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-01-14 15:31:36 +08:00
bunnie
b3788a54af clarify the dependency policy 2022-01-10 16:50:10 +08:00
bunnie
995915ed4e nail down a couple more dependencies, and add a policy note to Cargo.toml
Each Cargo.toml now includes a comment which remnids maintainers
of the dependency policy for Xous (that is, nail down every dependency
to the minor number).
2022-01-10 15:54:27 +08:00