Jump to content
  • 0

Zybo Uboot


M Vignesh

Question

Posted

HI,

I recently purchased zybo kit for development purpose. I am facing issue while debugging the board in JTAG mode. I am using Xilinux SDK-2016 for debugging and followed below steps,

1. Open xmd console in xilinx sdk tool

2. connect arm hw

3. source ps7_init.tcl

4. ps7_init

5. dow uboot.elf

6. con

When i load uboot , it gets hangs up after printing u-boot version.
Can you please guide me on this.
 

5 answers to this question

Recommended Posts

Posted

I second miguel's suggestion. u-boot and linux enable the USB host port, which tends to spike the current consumption above 500 mA when the CPU is also under load (like during the boot process). You should be able to tell if this is the problem if the power good LED flickers a bit. Also, if the FPGA is configured (DONE LED illuminated) it will be reset. 

On that note, I think our u-boot configuration might be trying to reach out to an EEPROM over the I2C controller. If that is the case, you will need to program the bitstream before downloading and running u-boot. Your hardware block diagram will also need to have the I2C bus properly routed over EMIO. See the linux_bd project here for an example of how your block diagram needs to look:

https://github.com/Digilent/ZYBO

 I would recommend starting with that project and making the changes your application needs.

How are you building u-boot.elf?

Posted
On 3/27/2017 at 1:54 PM, miguel_rodrigues said:

Hey there,

 

I had this issue before when I was powering the Zybo via Micro-USB. Powering the Zybo via an external power supply (5V, 3A) using the barrel plug solved the problem :)

 

How are you powering the board?

HI,

      we are using external power supply only.

      

       We want to debug the uboot using Xilinx SDK in jtag mode.

      There are few links which explains debugging vmlinux through SDK and
       we followed up same procedure for debugging uboot but dint help.

       We are using Xilinx SDK-2016.4 installed in windows8 and peta linux
      (2016.4) installed in ubuntu 16.04.

       
      Can you please guide us to debug the uboot through SDK tool(Windows).

     

Posted
On 3/27/2017 at 11:11 PM, sbobrowicz said:

I second miguel's suggestion. u-boot and linux enable the USB host port, which tends to spike the current consumption above 500 mA when the CPU is also under load (like during the boot process). You should be able to tell if this is the problem if the power good LED flickers a bit. Also, if the FPGA is configured (DONE LED illuminated) it will be reset. 

On that note, I think our u-boot configuration might be trying to reach out to an EEPROM over the I2C controller. If that is the case, you will need to program the bitstream before downloading and running u-boot. Your hardware block diagram will also need to have the I2C bus properly routed over EMIO. See the linux_bd project here for an example of how your block diagram needs to look:

https://github.com/Digilent/ZYBO

 I would recommend starting with that project and making the changes your application needs.

How are you building u-boot.elf?

HI,

We are compiling uboot from peta linux(2016.4) in ubuntu 16.04. 

On 3/27/2017 at 11:11 PM, sbobrowicz said:

I second miguel's suggestion. u-boot and linux enable the USB host port, which tends to spike the current consumption above 500 mA when the CPU is also under load (like during the boot process). You should be able to tell if this is the problem if the power good LED flickers a bit. Also, if the FPGA is configured (DONE LED illuminated) it will be reset. 

On that note, I think our u-boot configuration might be trying to reach out to an EEPROM over the I2C controller. If that is the case, you will need to program the bitstream before downloading and running u-boot. Your hardware block diagram will also need to have the I2C bus properly routed over EMIO. See the linux_bd project here for an example of how your block diagram needs to look:

https://github.com/Digilent/ZYBO

 I would recommend starting with that project and making the changes your application needs.

How are you building u-boot.elf?

Hi,

      We are building Peta linux(2016.4) in ubuntu 16.04 version. Using the command "Petalinux_build -c uboot", it generates uboot.bin and uboot.elf files in image directory.

Copy those files to windows 8, using Xilinx sdk tool we load the uboot.elf file to Zybo kit through jtag.

 

      We want to debug the uboot using Xilinx SDK in jtag mode.

      There are few links which explains debugging vmlinux through SDK and
       we followed up same procedure for debugging uboot but dint help.

       We are using Xilinx SDK-2016.4 installed in windows8 and peta linux
      (2016.4) installed in ubuntu 16.04.

       
      Can you please guide us to debug the uboot through SDK tool(Windows).

 

 

Posted

We don't have a guide for doing exactly what you are trying to do, but we still might be able to help here.

I would create a new workspace in Xilinx SDK, and then create a new hardware platform project using the .hdf. You should be able to find the .hdf somewhere in the petalinux directory (sorry, petalinux 2016.4 changed the ENTIRE project structure, so I can't be more specific). Here are the following steps:

  1. click Run --> Debug Configurations
  2. On the left side, create a new "Xilinx C/C++ application (System Debugger)" configuration.
  3. Check that the Bitstream file and initialization file are properly pointing to the correct items in the hardware platform project.
  4. Check all the following boxes: Reset Entire system, Program FPGA, Run ps7_init, run ps7_post_config, Enable Cross Triggering.
  5. Your screen should look similar to the photo attached
  6. Click the apply button.
  7. go to the Application tab
  8. check the Download box for ps7_cortexa9_0
  9. Uncheck "Stop at Program Entry"
  10. Check "Stop at main"
  11. Select your u-boot.elf (not the u-boot.bin) for the Application by clicking "Browse"
  12. Click Apply.
  13. Ensure the Zybo is connected via USB to the computer and powered on. 
  14. Click the Debug button. The PL should be programmed, and u-boot should launch, halted at main. You should then be able to step through code.

Note this method should allow you to see the stack trace, but you will still be stepping through dissassembly. I believe we can figure out how to link in the source to allow proper C-level debugging, but lets try to get this far first.

On another note, how are you configuring the project to target the ZYBO? I assume you imported your .hdf, but are you just using all default settings for the petalinux-config? If so, that is probably your problem. We have put together a petalinux 2015.4 project here: https://github.com/Digilent/petalinux-bsps/tree/master/projects/Digilent-Zybo-Linux-BD-v2015.4 . You might want to check that out and see some of the changes we made (most important of which are to point to our linux and u-boot source repos).

Archived

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

×
×
  • Create New...