Forum Discussion
Altera_Forum
Honored Contributor
19 years agoHi Scott,
OK, I have configured u-boot for the EP2C35 dev board, built it, downloaded it to RAM and run it. I can also burn it into flash and then have it start when I reset the board. So far so good! I have an elf file and a .flash (S-record) file for the application which I want to boot using u-boot. I'm struggling to get u-boot to download files into flash memory. Should I use the .flash or the elf file? To try and get started I have tried to simply use u-boot to burn the u-boot.bin file into flash memory at address 0. The "protect off all" command works OK. Next I need to erase the flash. I have tried "erase all", "erase bank 1" and "erase 1:0-100" but each command replies with "Timeout" after writing "." characters for a few seconds. If I read the flash memery using md then I can see that the memory started at address 0 is not blank and matches the last file which I burned using the tools in the Nios IDE. The flash configuration in my u-boot configration file (EP2C35.h) is shown below. The flash device on the EP2C35 board is an Am29LV128, which is bigger than on the boards for which you provided sample u-boot files. Have I changed the configuration properly for this device?#define CFG_FLASH_BASE 0x00000000 /* FLASH base addr */# define CFG_FLASH_SIZE 0x01000000 /* 16 MByte */
/*------------------------------------------------------------------------
* FLASH (AM29LV065D)
*----------------------------------------------------------------------*/# define CFG_MAX_FLASH_SECT 256 /* Max# sects per bank */# define CFG_MAX_FLASH_BANKS 1 /* Max# of flash banks */# define CFG_FLASH_ERASE_TOUT 8000 /* Erase timeout (msec) */# define CFG_FLASH_WRITE_TOUT 100 /* Write timeout (msec) */# define CFG_FLASH_WORD_SIZE unsigned char /* flash word size */ I feel that I am really close to cracking this, but I need a bit of help! Mike