Intel® SoC FPGA Embedded Development Suite
Support for SoC FPGA Software Development, SoC FPGA HPS Architecture, HPS SoC Boot and Configuration, Operating Systems
444 Discussions

Cyclone V HPS Simple Baremetal Console App

DanGlass
Beginner
928 Views

I'm trying to put together a simple baremetal console application to run on a Cyclone V, using UART0 for stdin/stdout.  These are the tools I'm using:

Quartus Prime 18.1

Arm Development Studio 2020.1 (NOT DS-5 as ARM wouldn't renew my license for that)

I am using the minimal preloader, and a custom board.

I have followed what I could from RocketBoards and this site.  The Altera-SoCFPG-HelloWord-Baremetal-ARMCC seems like a great starting point, but I can't figure out how to switch from semihosting to UART0.  I've been grepping the source directories and documentation all afternoon and haven't been able to find the magic button.

I've also tried Altera-SoCFPGA-HardwareLib-Unhosted-CV-GNU without luck.

Where is the place to get oriented on this?

 

0 Kudos
4 Replies
EBERLAZARE_I_Intel
904 Views

Hi,

Have you also try the example from the installation folder?

You can also check out here for bare metal tutorial example:

https://rocketboards.org/foswiki/Documentation/SoCEDS#Cyclone_V_Bare_Metal_Example_Using_SoC_EDS_Standard_Edition

 

0 Kudos
DanGlass
Beginner
894 Views

I have tried all of the following examples from the installation folder:

Altera-SoCFPGA-HelloWorld-Baremetal-ARMCC.tar.gz

Altera-SoCFPGA-HelloWorld-Baremetal-GNU.tar.gz

Altera-SoCFPGA-HardwareLib-16550-CV-ARMCC.tar.gz

Altera-SoCFPGA-HardwareLib-16550-CV-GNU.tar.gz

And I've worked through the tutorial (and several others) numerous times. 

The problem I run into with the tutorial is that it doesn't get updated with the information from my design. I'm working with a custom board, instead of the COTS development kit.  When I get to the Run U-Boot SPL from Debugger step 9 (serial console output), the U-Boot SPL notices that the DRAM is a different size (512MB actual, while it is expecting 1GB, see attached) and stops.  The ./board/altera/cyclone5-socdk/qts/sdram_config.h file has the proper parameters for my hardware (addr bits are 1 chip select, 3 bank, 10 column, 15 row, with 16-bit data width gives 2^29 = 512MBytes) so it seems the qts-filter.sh script is working fine.  Building to the dev kit defaults (in a different directory) makes an sdram_config.h file with 1GB (1 cs, 3 ba, 10 col, 15 row, 40-bit ECC data gives 2^30 = 1GByte).  How to I get the u-boot-spl to use the parameters for my design?

Also, I'm coming from years of designing with Xilinx devices, using baremetal for both microBlaze and ARM processors. The eclipse tools there allow one to specify a board support package for baremetal software- is there anything similar for the cyclone 5?

0 Kudos
EBERLAZARE_I_Intel
865 Views

Hi,

I believe, the examples are tested using a dev kit, which has the 1GB DDR. For you custom board to execute on baremetal, you may need to change the entry starting point of the address for the 512MB SDRAM address space which is different from the 1024 MB. Also, change the DDR size in the device tree.

Let me recheck on how I did this last time.

0 Kudos
EBERLAZARE_I_Intel
836 Views

Hi,

Please try to change the entry starting point of the address for the 512MB SDRAM address space in your application.

0 Kudos
Reply