cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
227 Views
Registered: ‎08-06-2019

How to boot FreeRTOS.elf/bin over uboot TFTP?

Jump to solution

Hi There!

First thanks a lot for reading and help.

I built freertos.elf and baremetal.elf and I can run both from JTAG and QSPI flash memory in ZC7020 MicroZed board.

But we have a requirement that needs to use TFTP to grab the binary from network and boot.

I did that with RTEMS before and it can boot the rtems.img. This time I converted the bit file to fpga.bin and the xilinx uboot 2018.1 can automatically recognize that and boot the fpga.bin. But I am having some difficulties to load the freertos.elf/bin files.


I have no problem downloading it using tftpboot 0x00100000 freertos.elf


But the following bootelf command hangs at Starting Application. Sometimes it prints CACHE:Misaligned Operation at Range, run a few lines of code and hangs again.


Then I converted the elf file to bin file by using arm-none-eabi-objcopy -O binary freertos.elf freertos.bin command, and
then I loaded it using tftpboot 0x0010000 freertos.bin, then go 0x0010000, the same hangs.
I also used the readelf tool to find the address of main() and go there like go 0x0013b5e4. Still the same.


Can you guys help me to figure it out? I am running out of options now. Many thanks for your help.

0 Kudos
1 Solution

Accepted Solutions
Visitor
Visitor
152 Views
Registered: ‎08-06-2019

Re: How to boot FreeRTOS.elf/bin over uboot TFTP?

Jump to solution

Update in case that someone who may struggle the same issue:

I found the reason and now I can boot both cores (elf/bin) over the tftp.

At first I was using the Uboot 2018.1, that version the /spl/boot.bin will automatically load the fpga.bin file that I generated by a python script. I saw the blue light on and I thought it was working but I was wrong.

This version will also show error message CACHE: Misaligned operation at range[] and bootelf command randomly failed and get stuck in the middle of somewhere. 

Today I used the Uboot 2019 from xilinx and everything works perfect. No Cache misalign error either. 

You must generate the boot.bin using the fsbl, bitstream and u-boot.elf. You need to edit the zynq-common.h file to force it boot from tftp. the commands are 

tftpboot 0x0 freertos.elf; tftp 0x3000000 cpu1.bin; bootelf 0x0;

And you need to fire up CPU1 code in the freertos main() functions. That's why you have to convert the cpu1.elf to cpu1.bin. 

Then flash the boot.bin into the QSPI ROM and power it on. It should work. 

 

View solution in original post

0 Kudos
1 Reply
Visitor
Visitor
153 Views
Registered: ‎08-06-2019

Re: How to boot FreeRTOS.elf/bin over uboot TFTP?

Jump to solution

Update in case that someone who may struggle the same issue:

I found the reason and now I can boot both cores (elf/bin) over the tftp.

At first I was using the Uboot 2018.1, that version the /spl/boot.bin will automatically load the fpga.bin file that I generated by a python script. I saw the blue light on and I thought it was working but I was wrong.

This version will also show error message CACHE: Misaligned operation at range[] and bootelf command randomly failed and get stuck in the middle of somewhere. 

Today I used the Uboot 2019 from xilinx and everything works perfect. No Cache misalign error either. 

You must generate the boot.bin using the fsbl, bitstream and u-boot.elf. You need to edit the zynq-common.h file to force it boot from tftp. the commands are 

tftpboot 0x0 freertos.elf; tftp 0x3000000 cpu1.bin; bootelf 0x0;

And you need to fire up CPU1 code in the freertos main() functions. That's why you have to convert the cpu1.elf to cpu1.bin. 

Then flash the boot.bin into the QSPI ROM and power it on. It should work. 

 

View solution in original post

0 Kudos