-
Notifications
You must be signed in to change notification settings - Fork 9
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
Ultra96-v2: Add a new community support board #1
Comments
Thanks @pimartos, as pointed out at https://discourse.ros.org/t/announcing-the-hardware-acceleration-wg-meeting-1/20826/6?u=vmayoral, it should be fairly easy and consist basically on creating the firmware artifacts required for the new board and organizing them in a structured manner so that the hooks we've created for the ROS 2 meta build system and meta build tools pick the board automatically. This way, it'll become transparent and seamless to anyone willing to re-use this or any other board (while we ensure a somewhat organized extensibility) It'll take a few weeks but expect me to push to the community README instructions on how to include new boards. |
Hi, regards, |
Ultra96-v2
: Add a new community support board
Ultra96-v2
: Add a new community support board
@pimartos to follow up on this, instructions to proceed with the port is somewhat reflected in ros-infrastructure/rep#324. An example firmware repo is available at https://github.com/ros-acceleration/acceleration_firmware_kv260. I'm pushing this back to you. Feel free to launch questions in here if you have any specific ones. |
Hi, |
That's right! |
Ok, my path should be
|
@pimartos that's an awesome first list. Thanks for puting it together. So that it can be translated to others, my recommendation for the official adding new boards to HAWG should be as follows:
Aligned to this, regarding your suggested path above:
I not done already, I would really encourage you to review REP-2008 PR, familiarize with it and send feedback. I think installing KRS and playing a bit with the examples with it will indeed help you familiarize with the architecture. Note you can launch some examples using emulation targets, so no real need for the KV260 hardware to evaluate this.
Yeap, correct.
Correct.
This last step is not needed. Instead, I think we could simply submit a PR to ros-acceleration/community to add your board to the community, with the corresponding support level according to REP-2008. Let me know if you need further clarifications @pimartos. |
Hello @pimartos , |
Hi, Regards, |
I suspect that the problem is that I don't have kv260 bsp files installed; I downloaded it from xilinx, but I am not able to install it using petalinux-upgrade best regards, |
@pimartos it indeed seems like you are not installing kv260 files appropriately. Can you confirm you're following the 6 steps at https://xilinx.github.io/KRS/sphinx/build/html/docs/install.html appropriately? I uploaded a video to help navigate the process, have a look. Also, to debug your setup, inspect the following: colcon acceleration list # this should list the deployed firmware resources
# you should see at least 'kv260' listed Also, manually, have a look at the following directory Note the process of installing (https://xilinx.github.io/KRS/sphinx/build/html/docs/install.html) and running a first example (https://xilinx.github.io/KRS/sphinx/build/html/docs/examples/1_hello_xilinx.html) are detailed in KRS documentation. |
No need to use PetaLinux for evaluating KV260 (though you'll will need to rely on it for building the firmware files of Ultra96v2, but with its corresponding BSP). I specifically pushed for abstracting Yocto/PetaLinux aspects from the user.
Not sure what you mean by this, as pointed out above. You don't need to use anything else but KRS's instructions for getting up to speed. PetaLinux BSP for KV260 is already abstracted within https://github.com/ros-acceleration/acceleration_firmware_kv260. It's made this way so that embedded expertise is avoided in the process. |
Hi @vmayoral colcon build --build-base=build-kv260 --install-base=install-kv260 --merge-install --mixin kv260 --packages-select ament_vitis vadd_publisher I get the mentioned output |
From what you've shared @pimartos, it seems cross-compilation is failing because it doesn't find the right resources (this one hints about missing ones in the sysroot). This, again, goes back to firmware not properly deployed. I experienced issues like those in the past while developing, when firmware wasn't properly installed. Xilinx/KRS#10 confirmed a few hours ago that he built successfully with the latest changes. My recommendation will be to start over with the instructions. Clean up the workspace and start over. There's probably something wrong in your ROS 2 workspace and firmware deployment. So that the experience is useful for debugging, can you do it while |
@vmayoral finally I solved it; I was using vitis 2021.1 (because I wanted to try vitis AI), I installed vitis 2020.2 and the first example compiled. When I tried to generate the sdcard (just to check that it is possible), the sd_card.img file was generated, but I had this message:
Should I discard it? UPDATE: |
@vmayoral With the spanish "Unidades" in .py scripts, Now I can build sd_card-img for Hello Xilinx, but when I try to run in the emulator with $ colcon acceleration emulation sw_emu install-kv260 SECURITY WARNING: This class invokes explicitly a shell via the shell=True argument of the Python subprocess library, and uses admin privileges to manage raw disk images. It is the user's responsibility to ensure that all whitespace and metacharacters passed are quoted appropriately to avoid shell injection vulnerabilities.
- Verified that install/ is available in the current ROS 2 workspace
- Confirmed availability of raw image file at: /home/usuario/krs_ws/acceleration/firmware/select/sd_card.img
- Finished inspecting raw image, obtained UNITS and STARTSECTOR P1/P2
- Image mounted successfully at: /tmp/sdcard_img_p2
- Successfully cleaned up prior overlay ROS 2 workspace at: /tmp/sdcard_img_p2/ros2_ws
- Copied 'install-kv260' directory as a ROS 2 overlay workspace in the raw image.
- Umounted the raw image.
- Generated PMU and QEMU files.
- Launching emulation...
cd /home/usuario/krs_ws/acceleration/firmware/select/emulation && /tools/Xilinx/Vitis/2020.2/bin/launch_emulator -device-family ultrascale -target sw_emu -qemu-args-file /home/usuario/krs_ws/acceleration/firmware/select/emulation/qemu_args.txt -pmc-args-file /home/usuario/krs_ws/acceleration/firmware/select/emulation/pmu_args.txt -sd-card-image /home/usuario/krs_ws/acceleration/firmware/select/sd_card.img -enable-prep-target $*
Running SW Emulation
INFO : [LAUNCH_EMULATOR] pl_sim_dir option is not provided.
Starting QEMU
- Press <Ctrl-a h> for help
Waiting for QEMU to start. qemu_port 9194
Qemu_pids 87327 87328
qemu-system-aarch64: -chardev socket,path=./qemu-rport-_pmu@0,server,id=pmu-apu-rp: info: QEMU waiting for connection on: disconnected:unix:./qemu-rport-_pmu@0,server
QEMU started. qemu_pid=87327.
Waiting for PMU to start. Qemu_pids 87331 87332
qemu-system-aarch64: -chardev socket,id=pl-rp,host=127.0.0.1,port=7495,server: info: QEMU waiting for connection on: disconnected:tcp:127.0.0.1:7495,server
PMC started. pmc_pid=87331
Starting PL simulation.Generating PLLauncher commandline
running PLL Launcher
qemu-system-aarch64: Could not set up host forwarding rule 'tcp:127.0.0.1:2222-10.0.2.15:22'
qemu-system-microblazeel: /pmu@0: Disconnected clk=3915984112 ns
[LAUNCH_EMULATOR] INFO: 22:41:43 : PMU/PMC-QEMU exited
[LAUNCH_EMULATOR] INFO: 22:41:45 : PS-QEMU exited
[LAUNCH_EMULATOR] INFO: 22:41:45 : PMU/PMC-QEMU exited
[LAUNCH_EMULATOR] INFO: 22:41:45 : Trying to kill PLLauncher forcefully because QEMU exited
[LAUNCH_EMULATOR] INFO: 22:41:45 : PLLauncher exited by force
Please refer PS /simulate logs at /home/usuario/krs_ws/acceleration/firmware/kv260/emulation for more details.
DONE!
INFO: Emulation ran successfully
Finalized successfully. How can I solve this error? UPDATE: It was a qemu issue, it was working as daemon since I was working with a bad image because the spanish "Unidades" issue, killed and restarted and I was able to run Hello Xilinx in emulated mode, so if something goes bad with qemu, is necessary to kill the process... |
@pimartos, glad to see the progress! Thanks for the updates and for answering your hurdles, that helps a lot future users. I took the liberty of slightly editing your comments using Markdown syntax. Feel free to have a look at it, it may help the readibility of future queries. Regarding:
Shame on me for not having considered this given that I'm from Spain! This is coded in the This is a good first contribution. @pimartos would you like to make the changes yourself and submit a Pull Request? |
OK, I will do it :-D |
@pimartos I took a look at https://github.com/ros-acceleration-ultra96v2 in search for updates regarding this effort. Do you think you could join us this Wednesday at the HAWG meeting and give a short update? If not, could you share with in here some notes so that I discuss it with the rest of the group? |
Yes. From |
Ok, I will upgrade to 2021.2 and start over to build the platform. =) |
Hi! Which are the most suitable I am trying with Any suggestion? Thanks! |
For new development I'm using
Yeah, that's very annoying and I experienced the same myself. There's no easy fix for this AFAIK and seems related to BSP changes introduced while releasing Vitis 2021.2. You can ignore the Regarding the change you link above, that's because the bitbake version released is old. You can either go back in the commit history to that point (or one that allows the bitbake version to build the recipes), or update simply update bitbake to a more modern version. I'm going for the latter: cd /home/xilinx/xilinx-k26-som-2021.2/components/yocto/layers/core/; mv bitbake bitbake_old
git clone https://github.com/openembedded/bitbake -b 1.50 |
Yes, you are right, I was able to compile an image yesterday. I took the path of going back in history 😄 I documented the procedure in hackster using Kria board for those interested. Thanks! |
Thanks for pinging about this @jwdinius. AFAIK @pimartos stopped his contributions due to personal reasons. He might get back to it once available again, but there's no certainty.
This is great, thanks. I've been trying to secure sponsorship for this, so that the firmware is maintained and well supported over time. That requires users asking for it (which we have 😄 ) and someone/some-organization willing to sponsor the engineering work and maintain it over-time. If you can work out the artifacts, count on me for helping shape it up. I've added this topic to the agenda for tomorrow. Let's have a quick discussion about it and define next steps. |
Hi @vmayoral and @jwdinius |
Good to have you back @pimartos! Yeah, I don't think there will be an official image. AVNET will need to pay Canonical to support Ubuntu officially and these contracts are pretty expensive. AVNET doesn't seem too interested in sponsoring development on their side (otherwise they'd have reacted in here when I first pinged them) but we shouldn't loose faith completely neither. In yesterday's meeting @jwdinius and @jlamperez offered to help @pimartos. Do you think you three could coordinate yourselves and try to push firmward a first official release at https://github.com/ros-acceleration/acceleration_firmware_ultra96v2? I've given you three privileges there. |
Hi all, I would like to contribute to this effort as well for the Ultra96V2! I currently have a dedicated build machine and have Petalinux 2021.2 and Vitis 2021.2 installed. Is there a ROS2 version that everyone has synched up on yet? |
I will be using |
Hi @jwdinius and @jlamperez: happy to have help with this =) I think that with the combined effort, this will be possible. About what version of ROS2 to use: Currently I am working with foxy, but I could change if we agree that would be better to use other version :-) |
@pimartos would like to help with the ultra96, but I do not see any in stock anywhere :( |
Seems like there is renewed interest in this now. To jump start collaboration on this, I propose we move further discussion to a slack or discord channel. @vmayoral does the working group have a discord or slack space we could create an |
@dirksavage88: that's are bad news. Maybe a used one? |
Good to see excitement in here! My suggestion would be to stick to only one channel for the life HAWG discussions. Don't really mind which one, but I think it's important so that we don't spread the information too much and it's easy for others to learn/engage/contribute. I proposed a while ago a Matrix channel (a security-conscious alternative to Slack, Discord and the sort). Matrix is used in the ROS 2 Security and Real-Time Working Groups as well. From the README:
|
Hi all,
My preference would be to maintain the key points on this thread, simply because it’s easy to access, but I am open to migrating the conversation somewhere else if we agree that it would provide more utility. I am hoping that we will converge on “a recipe” for a basic hardware acceleration design targeting Ultra96 that can then be used as the starting point for building up various use-cases.
Best Regards, Robert(Bob) Anderson
From: Víctor Mayoral Vilches ***@***.***>
Sent: Monday, April 4, 2022 4:21 AM
To: ros-acceleration/community ***@***.***>
Cc: Robert Anderson ***@***.***>; Mention ***@***.***>
Subject: Re: [ros-acceleration/community] Ultra96-v2: Add a new community support board (#1)
Good to see excitement in here!
My suggestion would be to stick to only one channel for the life HAWG discussions. Don't really mind which one, but I think it's important so that we don't spread the information too much and it's easy for others to learn/engage/contribute. I proposed a while ago a Matrix channel<https://matrix.to/#/+hawg:matrix.org> (a security-conscious alternative to Slack, Discord and the sort). Matrix is used in the ROS 2 Security and Real-Time Working Groups as well.
From the README:
Communication Channels
* Instant messaging: Matrix community<https://matrix.to/#/+hawg:matrix.org> (Matrix is an open network for secure, decentralized communication).
* Meeting invite group: Meeting invite group<https://groups.google.com/g/ros-2-hardware-acceleration-wg>
* Github organization: ros-acceleration<https://github.com/ros-acceleration>
* Discourse tag: wg-acceleration<https://discourse.ros.org/tag/wg-acceleration>
—
Reply to this email directly, view it on GitHub<#1 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACHQ3A6N63U3KRSBNPQH6O3VDLGCHANCNFSM46KKJKUQ>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Keeping key points in this thread is a good idea. For troubleshooting and collaborating on building the artifacts for the board, an IM client is the best way to go. I already think the thread regarding this issue is too cluttered and not easy to index when I try to find relevant and/or helpful information. I posted a message in the Matrix chatroom. It looks like Element is an app that provides an interface for mobile clients, for whoever is interested. I plan on checking in with the Matrix chat daily and will post build steps, questions, etc... when it is pertinent to do so. |
Hi @jwdinius |
@pimartos I'm using it in the browser. The link from @jwdinius above works fine. You can try and use this other one if you prefer. Room's not empty, you should see some comments already there. Chat history is enabled. |
|
Hi @vmayoral
I will test the other examples, If you have a clue about why Regards |
This is fantastic @pimartos 👍, very well done! I answerd your questions at #29 and catching up with other open threads. I'll find some time to give that a try and report if I encounter any hurdles. |
Managed to book some time and confirm the validity of @pimartos's work 👍1! I think this finalizes this ticket and successfully closes the first community port. Very well done @pimartos. I'll be bringing this success to the attention of the whole group tomorrow and encourage others to test it out and report back feedback if any. Closing this ticket. Footnotes
|
Hi,
I would like to add the ultra96-v2 board to the list of community supported boards because it's popular, so more people could contribute to the ROS 2 HAWG
regards,
Pedro
The text was updated successfully, but these errors were encountered: