Nios Community Wiki > DasUBoot > U-Boot and Cyclone II - DE2 boards
Redirected from U-Boot and Cyclone II-DE2 boards

U-Boot and Cyclone II - DE2 boards

U-Boot is a versatile boot loader that can be used to boot any program. Nevertheless it has not too much support for nios2 processors. It has just a few boards and they are very olds. There are many modifications to do in order to have a fully functional system in DE2 boards, also known as Cyclone II which is the FPGA model (EP2C35) installed on the board.

Ethernet controller DM9000A

U-boot has support for the Ethernet controller DM9000A. It is necessary to add to configuration file the followings lines:

#define CONFIG_DRIVER_DM9000 1

#define CONFIG_DM9000_BASE 0x80900090

#define DM9000_IO CONFIG_DM9000_BASE

#define DM9000_DATA (CONFIG_DM9000_BASE + 4)

#define CONFIG_ETHADDR 08:00:3e:26:0a:5b

#define CONFIG_NETMASK 255.255.255.0

#define CONFIG_IPADDR 192.168.1.1

#define CONFIG_SERVERIP 192.168.1.201

Flash AMD S29AL032D

The model S29AL032D 70TAI040, which means that it is a bottom sector device (04) among others things. It is not included in any configuration available for nios2 processors but others boards have support for this kind of memory flash. You can find enclosed the flash.c file, took and modified from other manufacture, to be copied to board/altera/selected_board (at your choice). The configuration file must define the following macros:

#define CONFIG_SYS_MAX_FLASH_SECT 19 /* Max # sects per bank */

#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* Max # of flash banks */

#define CONFIG_SYS_FLASH_ERASE_TOUT 8000 /* Erase timeout (msec) */

#define CONFIG_SYS_FLASH_WRITE_TOUT 100 /* Write timeout (msec) */

#define CONFIG_SYS_FLASH_ADDR0 0xAAA

#define CONFIG_SYS_FLASH_ADDR1 0x555

#define CONFIG_SYS_FLASH_READ0 0x0 /* Manufacture's code */

#define CONFIG_SYS_FLASH_READ1 0x2 /* Device code */

#define CONFIG_SYS_FLASH_READ2 0x4 /* Sector protection */

#define CONFIG_SYS_FLASH_EMPTY_INFO

#define CONFIG_SYS_FLASH_WORD_SIZE unsigned char

#define CONFIG_SYS_FLASH_FORCE_LV800B 1

Add this file to the compiling process by modifying the Makefile inside the directory:

COBJS := $(BOARD).o $(COMOBJS) flash.o

(Erase any reference to common flash implementation in COMOBJS)

Note: CONFIG_SYS_FLASH_FORCE_LV800B is for board's versions that have 1Mb of flash memory. It is to force LV800B because they are detected as LV320B. If you change his value to 0, the driver will detect automatically the device ID.

SD card over SPI protocol

It is a driver to manage a SD card using the SPI core. U-boot will be able to read the fat partition to load programs from SD card. The system musts to have a SPI core with the following pins mapping:

SD_DAT0 -> MISO

SD_CMD -> MOSI

SD_DAT3 -> SLAVE_SEL

SD_CLK -> S_CLK

The macros to be defined in the configuration file are:

#define CONFIG_CMD_FAT

#define CONFIG_CMD_MMC

Those macros will add to u-boot the commands fatls, fatinfo, fatload and mmc. Also they will add to cp command the ability to read/write from/to SD memory but it is not implemented in the current driver. The file mmc_spi.c enclosed must be copied to cpu/nios2 and the makefile inside the directory should be modified as follows:
COBJS = cpu.o interrupts.o serial.o sysid.o traps.o epcs.o mmc_spi.o

The driver needs the header file mmc.h located at include/asm-nios2/arch-nios2/. If the directory does not exist you must create it.

Tag page

Files 3

FileSizeDateAttached by 
 flash.c
No description
14.54 kB08:54, 16 Feb 2009ivanchukActions
 mmc.h
No description
1653 bytes12:19, 21 Feb 2009ivanchukActions
 mmc_spi.c
No description
5.8 kB08:54, 16 Feb 2009ivanchukActions
Viewing 1 of 1 comments: view all
Nice story about this.
Great Nice Pictures
causes back pain knee high shoes lizlange maternity fishing boats sale flu incubation period remedies sore throat cost breast implants muscle weight gain surgery breast reduction girls party ideas women laptop bags car brake parts continuing nursing education cost breast augmentation protein whey powder baby slings carriers bed bugs pictures bedding duvet covers phone pay as you go outdoor swing sets discount dinnerware sets coffee espresso machines salton yogurt maker hair color pictures pictures of haircuts asvab practice test herpes photos easy cooking recipes toy dog breeds herpes simplex 1 personalized dog tags stress fracture foot occupational therapy schools frontline plus cats fleas on humans physical therapy salary scabies pictures pictures of shingles what is blood pressure ibuprofen side effects pictures of ringworm gendongan bayi kain cukin ring sling pouch sling perlengkapan bayi selendang bayi nursing cover selendang baby perlengkapan bayi baru lahir bayi bayi lucu foto bayi parish vintage ebooks download tv series download manga free download make money online health information cell phone review disorders anxiety psat practice test blood preasure smart water filter filter pur water weight loss effects blood pressure side effects socks over knee socks dress Hot News Today Jual Beli Make Money Celebrity Gossip Kesehatan Alternatif Gosip Selebritis celebrity photos celebrity news hot celebrities celebrity blog kesehatan info kesehatan kesehatan kerja pelayanan kesehatan indonesia artis foto artis gambar artis selebriti iklan iklan gratis jual online handphone daily news breaking news local news online news food dehydrator tray massage chair ijoy homedics massage shiatsu evening gown dress evening wedding dress dry face skin gold toe sock window coverings blinds blinds for windows lip gloss cosmetics folding table chairs women high heels stockings high heels treatment of pain chlorine generation makeup lighted mirror pain management specialist lawn pest control garden pest control joint pain causes
Posted 16:06, 20 Jul 2010
Viewing 1 of 1 comments: view all
You must login to post a comment.
SourceForge.net