-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DFU source code? #45
Comments
The source code is here: https://github.com/gregdavill/foboot/tree/OrangeCrab If you checkout the repo with all submodules you should be able to build with the following commnds
Eventually I will move/update the source code into a 'orangecrab-dfu' repo under the orangcrab-fpga org. This is what I've done on the butterstick. |
Thanks, appreciated. |
Actually, cloning this fails. One of the submodules don't seem to exist, or isn't public: https://github.com/xobs/lxsocdoc If taking this submodule out, and running the python script, it'll still complain about it missing, alongside a few more, like https://git.llvm.org/git/compiler-rt/ This looks like there's some case of bitrotting here :-/
|
Whoops, looks like the code there is a bit out of date. And there are some repos that were moved by upstream litex. I've just fixed those errors, and I can build locally. Let me know if there is any other issues. |
Something is still amiss here as far as I can tell, almost as if it's missing files in the repository?
|
There seems to be a broken submodule that I'd added but then later removed. It's not currently required since we don't build the LiteX BIOS
We have to do some tricks to avoid building and embedding the standard LiteX BIOS firmware. Instead we want to build our own custom firmware. I missed a step which creates the directory structure for the firmware before it builds. Try the latest commit gregdavill/foboot@ab25c15 |
Were you able to get the bootloader to build? |
No, the toolchain seems to be problematic. It's failing to find basic
libc-style headers like stdint.h or string.h. I am using ubuntu with the
compiler package found there.
…On Thu, Oct 28, 2021 at 6:55 PM Gregory Davill ***@***.***> wrote:
Were you able to get the bootloader to build?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXRXJSHSO3SN7AQAITY3CTUJH5KPANCNFSM5GIOFE3A>
.
|
Interesting. I've not used the built-in riscv-gcc. Is that this package? |
Litex spits out this warning:
It can be avoided with this change: gregdavill/foboot#7 When building with the system compiler on Debian (which is going to be similar to @nicolasnoble's setup on Ubuntu), I get:
I think this is because the compiler doesn't have a libc by default (the 'elf' in riscv64-unknown-elf-gcc). We can specify one with I suspect Greg's build works because the xpack-dev-tools is built with newlib. I hacked around and got an image to build. The first step was adding -specs=picolibc.spec. This then broke linking:
This is because the spec file will include a generic linker script if -T is not defined. This breaks the custom linker script we have, so we can fix that by specifying the linker script with I've made some commits with these fixes. With this I can flash the bitstream to the application area of my OC 85F, and after hitting the button, it enumerates with the new firmware (and I can use it to re-flash too):
|
As adding -specs=picolibc.spec was mentioned: I just built with the same commands under Windows 10 / MSys2 x64, and got |
A better solution IMO to this would be to port over a newer bootloader that I developed for the ButterStick, Which also builds using upstream litex which builds picolibc as one of the build steps. |
You can build picolibc for windows; I haven't tested it recently, but it worked the last time I messed with the build scripts. With that, you'd be able to use --specs=picolibc.specs there as well. |
Hi, what's the status of this? I have the 0.1 board and the following command generated a bitstream that didn't work
|
I've been trying to locate the DFU source code of the orange crab for a while now, without success. Is there a documented, reproducible build of it somewhere so we can instantiate the base bootloader?
The text was updated successfully, but these errors were encountered: