It's been a bit since I worked on this code.
See:
https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-standalone#readme
(Note, the second of the readme talking about
cortexa53-zynqmp/cortexa72-versal/cortexa9-zynq/cortexr5-versal/cortexr5-zynqmp/microblaze*
are obsolete. They don't work and were removed in 2022.1.
The primary usage is to build an external toolchain. The external toolchain can
be used to build baremetal but does NOT include libxil. libxil is tied to the
hardware and is built 'elsewhere'.
The external toolchain is built using:
DISTRO=xilinx-standalone
MACHINE=aarch32-tc
bitbake meta-toolchain
Use the environment file for the correct output and use the matching libxil.a
and it should work.
For the normal usage, there is no internal support for building r5 binaries,
since you need libxil.a and there is no way to generate that in this normal
workflow.
This is the workflow used to build the toolchain that is included with XSCT.
There is an alternative workflow, enabled by removing meta-xilinx-tools and
replacing it with meta-xilinx-standalone-experimental. This workflow starts
with a system device-tree, and will build an experimental version of libxil
(along with the toolchain) in a single config or multiconfig environment.
In this version you need a system device-tree generated with dtg++, and then
follow the steps in the README.md located within
meta-xilinx-standalone-experimental.
On 11/17/22 5:26 PM, Chris Laplante via lists.yoctoproject.org wrote:
We are trying to use the Xilinx-standalone DISTRO to ultimately
compile a baremetal RTOS for the R5 cores in our UltraScale processor.
Sorry, I forgot to mention - we are using honister and Xilinx 2022.1 tools.
Building within the build environment is not supported in 2022, other then
through the alternative flow -- and as the name said it's experimental.
All of the examples I've seen should show using the toolchain from Vivado(XSCT)
or Vitis that is integrated and a matching libxil.a (I'm not sure where that
comes from).
Follow-up. I was able to get it to link by adding --specs=nosys.specs. The full
command then is:
/home/laplante/next_yocto/honister/build/tmp/work/cortexr5-vfpv3d16-xilinx-eabi/exceptions/1.0+gitAUTOINC+6493dcdbb0-r0/recipe-sysroot-native/usr/bin/arm-xilinx-eabi/arm-xilinx-eabi-gcc
-mcpu=cortex-r5 -march=armv7-r+idiv -mfpu=vfpv3-d16 -mfloat-abi=softfp -DARMR5
--sysroot=/home/laplante/next_yocto/honister/build/tmp/work/cortexr5-vfpv3d16-xilinx-eabi/exceptions/1.0+gitAUTOINC+6493dcdbb0-r0/recipe-sysroot
-O2 -pipe -g -feliminate-unused-debug-types
-fmacro-prefix-map=/home/laplante/next_yocto/honister/build/tmp/work/cortexr5-vfpv3d16-xilinx-eabi/exceptions/1.0+gitAUTOINC+6493dcdbb0-r0=/usr/src/debug/exceptions/1.0+gitAUTOINC+6493dcdbb0-r0
-fdebug-prefix-map=/home/laplante/next_yocto/honister/build/tmp/work/cortexr5-vfpv3d16-xilinx-eabi/exceptions/1.0+gitAUTOINC+6493dcdbb0-r0=/usr/src/debug/exceptions/1.0+gitAUTOINC+6493dcdbb0-r0
-fdebug-prefix-map=/home/laplante/next_yocto/honister/build/tmp/work/cortexr5-vfpv3d16-xilinx-eabi/exceptions/1.0+gitAUTOINC+6493dcdbb0-r0/recipe-sysroot=
-fdebug-prefix-map=/home/laplante/next_yocto/honister/build/tmp/work/cortexr5-vfpv3d16-xilinx-eabi/exceptions/1.0+gitAUTOINC+6493dcdbb0-r0/recipe-sysroot-native=
-fdiagnostics-color -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
CMakeFiles/cmTC_c4282.dir/testCCompiler.c.obj -o cmTC_da2e9 --specs=nosys.specs
To make this happen in my recipe, I added this:
EXTRA_OECMAKE:append = " \
-DCMAKE_EXE_LINKER_FLAGS=--specs=nosys.specs \
"
This seems to do the trick, though I haven't run the binaries yet.
I am curious though why this extra step is necessary. Seems like something the
toolchain should do itself?
You have to have libxil.a (which is analogous to libgloss) that describes the
hardware interfaces. Since the interfaces are configurable, there is no default
libxil.a that I am aware of. (Possible one exists, I just don't know of that part.)
All of the work I've done is either building the meta-toolchain to enable that
flow, or using the experimental flow to build multiconfig applications for the
future.
--Mark
Thanks,
Chris
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5091):
https://lists.yoctoproject.org/g/meta-xilinx/message/5091
Mute This Topic: https://lists.yoctoproject.org/mt/95098230/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-