have to absorb a version change due to xous-semver change
might as well also update the utra/svd generator dependencies
since that's been held off for a long time now.
running `cargo +nightly fmt -p app-loader` gives you one result.
running `cargo +nightly fmt --check` gives you another result.
manually opening and saving the files causes a result to agree
with the check.
I noticed that I actually hadn't changed anything in the xous-rs
directory, so I got rid of the patch. I also removed a few files
that weren't being used. Furthermore, I noticed that a couple of
random files were different from upstream so I changed them back.
I also modified the README slightly.
`app-loader' can now successfully download apps from the app server
and run them! I have also improved the UI by adding a progressbar
when an app is loading so that you know when it is done and also
replacing some panics with notifications that way the whole machine
doesn't shut down if the server has some problems.
The remaining UI work is to make sure that the menu pops back up when
you for example set the server.
I also need to add locales, a README, etc.
It turns out that in ELF files there *is* a difference between
file size and mem size. Mem size is the size of the chunk of memory,
but file size is the size of what we copy into there from the
file. Most of the time they are the same, which is why previously
`spawn' only considered mem size, but this caused issues.
In particular, in the xous implementation of the rust standard
library, there whenever something is allocated it has to first check
an AtomicI32 LOCKED to see if it is 0 or 1, and set it to 1 when it is
allocating so that only one thing is allocating at a time. However,
the mem size for the section containing LOCKED is larger than the file
size, meaning that `spawn' copied more of the file that it should
have. This lead to junk being put into LOCKED, which caused the new
process to assume that something else was perpetually allocating.
Now, `spawn' puts 0's in the space between the end of the file size
and the end of the memsize, which makes everything work as expected.
The only problem remaining is that when an app registers for GAM, GAM
checks whether the app is allowed to register, which is based on what
apps were included in the image. Obviously, this does not work when
you are trying to load apps that are not already in the image
When the user selects App Loader from the app menu, a new menu shows
up that displays the currently loaded apps (in the future this will
contain options to add/remove apps as well). This is a much more sane
approach than whatever I was doing before because it requires minimal
changes to the rest of the source tree (I had to change xtask so that
it would replace -'s with _'s in constant names so that I could name
my app app-loader).