Forum Discussion
Altera_Forum
Honored Contributor
20 years agoU-BOOT !!!!!!!!!!!!
Hi http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wacko.gif ,
that u-boot is really driving me crazy. This is what I've done: 1- Compiled u-boot (got the .bin and the .srec) 2- Used flash programmer to program the .bin in flash (user zone) 3- Used quartus programmer to program standard.sof 4- Followed those instructions in the Using.txt But everytime I launch the nios2-console I get an error messageCommunication port must be specified.
Use openport <port> to configure the communication port. And I'm totally lost within that, It's by God bless that I succeded to write this topic Please rescue me52 Replies
- Altera_Forum
Honored Contributor
Hi MFM,
It's time to implement your flash driver. If you have a CFI flash (and are _not_ using a data cache) you may want to try the default CFI flash driver. However, depending on the command set and your flash geometry you may have to disable the toggle bit polling (since it won't work with avalon). Otherwise, you can grab an existing driver from another project. Please post your flash configuration (and part numbers) and I'll see if there's one I can recommend. Best Regards, --Scott==> flinfo Bank# 1: Size: 0 KB in 0 Sectors Sector Start Addresses: - Altera_Forum
Honored Contributor
Hi MFM,
I'm trying to re-synchronize with this thread since I've been away, please excuse the multiple posts ... > Besides, I feel confused between Flash and SDRAM adresses, I can't even decide > what adresses to submit to mkimage, is the adress I've programmed u-boot at is Always use the address where you want the image to be loaded and executed from. In your case, SDRAM. There are two addresses you need to specify: (1) the load address, and (2) the entry point address. The load address is address where you want u-boot to copy the kernel image. It is _not_ the addres where the .img file is loaded. You can put the .img file anywhere in memory (flash, tftp into sdram, whatever). When you run bootm, you specify the address of the .img, u-boot will then copy the kernel from the .img to the load address. If the kernel image is compressed, u-boot will decompress as it copies. The entry point address is the address that u-boot jumps to after loading the kernel to its load address (and flushing cache, and disabling interrupts, etc). Normally, for Nios-II/uClinux, the entry point address and the load address are the same. Since the kernel start code is usually placed at the beginning of the kernel image. For other architectures/kernels the entry point may actually be at some offset from the start of the kernel image -- that's why you have the option of setting it with mkimage. Hope this helps. Regards, --Scott - Altera_Forum
Honored Contributor
Hi Scott,
thanks for your reply http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif <div class='quotetop'>QUOTE </div> --- Quote Start --- It's time to implement your flash driver.[/b] --- Quote End --- I'm sorry but I don't know how to do that http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif . <div class='quotetop'>QUOTE </div> --- Quote Start --- Please post your flash configuration (and part numbers) and I'll see if there's one I can recommend.[/b] --- Quote End --- My flash is an AMD AM29LV065D-120R 8 MB x 8 bits - Altera_Forum
Honored Contributor
Hi,
could somebody tell me where to get my flash base adress http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/dry.gif The fact is that when I looked in the standard design, I've found that ext_flash is adressed at 0x00000000 and SDRAM at 0x01000000, but when I tryed to use the nios2-flash-programmer to upload the u-boot.flash (made with bin2flash) it's always failing with the 0x00000000 base adress, contrariwise, when I choose a 0x00800000 base adress, it works but the u-boot is apparently not in the user zone (I specified --location=0x00400000) since the green led of User il not lightened and u-boot not working. I've made that manipulation in the IDE, programmed flash in the user zone and it worked fine. - Altera_Forum
Honored Contributor
Hi MFM,
> > Please post your flash configuration (and part numbers) and I'll see if there's one > > I can recommend. > My flash is an AMD AM29LV065D-120R 8 MB x 8 bits You should be able to use the existing flash driver in board/altera/common/AMDLV065D.c. If you started with the ep1c20 configuration -- it would already be built for you. Otherwise, you need to include the driver in your build -- copy the file into your board directory and add it to your makefile. Then set the flash configuration macros in your configuration header file. Here are the settings from other boards that use 065D: # define cfg_flash_base 0xwhatever /* flash base addr */# define cfg_flash_size 0x00800000 /* 8 mbyte */# define cfg_max_flash_sect 128 /* 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 */ Did I tell you (in some other thread) to stub-out flash_init? For some reason I thought you were using an Altera stratix 2 development board -- which uses the LV128. Regards, --Scott - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by smcnutt@May 3 2006, 02:01 AM hi mfm,> > please post your flash configuration (and part numbers) and i'll see if there's one
> > i can recommend.
> my flash is an amd am29lv065d-120r 8 mb x 8 bits
you should be able to use the existing flash driver in board/altera/common/amdlv065d.c.
if you started with the ep1c20 configuration -- it would already be built for you. otherwise,
you need to include the driver in your build -- copy the file into your board directory and
add it to your makefile. then set the flash configuration macros in your configuration
header file. here are the settings from other boards that use 065d:
# define CFG_FLASH_BASE 0xWHATEVER /* FLASH base addr */# define CFG_FLASH_SIZE 0x00800000 /* 8 MByte */# define CFG_MAX_FLASH_SECT 128 /* 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 */[/b] Did I tell you (in some other thread) to stub-out flash_init? For some reason I thought you were using an Altera stratix 2 development board -- which uses the LV128. Regards, --Scott <div align='right'><{post_snapback}> (index.php?act=findpost&pid=14968) --- Quote End --- [/b] --- Quote End --- Hi Scott, you are right, I've been using a Stratix II board, but all I'm asking now for is for a Stratix Pro Edition 1s40
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by mfm@May 3 2006, 01:42 AM hi,could somebody tell me where to get my flash base adress http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/dry.gif
the fact is that when i looked in the standard design, i've found that ext_flash is adressed at 0x00000000 and sdram at 0x01000000, but when i tryed to use the nios2-flash-programmer to upload the u-boot.flash (made with bin2flash) it's always failing with the 0x00000000 base adress, contrariwise, when i choose a 0x00800000 base adress, it works but the u-boot is apparently not in the user zone (i specified --location=0x00400000) since the green led of user il not lightened and u-boot not working.
i've made that manipulation in the ide, programmed flash in the user zone and it worked fine.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14967)
--- quote end ---
--- Quote End --- Hi, seemingly my flash base adress is 0x800000, don't ask how I get it, I just tried it and it's fine, where to get that information remains then a mystery to me.
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by mfm@Apr 29 2006, 08:58 PM hi scott,- u-boot works fine but when i type flinfo this is what i get
==> flinfo bank# 1: size: 0 kb in 0 sectors sector start addresses: ==>- when i try to save my variables with saveenv:
==> saveenv saving environment to flash... error: start address not on sector boundary ==>ps. i'm using a stratix pro 1s40 board --- Quote End --- Still not solved http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif
- Altera_Forum
Honored Contributor
<div class='quotetop'>QUOTE </div>
--- Quote Start --- flash base adress??[/b] --- Quote End --- Do you just develop SW in NiosII system? Who develops NiosII in Quartus/SOPC builder? All informatioins about modules of NiosII, including flash, SDRAM..., can be found in SOPC builder. The file-- <NiosII Name>.ptf records all information about "HW" of NiosII system. Yes, of course the BASE ADDRESS. Then all your SW works should deal with the information about "HW". --------------------------------------- 1. uClinux nios2linux.h (which is generated according to *.ptf automatically) deals with the information. Any other drivers could take a reference from nios2linux.h or add "BASE ADDRESS" in DRIVER.c/.h directly. --------------------------------------- 2. u-boot <u-boot-src>/include/configs/"board".h should deal with the information manually. - Altera_Forum
Honored Contributor
Hi,Scott
My flash is AM29LV160DB and it locates in 0x800000 ,how can I choose a flash drive for it. I use the u-boot-1.1.4 and choose the PK1C20 board . but the flash used is AM29LV065D-120R 8 MB x 8 bits. how can I modify it to meet my Cyclone Board?