Ceating Boot image for Hello World on Snickerdoodle

Hi all,

I used this link https://dzone.com/articles/create-a-bootbin-program-an-sd-card-and-boot-a-zc7

and followed the steps to create the FSBL.elf, HelloWorld.elf and Harware wrapper file for my snockerdoodle black.

I also created the Boot.bin file using Xilinx SDK 2019.1.

I then transferred the file on my sd card to boot the snickerdoodle and checked the SDK terminal.

I did not get any Hello World msg on it. I also checked the settings of the SDK terminal, everything looks fine.

Kindly help me resolve this problem.

 

@kd_11 can you clarify what you mean by:

I did not get any Hello World msg on it.
?

None of the images in that post are showing on my end… What command are you running? It’s not totally clear what the inputs/outputs are supposed to be.

-RC

Hi Ryan,

I have described the steps below:

I am trying to get hello world message on the terminal once my snickerdoodle boots up.

1)Created a hello world program using the hello world template for xc7z02 platform. Compiled and got the hello.elf file.

2)Created the FSBL program using the template, used the same bsp used for hello world. Compiled and got the FSBL.elf file.

3)Opened vivado 2019.1, configured the PS, added IP, customized the IP to add the UART0 pheripheral, Synthesized and generated the bitstream.

4)Clicked on xilinx in sdk-> create image->

Added the FSBL.elf, hardware wrapper file generated from step 3, and the hello.elf file and clicked on create image.

This gave me the BOOT.bin file.

5)transferred this file on to the SD card.

6)connected the snickerdoodle black to the pc, and configured the SDK terminal for communication.

7)I was expecting the snickerdoodle to boot up and display hello world on the terminal? Am i missing any step? Do i need to type in anything?

@kd_11 it sounds like the only thing you’re making changes to is the boot.bin file, correct? The device tree, etc. are the same?

Per your other post, it sounds like you are trying to create a Linux application to send a message “somewhere” via UART, is that right? How do you have the UART pins defined in Vivado? Like I mentioned, I can’t view the images on the page you linked to, so I’m not sure what the expected behavior is for the “hello world” project…but from the sounds of it I’m guessing it’s written as a bare metal project, which will have a different workflow.

Perhaps an easier place to start would be checking out some of the example projects we have posted on Github:

https://github.com/krtkl/snickerdoodle-examples

https://github.com/krtkl/uio-test-system

Let me know if that’s what you have in mind or if you have any issues stepping through those.

@Ryan Cousins, thank you for your prompt reply.

I will check the links you have shared.

For the hardware file in vivado ,I just added the PS, connected the clock to the AXI clock, double clicked on the PS and selected UART0 pin..did not change anything much..its all default..do i need to change anything here? Like to select the UART pin?

What will be the simplest way to get some msgs on the terminal once the board boots up?

So you’re using the USB console and at the Linux command prompt after logging in? If you’re looking to get your snickerdoodle to “talk” to you, you could throw together a quick python or bash script.

E.g. Python:

$ nano hello-world.py

[Enter the following code]
#!/usr/bin/env python
print "Hello, World!"
[Wite Out, Exit]

$ chmod +x hello-world.py
$ ./hello-world.py

E.g. Bash:

$ nano hello-world.sh

[Enter the following code]
#!/bin/bash
echo 'Hello, World!'
[Wite Out, Exit]

$ chmod +x hello-world.sh
$ ./hello-world.sh

Another great ‘getting started’ resource is the project list Dr. Kaputa at RIT put together—it’s an entire snickerdoodle curriculum of sorts: http://www.ravvenlabs.com/cpet-563.html

Thanks @Ryan Cousins.

The last link that you shared is really helpful. Unfortunately, the topics i am interested has no link that is available..

And my doubts remain unsolved…:frowning:

 

Hi!

A ‘bootbin’ program is the way of starting Zynq-powered board using boot.bin file that built from FSBL template bootloader provided by Xilinx + your bitstream + standalone application either Linux operating system.

In all cases you need all these files to be on the device. Boot.bin doesn’t include them, but it is passing the execution.

You can create your own HelloWorld as a standalone app either as a Linux application. The Linux on board is suitable for the latter, you can drop it and run on bare metal, if you need.

Also, to make first try with bitstream, simply put the *.bit file into /boot folder with a filename specified in uEnv.txt file (by default use system.bit filename)

Moving forward, in order to see how the booting is taking place, just enable symbol FSBL_DEBUG in fsbl project of SDK: Properties -> C/C++ Build / Settings / ARM v7 gcc compiler symbols Add… The output on COM port console will be very informative.

Hello everyone,

I more or less have the above problem. I will quickly detail the steps I’ve taken:

I got an application on Snickerdoodle black, mainly executed in the PL for now.

I generated the bistream, then the post-implementation .xsa, with which I made a platform in Vitis.

(The peripherals I activated on Zynq are: the QSPI, SD0,SD1,SPI0,UART0.)

I also created an application from the templates provided, which tests the peripherals (I will configure an SPI link in the future).

So far so good, I build the platform, fsbl.elf is created, I build the application, the application.elf is created (which I assume is the u-boot.elf mentioned in the manuals), and then I create the boot image. My .bif file has the bootloader fsbl.elf, the .bit file, and the .elf file of the application, all merged into a BOOT.bin. I format the sd card, use win32 disk imager to copy the boot file, put the sd card into J6, power on the snickerdoodle and… drumroll

…nothing happens. No heartbit. But in my BOOT.bin file there is a bitstream. Why is that?

My application is baremetal, the default boot method is the sd, so I am trying to figure out what I’m doing wrong in a rather trivial task.

At this point I am out of inspiration, so please any ideas that could get me going woudl be great!

Cheers,

Zoe

Hi Zoe,

Apologies for the lengthy delay. Were you still wrestling with this or were you able to resolve the bitstream loading issue? We’ve run into some weirdness with the Win32 Disk Imager in the past; it’s very finicky. If you’re still having issues, I’ll see if I can dig up that old post.

-RC

Hello Ryan,

yes, I’ve resolved it. It was due to wrong clock settings in the Zynq IP block.

So, the solution was to copy the .tcl preset file for the Zynq IP from the two vivado examples on krtkl website, and work from there on.

 

 

That’s great, Zoe! Thanks for the update and for sharing your solution here. Feel free to reach out anytime and we’ll be sure to get you a quicker response.