cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
4,284 Views
Registered: ‎05-16-2014

SDK Debugger Not Stopping at MAIN for ZYBO board

Jump to solution

I have a simple program I am trying to SDK (2016) debug on the ZYBO Zynq board. Program loads and runs fine. But when I try to debug it the debugger always says running. It won't stop at MAIN. The configure file has the box checked for "stop at main." I even have a breakpoint at "main."

 

Anyone know what's wrong?

 

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
6,210 Views
Registered: ‎05-16-2014

When one is making the system one has to make sure the IP instantiated is setup correctly. The Zync parameters had to be changed to meet my board specs.

 

Thanks all for your suggestions.

View solution in original post

0 Kudos
9 Replies
Highlighted
Moderator
Moderator
4,268 Views
Registered: ‎11-09-2015

Hi @swimteam,

 

Are you using system debugger (or GDB)? If not please use system debugger which is a Xilinx tool.

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Highlighted
Explorer
Explorer
4,264 Views
Registered: ‎05-16-2014

System debugger. I read the SDK manual and it said they were not going to support GDB so I stay away from that.

 

Every time I run the debugger it always says "running." When I suspend is always goes to a endless loop. The 'C' code is small. Simply a counter that outputs to the 4 leds. Called blinky which I found on the Internet. Program runs fine.

 

If I check the box to have is stop at program entry, that works. It stops at the vector table.

0 Kudos
Highlighted
Moderator
Moderator
4,227 Views
Registered: ‎11-09-2015

Hi @swimteam,

 

Is the board connected to your local machine or are you using a HW server? Sometime I get the same issue with the HW server so I use the board directly on my machine.

 

Are you using windows or linux?

 

Which Vivado/SDK version are you using?

 

Make sure you didn't enable any code optimizations in the debug code

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Highlighted
Explorer
Explorer
4,007 Views
Registered: ‎05-16-2014

My computer - ZBook 15

Windows 7

Vivado/SDK 2016.4

 

When I RUN the code it works. When I DEBUG the code it just says (running). But my code is NOT running.

Don't know what is running.. However, when I do a suspend the assembly shows a 3 line loop at address

0x00000008.

 

It appears the SDK debugger cannot even get past it';s own initialization stage.

 

Here is my entire code:

 

/* Borrowed from ZynqBook Tutorials */

/* Include Files */
#include "xparameters.h"
#include "xgpio.h"
#include "xstatus.h"
#include "xil_printf.h"

/* Definitions */
#define GPIO_DEVICE_ID XPAR_AXI_GPIO_0_DEVICE_ID /* GPIO device that LEDs are connected to */
#define LED 0x03 /* Initial LED value - 00XX */
#define LED_DELAY 70000000 /* Software delay length */
#define LED_CHANNEL 1 /* GPIO port for LEDs */
#define printf xil_printf /* smaller, optimized printf */

 

XGpio Gpio; /* GPIO Device driver instance */

 

/* Main function. */
int main( void ){

int Status;

/* Execute the LED output. */
Status = LEDOutputExample();
if (Status != XST_SUCCESS) {
xil_printf("GPIO output to the LEDs failed!\r\n");
}

return 0;
}

 

 

int LEDOutputExample(void)
{

volatile int Delay;
int Status;
int led = LED; /* Hold current LED value. Initialize to LED definition */
int count = 0;

 

/* GPIO driver initialization */
Status = XGpio_Initialize(&Gpio, GPIO_DEVICE_ID);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}

 

/*Set the direction for the LEDs to output. */
XGpio_SetDataDirection(&Gpio, LED_CHANNEL, 0x00);

 

/* Loop forever blinking the LED. */
while (1) {
/* Write output to the LEDs. */
XGpio_DiscreteWrite(&Gpio, LED_CHANNEL, led);

++count;
led = count & 0x03;

/* Wait a small amount of time so that the LED blinking is visible. */
for (Delay = 0; Delay < LED_DELAY; Delay++);
}

 

return XST_SUCCESS; /* Ideally unreachable */
}

 

Digilent ZYBO Zynq 7010 board.

 

 

0 Kudos
Highlighted
Explorer
Explorer
6,211 Views
Registered: ‎05-16-2014

When one is making the system one has to make sure the IP instantiated is setup correctly. The Zync parameters had to be changed to meet my board specs.

 

Thanks all for your suggestions.

View solution in original post

0 Kudos
Highlighted
2,717 Views
Registered: ‎05-05-2018

I have same problem. Have set jumper to Jtag. But not able to get uart display in serial monitor. program does run but not able to see the ouput. 

0 Kudos
Highlighted
Observer
Observer
1,912 Views
Registered: ‎10-21-2018

Hi. 

Were you able to proceed further? I am facing a similar issue with my board. It is not able to communicate with the terminal through UART.

0 Kudos
Highlighted
Visitor
Visitor
639 Views
Registered: ‎03-02-2020
Can you let us know what parameters had to be changed for your application??
0 Kudos
Highlighted
Visitor
Visitor
612 Views
Registered: ‎03-02-2020
Nvm, I applied the zybo board preset to the Zynq IP and it solved the problem for me. The input frequency was 50 Mhz but the Zybo Z7 board requires 33.33Mhz.
After applying the preset, the debugger stopped at main
0 Kudos