Forum Discussion

DChau5's avatar
DChau5
Icon for New Contributor rankNew Contributor
7 years ago

Preloader does not work.

Hi everyone,

First of all, I am new to this field and most of the time I learn it by myself. Recently, I just bought an Atlas-SoC board from Terasic and I have been trying to make an bare-metal application ( just counting and output to LEDs ).

So far, I have been following those steps:

1/ Design my own HPS on Platform designer ( Qsys )

2/ Connect all the necessary pin

3/ Successfully compiled on Quartus

4/ Generated .rbf file ( Passive Parallel x16 )

5/ Generated a preloader using bsp-editor. In here, I disabled Watchdog and enabled FAT-Support

6/ Generated preloader bin file using make command

7/ Generated u-boot.img using make uboot commad

8/ Load preloader on SD card by using alt-boot-disk-util.exe

9/ Copy all uboot.img and rbf file to SD card( at this point, I have not made baremetal application because I just want to see if it is booted or not )

10/ Plug SD card into my board ( MSEL is set to ON )

11/ Open putty and connect to the board

12/ Turn on the board

The result is nothing. I received nothing on the Putty terminal. At first, I thought that it would show the setup of Clock, SDRAM, Reset, etc. But all I have is totaly blank terminal.

My first assumption is that I have made some mistakes in configuring the preloader.

I hope someone can give me a solution because I am pretty a newbie in this field.

Thanks in advance !

8 Replies

    • DChau5's avatar
      DChau5
      Icon for New Contributor rankNew Contributor

      thanks for your answer. Let me update my situation a little bit. After some configuration, I have been able to load my preloader, so now I have 2 choices:

      1. Use only preloader and baremetal application
      2. Use uboot to first load .rbf file then jump to application ( and of course with uboot script)

      With the first one, when making the preloader, I modify the field FAT_LOAD_PAYLOAD_NAME to "hello_world.img". Then compiling and load it to my SD without problem. I found in uboot-socfpga folder having examples sub-folder with hello_world.bin inside, then I converted it to .img file and drag it to my SD card. However, when plugged it into the board, on Putty terminal I had my u-boot SPL configuration and went to reading hello_world.img but it stucked over there and went nowhere.

      With the second one, I make a uboot by make command and create my uboot script that first load .rbf file, then jump to my bare metal application. Since my EDS does not license so I used the same hello_world example. Everything was going well until I got this error:

      MAYBE you should read doc/README.arm-unaligned-accesses

      This happened when it tried to run the application.

      Once again, I appreciate your help and I hope you can give me a clue for this problem.

      Cheers.