[Buildroot] Bare metal toolchain support?
alvaro.gamez at hazent.com
Fri Nov 25 07:54:31 UTC 2016
2016-11-24 21:41 GMT+01:00 Arnout Vandecappelle <arnout at mind.be>:
> I haven't followed this in detail, but is there any reason why
> CC="$(TARGET_CC) -ffreestanding" doesn't work?
In the end I've managed to get this thing to build and it's working now on
The reason why that won't work with this codebase is because the BSP over
bootloader is built requires some newlib files. Specifically, it requires
the set of crt*.S files,
which seem to have been semi-split from newlib into libgloss.
I've copied files from here and patched crtinit.S to add __init and __fini
I also found this document
which helped me create a Xilinx.spec file to pass over to gcc
In the end it's been an almost 18 hours journey that has been fruitful:
lots of things I didn't know and I've managed to do what I needed: bulding
applications for microblaze using buildroot.
However, I don't know if I can generalize this work to improve buildroot
and make this
available for anyone. Should newlib exist as a package for buildroot? Maybe
I don't mind working on this, but I'd need some guidance, as I don't have
yet. What could be a nice starting point?
I see on the list there was a patch from March "toolchain: add support for
the newlib library"
but as far as I know it hasn't been comitted. Maybe improving that patch to
fix the issues
it had could be the first step.
Álvaro Gámez Machado
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the buildroot