cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rdemara
Adventurer
Adventurer
6,037 Views
Registered: ‎05-29-2015

Microblaze and ARM - together, forever?

Jump to solution

I have a design where we will use a microblaze processor and the ARM core of the zynq together. The microblaze, running bare-metal C, implements a control algorithm that interacts with some custom PL IP and external ADC/DAC and the ARM core will run some diagnostics and high level networking components in Linux. There will be minimal interaction between the microblaze and Linux side, mainly a shared BRAM interface for low-rate register data, maybe some DMA transactions for debugging if we get ambitious. My understanding is that somehow I should be able to package the bit file and microblaze elf file together, then have the FSBL load the packaged bit file/elf file and then execute uBoot for the Linux side. I understand how to package everything together for a straight Linux project, as I've done this numerous times w/o issue - ie: generate FSBL in SDK -> Move it to Petalinux -> Generate BOOT.bin and uImage, etc. What I don't understand is how to go about packaging the bit file and the microblaze elf file so the FSBL can automatically load them upon power on. Ideally the packaged file (bit-file and elf file) would look just like a regular bit file with some extra info for microblaze and be completely transparent to the petalinux process.

 

Is it as simple as generating a bit file, running another command to package the micorblaze and bit file together, then passing that output file to petalinux? Does any of this make sense? Does anything ever make sense? What's the meaning of life?

 

0 Kudos
1 Solution

Accepted Solutions
rdemara
Adventurer
Adventurer
10,727 Views
Registered: ‎05-29-2015

I figured it out. Using the command in my previous message will automatically combine my Vivado bit file and generated microblaze elf file into a new bit file. I use this new bit file with the petalinux-package command to create a new BOOT.bin. I now have a PS Linux OS and PL microblaze bare-metal coexisting and talking to each other via BRAM. Thanks for the help!

View solution in original post

0 Kudos
3 Replies
austin
Scholar
Scholar
6,016 Views
Registered: ‎02-27-2008

r,

 

Ah yes, grasshopper, what is it all about?

 

The FSBL contains the information for the processor system, and also the bitstream built for the programmable logic.  So in any project (Vivado SDK), creating the FSBL means everything you put there (processors, peripherals, code images, logic, IP cores, etc.), is going to be loaded, and launched.

 

The MicroBlaze programs are usually placed in BRAM's whose contents are in the bitstream, hence in the FSBL.

 

The answer, by the way, is 42.

Austin Lesea
Principal Engineer
Xilinx San Jose
rdemara
Adventurer
Adventurer
6,004 Views
Registered: ‎05-29-2015

@austin

 

Understood. Looking at the "Vivado SDK" output I see a particular command printed when I click "Program FPGA" via "Xilinx Tools":

 

updatemem -force -meminfo design_1_wrapper.mmi -bit design_1_wrapper.bit -data testUB.elf -proc design_1_i/microblaze_0 -out download.bit

 

I presume this is the command that actually initializes the BRAMs with the ELF file, and combines it with the bit file. I suppose I can manually run this command when I have uB software changes. Is this correct? Thanks for the reply!

 

P.S.

I'm glad you suggested 42, I really thought the answer was 17!

0 Kudos
rdemara
Adventurer
Adventurer
10,728 Views
Registered: ‎05-29-2015

I figured it out. Using the command in my previous message will automatically combine my Vivado bit file and generated microblaze elf file into a new bit file. I use this new bit file with the petalinux-package command to create a new BOOT.bin. I now have a PS Linux OS and PL microblaze bare-metal coexisting and talking to each other via BRAM. Thanks for the help!

View solution in original post

0 Kudos