cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
7,165 Views
Registered: ‎12-03-2013

U-Boot no output

Jump to solution

Dear Community,

 

I am embarassed to have to ask such a question, but I cannot manage to get an output from u-boot.

 

I built an XPS design for an ML605 board with the 14.7 toolkit. The design is very constraint on timing, hence I had to put pipeline registers on pretty much every port in the design, i.e. all ports are fully registered on the AXI and AXI_lite busses. I am aware that this is not recommended, but I am certain that it still results in a working design.

 

Exporting to SDK is working as intended and we have built a custom SREC bootloader that is based on the standard template from SDK. The bootloader is turning off an adc via SPI before esuming normal operation in reading the u-boot.rec file from an attached flash card.

 

The srec bootloader operates normally, I can see the output via UART and see everything up to handing off to u-boot. This is the output captured using "screen" on a linux terminal:

 

ADC Power Down
Initializing SPI: Success!
Resetting SPI!
Starting Device: Success!
Going into Master mode : Success!
Disabling Interrupts!
Done setting up SPI!
-------------

Slaves detected: 00000004


Powering down slave 00000000: 
 - Selecting Slave: Success!
 - ADC Power Down: Success!
Powering down slave 00000001: 
 - Selecting Slave: Success!
 - ADC Power Down: Success!
Powering down slave 00000002: 
 - Selecting Slave: Success!
 - ADC Power Down: Success!
Powering down slave 00000003: 
 - Selecting Slave: Success!
 - ADC Power Down: Success!

All slaves powered down. Resetting device: Success!Power down success

SREC Bootloader
Loading SREC image from flash @ address: 90000000
Reading SRECORDS from Compact Flash file bist\xlnxc.rec:

888034 bytes read from file. SRECORDS at: 0x90000000
Bootloader: Processed (0x)00004847 S-records
Executing program starting at address: 82000000

 

 

As you can see the u-boot does not continue to any output.. Since one does not see any garbage output I rule out that it is an incorrect BAUD rate.

 

The Uboot has been built using these instructions: http://www.wiki.xilinx.com/Build+U-Boot

The xparameters.h and config.mk generated by the bsp are attached

 

my cross compile prefix is CROSS_COMPILE=microblazeel-xilinx-linux-gnu-

 

I had to make a few changes to the microblaze-generic.c and the microblaze-generic.h (I attached them. Changed are marked with EDIT: kjbrunner).

 

No other changes have been made.

 

I have to admit, that I am working on a ubuntu 14.04 64bit as this is my system here. I had to install the following packages as drop in replacements for

Dear Community,

 

I am embarassed to have to ask such a question, but I cannot manage to get an output from u-boot.

 

I built an XPS design for an ML605 board with the 14.7 toolkit. The design is very constraint on timing, hence I had to put pipeline registers on pretty much every port in the design, i.e. all ports are fully registered on the AXI and AXI_lite busses. I am aware that this is not recommended, but I am certain that it still results in a working design.

 

Exporting to SDK is working as intended and we have built a custom SREC bootloader that is based on the standard template from SDK. The bootloader is turning off an adc via SPI before esuming normal operation in reading the u-boot.rec file from an attached flash card.

 

The srec bootloader operates normally, I can see the output via UART and see everything up to handing off to u-boot. This is the output captured using "screen" on a linux terminal:

 

ADC Power Down
Initializing SPI: Success!
Resetting SPI!
Starting Device: Success!
Going into Master mode : Success!
Disabling Interrupts!
Done setting up SPI!
-------------

Slaves detected: 00000004


Powering down slave 00000000: 
 - Selecting Slave: Success!
 - ADC Power Down: Success!
Powering down slave 00000001: 
 - Selecting Slave: Success!
 - ADC Power Down: Success!
Powering down slave 00000002: 
 - Selecting Slave: Success!
 - ADC Power Down: Success!
Powering down slave 00000003: 
 - Selecting Slave: Success!
 - ADC Power Down: Success!

All slaves powered down. Resetting device: Success!Power down success

SREC Bootloader
Loading SREC image from flash @ address: 90000000
Reading SRECORDS from Compact Flash file bist\xlnxc.rec:

888034 bytes read from file. SRECORDS at: 0x90000000
Bootloader: Processed (0x)00004847 S-records
Executing program starting at address: 82000000

 

 

As you can see the u-boot does not continue to any output.. Since one does not see any garbage output I rule out that it is an incorrect BAUD rate.

 

The Uboot has been built using these instructions: http://www.wiki.xilinx.com/Build+U-Boot

The xparameters.h and config.mk generated by the bsp are attached

 

my cross compile prefix is CROSS_COMPILE=microblazeel-xilinx-linux-gnu-

(I also tried CROSS_COMPILE=microblaze-xilinx-linux-gnu- for checking, but that crashes u-boot immediately)

 

I had to make a few changes to the microblaze-generic.c and the microblaze-generic.h (I attached them. Changed are marked with EDIT: kjbrunner).

 

No other changes have been made.

 

I have to admit, that I am working on a ubuntu 14.04 64bit as this is my system here. I had to install the following packages as drop in replacements for the ia32-lib that does not exist in 14.04 any more.

 

sudo apt-get install device-tree-compiler lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

 

I have tried solving this issue for weeks now and failed. I apologize if there is a very simple solution that I am not seeing, but I am incredibly thankful for any help you can give me.

 

If you need more information, I am very willing to provide your with it.

 

Thanks in advance for taking the time.

 

PS: I am aware uploading zip files is dodgy, but the Forum wouldn't let me attach .h and .c files

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer
Observer
11,321 Views
Registered: ‎12-03-2013

Re: U-Boot no output -> timer interrupt blocking processor

Jump to solution

So I just found the problem....

 

Indeed the interrupts where not acknowledged correctly, which made the processor issue the same interrupt continuously, however the problem was not the code in U-boot, but the fact that the now updated version of the interrupt controller in XPS requires a processor clock and reset connected to it. Even though you can configure the core to have it not attached (which I did, because that is the way it was in the old ISE 12.4 design, which I updated)  the result is a non working interrupt that does not get cleared correctly(This resulting behaviour is not mentioned in the documentation at all btw.).

 

I will accept this as the solution!

View solution in original post

0 Kudos
4 Replies
Highlighted
Observer
Observer
7,117 Views
Registered: ‎12-03-2013

Re: U-Boot no output

Jump to solution

Sorry I just realized, that the post repeats half way in between. Unfortunately I cannot edit it.

0 Kudos
Observer
Observer
7,029 Views
Registered: ‎12-03-2013

Re: U-Boot no output -> timer interrupt blocking processor

Jump to solution

Hi there,

 

So I managed to get an output out of U-boot. It turns out that the reson for not getting any output was actually the timer interrupt. I reverted to an older version of the u-boot that I knew gave me at least some output and found found that output stopped after a short while.

 

It took me a while to figure out the reason for stopping output and it appears as though there is a problem with the timer interrupt.

 

After getting an initial UART output I traced the problem through the U-boot initialization routine using "puts(..)" statements:

 

 

<previous outputs from SREC bootloader>

Executing program starting at address: 82000000 ------------------------- U-BOOT UART inited: Welcome to U-boot! memalloc init completed, now running init sequenc Initializing Interrupts.INTC isr 0, ier 0, iar 0, mer 3 .Interrupts enabled! Timer initiation... setting registers resetting timer installing interrupt handler checking irq out of range enable irc... Enabling one Interrupt! offset <<= irq mask = intc->ier intc->ier = (mask | offset)
INTC isr 4, ier 4, iar 0, mer 3 Interrupt handler on 2 line, r14 8201623c Jumping to interrupt handler routine addr 8202c2d8,count 0,arg 41c00000 Dump INTC reg, isr 4, ier 4, iar 0, mer 3 Interrupt handler on 2 line, r14 8201623c INTC isr 4, ier 4, iar 0, mer 3 Interrupt handler on 2 line, r14 82000258 Jumping to interrupt handler routine addr 8202c2d8,count 1,arg 41c00000 Dump INTC reg, isr 4, ier 4, iar 0, mer 3 
Interrupt handler on 2 line, r14 8201623c
INTC isr 4, ier 4, iar 0, mer 3 Interrupt handler on 2 line, r14 82000258 
Jumping to interrupt handler routine addr 8202c2d8,count 2,arg 41c00000

<and so on>

 

It appears as though the initialization routines are progressing until they hit the timer interrupt registration.

 

However as soon as this command is called intc->ier = (mask | offset) (As far as I can tell ier is the interrupt enable register) the processor appears to be busy handling the interrupt requests and does not continue normal code (I do have a control output right after the above command). The timer_isr function is called normally, so as far as I can tell the interrupt is actually handled correctly.

 

Unfortunately I am not very proficient at this. A lot of googling brought up the idea of clearing the interrupt acknoledge. From the "microblaze-timer.h" file I can tell that iar is that register, which makes me think that in the above output the second output should change:

Dump INTC reg, isr 4, ier 4, iar 0, mer 3
to
INTC isr 4, ier 4, iar 1, mer 3

I would have expected this to work out of the box, however obviously it is not. What is the proper procedure to acknowledge the interrupt request to make sure u-boot can continue normally.

 

Thanks in advance for any help.

0 Kudos
Highlighted
Observer
Observer
7,009 Views
Registered: ‎12-03-2013

Re: U-Boot no output -> timer interrupt blocking processor

Jump to solution

So I am punching further through the code. These are the critical lines in the interrupt_handler (void) function in <interrupts.c> that I suspect are not working (mind you, this is my lack of knowledge talking).

 

    act->handler (act->arg);
    act->count++;

    intc->iar = mask << irqs;

 

 

The act-> handler is calling timer_isr from <timer.c> correctly and according to the previous outputs the act-> count++ is working as well. However mask << irqs is 4, however intc->iar stays 0 no matter what.

 

- Is this correct behaviour?

- If so, why is the processor not continuing the serial code after the interrupt_handler function exits?

0 Kudos
Highlighted
Observer
Observer
11,322 Views
Registered: ‎12-03-2013

Re: U-Boot no output -> timer interrupt blocking processor

Jump to solution

So I just found the problem....

 

Indeed the interrupts where not acknowledged correctly, which made the processor issue the same interrupt continuously, however the problem was not the code in U-boot, but the fact that the now updated version of the interrupt controller in XPS requires a processor clock and reset connected to it. Even though you can configure the core to have it not attached (which I did, because that is the way it was in the old ISE 12.4 design, which I updated)  the result is a non working interrupt that does not get cleared correctly(This resulting behaviour is not mentioned in the documentation at all btw.).

 

I will accept this as the solution!

View solution in original post

0 Kudos