Tuesday, June 14, 2016

Playing with SoC!

I'm becoming Hardware and Software programmer now. I am developing System on Chip software running on ARM processor. I installed Linux on the board and write the program on it. Since the chip is Altera, I have to use Altera Quartus for developing the FPGA software. I am using evaluation license for testing my software at the moment. Here is the board that I am using.

The chip is Cyclone V SoC. The FPGA core is Cyclone V with 110 LEs and the ARM processor is Dual Core ARM Cortex A9. The board has 2 GB of memory, 1 GB in the FPGA side and 1 GB in the ARM side.

The first thing to be prepared is to install these softwares:
1. Altera Quartus II, the current version is 16.0. This software is mainly for developing the hardware (FPGA).
2. Altera SoC Embedded Design Suite for developing the software (ARM). This software also needs a license from ARM if we would like to enable software debugging using ARM's compiler which is very fancy to use. I use 30 days evaluation version. Then I use GNU's compiler instead of the ARM compiler.

I got a lot of resources mainly from for setting up the board until it can run Linux and I can write my software for it.

In order to build the software, we have to make a Makefile. An example of working Makefile is as following:

1:  #  
2:  ALT_DEVICE_FAMILY ?= soc_cv_av  
3:  TARGET = ccs_hps  
4:  #  
5:  CROSS_COMPILE = arm-linux-gnueabihf-  
6:  CFLAGS = -static -g -Wall -I${SOCEDS_DEST_ROOT}/ip/altera/hps/altera_hps/hwlib/include -Ilcdlib -Dsoc_cv_av   
7:  LDFLAGS = -g -Wall -Llcdlib  
8:  CC = $(CROSS_COMPILE)gcc  
9:  ARCH= arm  
10:  build: $(TARGET)  
11:  $(TARGET): ccshps.o lcdlib/terasic_lib.o lcdlib/LCD_Lib.o lcdlib/LCD_Driver.o lcdlib/LCD_Hw.o lcdlib/lcd_graphic.o lcdlib/font.o  
12:      $(CC) $(LDFLAGS)  $^ -o $@  -lrt -lm -lpthread  
13:  %.o : %.c  
14:      $(CC) $(CFLAGS) -c $< -o $@  
15:  .PHONY: clean  
16:  clean:  
17:      rm -f $(TARGET) *.a *.o *~ *.bmp  

I'm still a newbie with this board. When I start using this board I felt lost and didn't know what to do first. So if you are a newbie as well and trying to find a direction for using this board, feel free to ask me.

Happy Coding!

Labels: , , , , , ,


Post a Comment

<< Home