Jump to content
  • 0

Basic Bare metal application not loading on Zybo


Axe

Question

Hi,

I'm trying to get a basic led glowing project up using a bare metal application. After I downloading the bit stream and  the .elf file, I'm not seeing any change on the board. Even the uart terminal is blank, even though connection is there. The board jumpers are set to jtag mode! I'm sure there is a pretty simple reason as to what I'm not doing right! But I'm not able to put my finger on it! Can someone please explain! I have attached snapshot of my Vivado block design and  the c code. after dumping the .elf file on the board

bd.PNG

sdk.PNG

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

Hey Axe,

There may be a quick solution that jumps out from those screen shots, but it's not readily apparent to me. Can you provide a link to the specific project you are following? If I can create the project or recreate the issue you are having hopefully we can find you a solution quickly.

-Nate

Link to comment
Share on other sites

7 minutes ago, NAEastland said:

Hey Axe,

There may be a quick solution that jumps out from those screen shots, but it's not readily apparent to me. Can you provide a link to the specific project you are following? If I can create the project or recreate the issue you are having hopefully we can find you a solution quickly.

-Nate

Sure, Here's the link:

http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2434

Advanced Embedded systems Lab folder, Lab1 is what I tried to do. 

Link to comment
Share on other sites

20 hours ago, NAEastland said:

Hey Axe,

There may be a quick solution that jumps out from those screen shots, but it's not readily apparent to me. Can you provide a link to the specific project you are following? If I can create the project or recreate the issue you are having hopefully we can find you a solution quickly.

-Nate

Hey Were you able to reproduce the issue? Or did you figure out why I'm not getting leds to light up?

Link to comment
Share on other sites

Hey Axe,

The "quick fix" for your led problem is that you aren't specifying that they are outputs before you write to them. Place this line after your XGpio_initialize call.

 XGpio_SetDataDirection(&led, 1, 0x00);

I don't know why your UART isn't working. Are you sure you are successfully programming the FPGA before you program yourself?  When I just built this project it worked. Another check would be to see if the RX light flicks on at the start of your program when you expect UART transmissions.

Your UART terminal should be set to a 115200 baud rate.

Hope this helps,

Sam

Link to comment
Share on other sites

Hi Axe,

I did the lab1 and I was able to get the uart comunnication and the btn(BTN3 on the zybo) to light up LD4 by following the lab1. Make sure to have the serial termial set up like on the screen shot below. I used Tera Term. Initially I was not able to get the switches to light up the corresponding leds but if all switches were on the program ended. I added two lines to set direction on the switches and leds and it worked. I have included a zipped project along with the lab1.c. Hope this helps!

cheers,

Jon

Lab1.zip

lab1.c

serial_esc.jpg

Link to comment
Share on other sites

Hi Jon and Sam, 

My problem has something to do specifically with UART. The same code works on a different ZYBO board. With the faulty board, when I run the program, it doesn't terminate, like how it does for the other board.  To show what I mean, the working board, the program terminates and terminate button goes off. In the board which I'm trying to figure out, the program doesn't terminate at all. Even though it is the same program and I repeat the same steps. I have attached snapshots for both.  

 

working.PNG

not_working.PNG

Link to comment
Share on other sites

Hey,

A quick test to see if your UART is connected properly or if there is a fault is to send a signal from your computer and see if the Tx led is lighting up at all.

I don't think that is the main problem though as it looks like your program isn't even executing. A couple thoughts....

- Can you press the stop button? I have a feeling you will get a telling error message.

- Can you debug the program? If so try to find where it is stuck at

Ill check back here to see if we cant figure this out before declaring the board's JTAG dead.

-Sam

Link to comment
Share on other sites

Hi Sam,

Tx LED is not lighting up. 

Yes It does show an error when I press the stop button 

Even a simple hello world application is not running. How do I debug?

Also, I tested it on another Zybo board, it is not coming up on that board either. So there is definitely something wrong in my project settings. 1 thing I changed now was, I set the Bank 1 voltage settings to 1.8V. It was 3.3V earlier. Also my Zybo boards are Rev B boards. Is it because this is an old version that I 'm facing some problem? I have no idea. 

Link to comment
Share on other sites

Hi Sam,

I tried the getting started with Zybo demo on Digilent website. The leds seem to work and so does UART. I compared the Zynq configuration in this project with my project. The DDR settings are different. Not sure if that's the reason,my project does not work. But we can rule out that UART is faulty. 

Link to comment
Share on other sites

That is very interesting that the DDR settings are different. Do you know which settings have changed? Some of them make larger differences than others. I also don't know why this would make one board work and another not work. A DDR problem would explain why your program isn't running correctly and I would definitely focus my attention there.

Maybe flip through and find the differences in the DDR and maybe we can figure out what is going on.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...