I have used the PetaLinux tools to add an application to the system image and built it. I am now attempting to add it into the bitstream file so that I can program it into my FPGA.
I am using a Trenz electronic TE0841 with an XCKU040. I have not made any changes to the reference design code yet so I'm just using the prebuilt bitstream file provided by Trenz. I have only added a small application in PetaLinux.
I have been following UG1144 as closely as I can.
First I created a project with
petalinux-create --type project --template microblaze --name <PROJECT_NAME>
Then I imported the HW configuration supplied by Trenz Electronic in the prebuilt directory of their reference design
petalinux-config --get-hw-description <PATH-TO_XSA>
I found that petalinux-package would fail when I got to that step due to the partition layout. So while in the configuration menu, I modified the partition table to fit the various components based on the error output of petalinux-package. Then I save the configuration.
I created and enabled an application and then added my code to it
petalinux-create -t apps --name <APP-NAME> --enable
Then I built the system image
petalinux-build
That populated the images/linux directory with the various build outputs.
Finally, I tried to add the system image to the bitstream supplied by Trenz Electronic with the petalinux-package command
petalinux-package --boot --flash-size 64 --flash-intf SPIx4 --fpga /home/kyle/petalinux/bsps/test_board_02_40_1i_2gb.bit --u-boot --kernel
And this is the output I get
kyle@DESKTOP-U0P8IUP:~/petalinux/projects/plnx-rad-test$ petalinux-package --boot --flash-size 64 --flash-intf SPIx4 --fpga /home/kyle/petalinux/bsps/test_board_02_40_1i_2gb.bit --u-boot --kernel [INFO] Sourcing buildtools WARNING: Auto detecting MMI file with XSA INFO: Creating download.bit... INFO: Fpga bitstream: /home/kyle/petalinux/bsps/test_board_02_40_1i_2gb.bit INFO: Fpga bitstream MMI file: /tmp/tmp.a5s1iUmgk8/test_board_02_40_1i_2gb.mmi INFO: Fsbl file: /home/kyle/petalinux/projects/plnx-rad-test/images/linux/fs-boot.elf INFO: Output download.bit: /home/kyle/petalinux/projects/plnx-rad-test/images/linux/download.bit INFO: Getting system flash information... WARNING: Failed to detect SPI width from bitstream. WARNING: Using default one: SPIx1. WARNING: User specified Flash interface SPIx4 is different to the auto detected one SPIx1. Will use the user specified one. INFO: Add bitstream "/home/kyle/petalinux/projects/plnx-rad-test/images/linux/download.bit" to 0. INFO: Add datafile "/home/kyle/petalinux/projects/plnx-rad-test/images/linux/u-boot-s.bin" to 0x640000. INFO: Add datafile "/home/kyle/petalinux/projects/plnx-rad-test/images/linux/image.ub" to 0x720000. INFO: Add datafile "/home/kyle/petalinux/projects/plnx-rad-test/images/linux/boot.scr" to 0x1f00000. INFO: Generating MCS file... ERROR: [Bitstream 40-51] Unsupported part xcku040-sfva784-1-i in bitfile /home/kyle/petalinux/projects/plnx-rad-test/images/linux/download.bit. ERROR: [Writecfgmem 68-7] Could not load bitfile /home/kyle/petalinux/projects/plnx-rad-test/images/linux/download.bit. #----------------------------------------------------------- # Vivado v2021.2 (64-bit) # SW Build 3367213 on Tue Oct 19 02:47:39 MDT 2021 # IP Build 3369179 on Thu Oct 21 08:25:16 MDT 2021 # Start of session at: Fri Oct 20 08:29:00 2023 # Process ID: 107470 # Current directory: /home/kyle/petalinux/projects/plnx-rad-test/build/package-boot # Command line: vivado -log /home/kyle/petalinux/projects/plnx-rad-test/build/package-boot//cfgmem.log -jou /home/kyle/petalinux/projects/plnx-rad-test/build/package-boot//cfgmem.jou -mode batch -s /home/kyle/petalinux/projects/plnx-rad-test/build/package-boot//write_cfgmem_hsm.tcl # Log file: /home/kyle/petalinux/projects/plnx-rad-test/build/package-boot//cfgmem.log # Journal file: /home/kyle/petalinux/projects/plnx-rad-test/build/package-boot//cfgmem.jou # Running On: DESKTOP-U0P8IUP, OS: Linux, CPU Frequency: 2687.999 MHz, CPU Physical cores: 10, Host memory: 16634 MB #----------------------------------------------------------- source /home/kyle/petalinux/projects/plnx-rad-test/build/package-boot//write_cfgmem_hsm.tcl # write_cfgmem -force -format MCS -size 64 -interface SPIx4 -loadbit " up 0 /home/kyle/petalinux/projects/plnx-rad-test/images/linux/download.bit" -loaddata " up 0x640000 /home/kyle/petalinux/projects/plnx-rad-test/images/linux/u-boot-s.bin up 0x720000 /home/kyle/petalinux/projects/plnx-rad-test/images/linux/image.ub up 0x1f00000 /home/kyle/petalinux/projects/plnx-rad-test/images/linux/boot.scr" /home/kyle/petalinux/projects/plnx-rad-test/images/linux/boot.mcs Command: write_cfgmem -force -format MCS -size 64 -interface SPIx4 -loadbit { up 0 /home/kyle/petalinux/projects/plnx-rad-test/images/linux/download.bit} -loaddata { up 0x640000 /home/kyle/petalinux/projects/plnx-rad-test/images/linux/u-boot-s.bin up 0x720000 /home/kyle/petalinux/projects/plnx-rad-test/images/linux/image.ub up 0x1f00000 /home/kyle/petalinux/projects/plnx-rad-test/images/linux/boot.scr} /home/kyle/petalinux/projects/plnx-rad-test/images/linux/boot.mcs Creating config memory files... Creating bitstream load up from address 0x00000000 Loading bitfile /home/kyle/petalinux/projects/plnx-rad-test/images/linux/download.bit ERROR: [Bitstream 40-51] Unsupported part xcku040-sfva784-1-i in bitfile /home/kyle/petalinux/projects/plnx-rad-test/images/linux/download.bit. ERROR: [Writecfgmem 68-7] Could not load bitfile /home/kyle/petalinux/projects/plnx-rad-test/images/linux/download.bit. 0 Infos, 0 Warnings, 0 Critical Warnings and 2 Errors encountered. write_cfgmem failed ERROR: [Common 17-39] 'write_cfgmem' failed due to earlier errors. while executing "write_cfgmem -force -format MCS -size 64 -interface SPIx4 -loadbit " up 0 /home/kyle/petalinux/projects/plnx-rad-test/images/linux/download.bit" -load..." (file "/home/kyle/petalinux/projects/plnx-rad-test/build/package-boot//write_cfgmem_hsm.tcl" line 1) INFO: [Common 17-206] Exiting Vivado at Fri Oct 20 08:29:06 2023... ERROR: Failed to run Vivado write_cfgmem command. What does "Unsupported part xcku040-sfva784-1-i in bitfile" mean? How can I debug this further?
Some more information about my workflow:
I have followed the same procedure using the 02_35_2i_2gb prebuilt images and the petalinux-package command will then complete without an error. I do not have a KU035 board to test if it successfully inserted my petalinux build and application into the bitstream. But in any case, I do not receive the error that I do when trying to use the KU040.
The reference design project was created in Vivado on Windows. It is my understanding that PetaLinux will not run on Windows. So I have created a WSL instance of Ubuntu 18.04 (later versions seem to be incompatible with PetaLinux). I have installed Vivado into my WSL instance and am running the petalinux-package command from inside WSL where the PetaLinux tools are installed.
Is moving between operating systems causing an issue?
Edit:
It does seem to be a difference in the operating systems.
Up to this point, I've just been using mainly the command line tools. I decided to try to open the Vivado GUI from within WSL to check that the eval Enterprise license was recognized (it is). And I received the following error:

Expanding the list, there are no KU040 parts recognized:

However, this project opened without an issue in Vivado on Windows. Not sure why the Linux install and the Windows install would be different. But how do I update the list of parts that Vivado recognizes? I've searched around but clear I'm not using the right words in Google to find the answer.
1Related questions 2 How to locate the issue with the following error message from petalinux boot command? 0 enable to program FPGA 0 How to debug Linux crash on startup (PetaLinux 2020.1) Related questions 2 How to locate the issue with the following error message from petalinux boot command? 0 enable to program FPGA 0 How to debug Linux crash on startup (PetaLinux 2020.1) 1 FPGA PCIe endpoint prevents the host from rebooting Load 1 more related questions Show fewer related questions
Reset to default