Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12603 Discussions

how to use CF card in uclinux?

Altera_Forum
Honored Contributor II
1,608 Views

I use cyclone board and the system detected CF card, but have error. 

so I can't format CF card use command: fdisk /dev/hda 

help me! 

thanks a lot.
0 Kudos
16 Replies
Altera_Forum
Honored Contributor II
588 Views

what error message are you receiving?

0 Kudos
Altera_Forum
Honored Contributor II
588 Views

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

what error message are you receiving?[/b] 

--- Quote End ---  

 

 

 

CF: ctl=1 

hda: é‘é‰é?霽??????????????? ATA DISK drive 

Using anticipatory io scheduler 

ide0 at 0x80900800-0x80900807,0x80900838 on irq 8 

hda: max request size: 1024KiB 

hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: task_no_data_intr: error=0x04 { DriveStatusError } 

hda: 3959483392 sectors (2027255 MB) w/30209KiB Cache, CHS=65535/255/63 

hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: task_no_data_intr: error=0x04 { DriveStatusError } 

hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: task_no_data_intr: error=0x04 { DriveStatusError } 

hda:hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

ide0: reset: success 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

ide0: reset: success 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

end_request: I/O error, dev hda, sector 0 

Buffer I/O error on device hda, logical block 0 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

ide0: reset: success 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

ide0: reset: success 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

end_request: I/O error, dev hda, sector 0 

Buffer I/O error on device hda, logical block 0 

unable to read partition table
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

 

--- Quote Start ---  

originally posted by ken@Dec 16 2004, 03:36 PM 

what error message are you receiving? 

--- Quote End ---  

 

CF: ctl=1 

hda: é‘é‰é?霽??????????????? ATA DISK drive 

Using anticipatory io scheduler 

ide0 at 0x80900800-0x80900807,0x80900838 on irq 8 

hda: max request size: 1024KiB 

hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: task_no_data_intr: error=0x04 { DriveStatusError } 

hda: 3959483392 sectors (2027255 MB) w/30209KiB Cache, CHS=65535/255/63 

hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: task_no_data_intr: error=0x04 { DriveStatusError } 

hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: task_no_data_intr: error=0x04 { DriveStatusError } 

hda:hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

ide0: reset: success 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

ide0: reset: success 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

end_request: I/O error, dev hda, sector 0 

Buffer I/O error on device hda, logical block 0 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

ide0: reset: success 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

ide0: reset: success 

hda: read_intr: status=0x51 { DriveReady SeekComplete Error } 

hda: read_intr: error=0x04 { DriveStatusError } 

end_request: I/O error, dev hda, sector 0 

Buffer I/O error on device hda, logical block 0 

unable to read partition table
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

why does no one answer this question?  

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/mad.gif  

come on, experts, help us~ http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

I&#39;m sorry, but your post came in at 9pm on a Friday night here (which incidently is well after our business hours). I&#39;ll pass it forward to one of my co-workers who knows more about this than I do.

0 Kudos
Altera_Forum
Honored Contributor II
588 Views

Hi Xlking, 

 

Are you using the Linux core Microtronix provides, or your own customized core? It looks like the driver could not get correct data from the CF card.  

If you are using a Cyclone board from Altera, the booting message "CF: ctl=1" means the CF controller is not powered, thus won&#39;t work correctly. You need a message like "CF: ctl=3" in order to make the Linux driver work. I am inclined to think it is a hardware issue.  

 

Regards, 

wentao
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

I use Microtronix linux core and CF_Component and CF_qp which was downloaded from this forum, I think it maybe the problem of hardware, I use altera cyclone board; 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

If you are using a Cyclone board from Altera, the booting message "CF: ctl=1" means the CF controller is not powered, thus won&#39;t work correctly. You need a message like "CF: ctl=3" in order to make the Linux driver work.[/b] 

--- Quote End ---  

 

but how to power the CF controller? is there anything need to be notice such as pin assignment when use CF card of altera&#39;s cyclone board? 

thank you.
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

You are using the pre-built linux.sof core that is included with the Nios II Linux distribution? It has all the pins appropriately assigned already. If you are using your own custom core, I can post the pin connections and pin assignments that are needed. 

 

Dennis Scott 

Microtronix Datacom Ltd.
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

If you are using your own custom core, I can post the pin connections and pin assignments that are needed.[/b] 

--- Quote End ---  

 

thank you, please email pin assignments to me.let me try it again.hope it can work. 

my email: 

xlking@ujs.edu.cn
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

First, you must name the compact flash component "cf" in SOPC builder so that the kernel build will find it. 

 

Once you have the component built into your SOPC block you need to attach and assign pins. 

Inputs: 

detect_to_the_cf -- B13 

intrq_to_the_cf -- G17 

iordy_to_the_cf -- G14 

 

Outputs: 

addr_from_the_cf[0] -- H17 

addr_from_the_cf[1] -- H18 

addr_from_the_cf[2] -- H19 

addr_from_the_cf[3] -- W18 

addr_from_the_cf[4] -- K15 

addr_from_the_cf[5] -- J18 

addr_from_the_cf[6] -- J17 

addr_from_the_cf[7] -- J14 

addr_from_the_cf[8] -- H14 

addr_from_the_cf[9] -- J20 

addr_from_the_cf[10] -- J15 

atasel_n_from_the_cf -- D13 

cs_n_from_the_cf[0] -- H20 

cs_n_from_the_cf[1] -- U19 

iord_n_from_the_cf -- G19 

iowr_n_from_the_cf -- G20 

power_from_the_cf -- M13 

reset_n_from_the_cf -- unconnected (the board does not give direct access to the reset line) 

rfu_from_the_cf -- U20 

we_n_from_the_cf -- V18 

 

Bidirectional: 

data_to_and_from_the_cf[0] -- F20 

data_to_and_from_the_cf[1] -- F15 

data_to_and_from_the_cf[2] -- E19 

data_to_and_from_the_cf[3] -- F18 

data_to_and_from_the_cf[4] -- E17 

data_to_and_from_the_cf[5] -- D17 

data_to_and_from_the_cf[6] -- D18 

data_to_and_from_the_cf[7] -- C18 

data_to_and_from_the_cf[8] -- C19 

data_to_and_from_the_cf[9] -- D19 

data_to_and_from_the_cf[10] -- D20 

data_to_and_from_the_cf[11] -- F17 

data_to_and_from_the_cf[12] -- E18 

data_to_and_from_the_cf[13] -- F16 

data_to_and_from_the_cf[14] -- F19 

data_to_and_from_the_cf[15] -- G16 

 

 

Dennis Scott 

Microtronix Datacom Ltd.
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

I use stratix board,when i first use CF card,the massage i received from the shell is: 

CF: ctl=1 

while i reboot ,we get the massage as following: 

CF: ctl=11 

please tell me why? and i can not find the document i have created in CF card before.
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

 

--- Quote Start ---  

originally posted by xlking@Dec 16 2004, 04:18 AM 

i use cyclone board and the system detected cf card, but have error. 

so i can&#39;t format cf card use command: fdisk /dev/hda 

help me! 

thanks a lot. 

--- Quote End ---  

 

 

Let&#39;s assume for a moment that it&#39;s a problem with uClinux rather than with your Nios project. 

 

If uClinux recognized the cf card and was able to tell you the brand name and size, then it is able to read the card. # hda: SanDisk SDCFB-8, CFA DISK drive 

ide0 at 0x80900800-0x80900807,0x80900838 on irq 8 

hda: max request size: 128KiB 

hda: 15680 sectors (8 MB) w/1KiB Cache, CHS=245/2/32 

hda: hda1 

 

I had the same error: 

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 

ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx 

CF: ctl=1 

Unable to initialize compact flash card. Please re-insert 

Using anticipatory io scheduler 

uClinux may be trying to read the cf configuration before the card is ready. There is a note in the documentation somewhere saying not to boot with the cf installed. Try installing the cf after the system has initialized and you&#39;ve logged in. 

 

I assume that you were able to mount the cf.# mount /dev/hda1 /mnt/ide0 -n 

It might get hosed if you don&#39;t unmount before removing it.# umount /dev/hda1 

 

fdisk: fdisk makes all documents go away. 

 

If the cf filesystem gets messed up, you may want to reformat it in your computer instead. I use the soyo bayone xp internal 9 in 1 card reader (http://www.amazon.com/exec/obidos/asin/b00024paou/pendulumresource). Dazzle also makes several nice external USB card readers. 

 

There is a caveat in the documentation somewhere against writing to the cf. I was able to write to it, though. 

 

I hope that helps.
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

Hi, 

I tried compiling the "cf_ide_test" project in the downloaded CDcomponent.zip but got lots of compiling errors; I do NOT need to install Linux , do I ??? 

 

Have you been able to compile CFcomponent successfully ? 

I tried it for 1S40fullfeatured using NIOSII V1.01 but 

got compile errors (see below); did you have to modify 

any code (eg how did you# define CF_IDE_BASE , "cf",.... and the file altera_avalon_cf_regs.h is installed but the compile didn&#39;t see it) 

and which version of NIOSII you used? maybe V1.01 is too 

new?) 

 

Thanks # #################################################### 

 

Error *** [obj/ideutils.o] Error 1 cf_ide_test_0_1s40  

Error# error This IDE utility requires a CompactFlash 

Interface component named "cf" ideutils.c 

cf_ide_test_0_1s40 line 16 

 

Error altera_avalon_cf_regs.h: No such file or 

directory ideutils.c cf_ide_test_0_1s40 line 29 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 78 

Error error: (Each undeclared identifier is reported 

only once ideutils.c cf_ide_test_0_1s40 line 78 

Warning implicit declaration of function 

`IORD_ALTERA_AVALON_CF_IDE_STATUS&#39; ideutils.c 

cf_ide_test_0_1s40 line 78 

Error error: `CF_CTL_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 86 

Warning implicit declaration of function 

`IORD_ALTERA_AVALON_CF_CTL_STATUS&#39; ideutils.c 

cf_ide_test_0_1s40 line 86 

Error error: `ALTERA_AVALON_CF_CTL_STATUS_PRESENT_MSK&#39; 

undeclared (first use in this function) ideutils.c 

cf_ide_test_0_1s40 line 87 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 120 

Warning implicit declaration of function 

`IORD_ALTERA_AVALON_CF_IDE_ALTERNATE_STATUS&#39; 

ideutils.c cf_ide_test_0_1s40 line 120 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 150 

Warning implicit declaration of function 

`IORD_ALTERA_AVALON_CF_IDE_ERROR&#39; ideutils.c 

cf_ide_test_0_1s40 line 165 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 195 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 216 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 237 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 257 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 289 

Warning implicit declaration of function 

`IOWR_ALTERA_AVALON_CF_IDE_DEVICE_HEAD&#39; ideutils.c 

cf_ide_test_0_1s40 line 289 

Warning implicit declaration of function 

`IOWR_ALTERA_AVALON_CF_IDE_DEVICE_CONTROL&#39; ideutils.c 

cf_ide_test_0_1s40 line 293 

Warning implicit declaration of function 

`IORD_ALTERA_AVALON_CF_IDE_SECTOR_COUNT&#39; ideutils.c 

cf_ide_test_0_1s40 line 378 

Warning implicit declaration of function 

`IORD_ALTERA_AVALON_CF_IDE_SECTOR_NUMBER&#39; ideutils.c 

cf_ide_test_0_1s40 line 379 

Warning implicit declaration of function 

`IORD_ALTERA_AVALON_CF_IDE_CYLINDER_LOW&#39; ideutils.c 

cf_ide_test_0_1s40 line 380 

Warning implicit declaration of function 

`IORD_ALTERA_AVALON_CF_IDE_CYLINDER_HIGH&#39; ideutils.c 

cf_ide_test_0_1s40 line 381 

Warning implicit declaration of function 

`IORD_ALTERA_AVALON_CF_IDE_DEVICE_HEAD&#39; ideutils.c 

cf_ide_test_0_1s40 line 382 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 415 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 495 

Warning implicit declaration of function 

`IORD_ALTERA_AVALON_CF_IDE_DATA&#39; ideutils.c 

cf_ide_test_0_1s40 line 513 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 556 

Warning implicit declaration of function 

`IOWR_ALTERA_AVALON_CF_IDE_SECTOR_COUNT&#39; ideutils.c 

cf_ide_test_0_1s40 line 556 

Warning implicit declaration of function 

`IOWR_ALTERA_AVALON_CF_IDE_SECTOR_NUMBER&#39; ideutils.c 

cf_ide_test_0_1s40 line 557 

Warning implicit declaration of function 

`IOWR_ALTERA_AVALON_CF_IDE_CYLINDER_LOW&#39; ideutils.c 

cf_ide_test_0_1s40 line 558 

Warning implicit declaration of function 

`IOWR_ALTERA_AVALON_CF_IDE_CYLINDER_HIGH&#39; ideutils.c 

cf_ide_test_0_1s40 line 559 

Warning implicit declaration of function 

`IOWR_ALTERA_AVALON_CF_IDE_COMMAND&#39; ideutils.c 

cf_ide_test_0_1s40 line 566 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 591 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 632 

Warning implicit declaration of function 

`IOWR_ALTERA_AVALON_CF_IDE_DATA&#39; ideutils.c 

cf_ide_test_0_1s40 line 670 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 810 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 970 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 1080 

Error error: `CF_CTL_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 1216 

Error error: `ALTERA_AVALON_CF_CTL_STATUS_PRESENT_MSK&#39; 

undeclared (first use in this function) ideutils.c 

cf_ide_test_0_1s40 line 1217 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 1242 

Error error: `ALTERA_AVALON_CF_CTL_STATUS_POWER_MSK&#39; 

undeclared (first use in this function) ideutils.c 

cf_ide_test_0_1s40 line 1943 

Error error: `CF_CTL_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 1943 

Warning implicit declaration of function 

`IOWR_ALTERA_AVALON_CF_CTL_CONTROL&#39; ideutils.c 

cf_ide_test_0_1s40 line 1943 

Error error: `CF_IDE_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 1954 

Error error: `CF_CTL_IRQ&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 1977 

Error error: `ALTERA_AVALON_CF_CTL_STATUS_IRQ_EN_MSK&#39; 

undeclared (first use in this function) ideutils.c 

cf_ide_test_0_1s40 line 1979 

Error error: `CF_IDE_IRQ&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 1982 

Error error: `ALTERA_AVALON_CF_IDE_CTL_IRQ_EN_MSK&#39; 

undeclared (first use in this function) ideutils.c 

cf_ide_test_0_1s40 line 1983 

Warning implicit declaration of function 

`IOWR_ALTERA_AVALON_CF_IDE_CTL&#39; ideutils.c 

cf_ide_test_0_1s40 line 1983 

Error error: `CF_CTL_BASE&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 1999 

Error error: `CF_IDE_IRQ&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 2002 

Error error: `CF_CTL_IRQ&#39; undeclared (first use in 

this function) ideutils.c cf_ide_test_0_1s40 line 2003
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

 

--- Quote Start ---  

originally posted by niosfan@Jan 7 2005, 12:37 PM 

hi, 

i tried compiling  the "cf_ide_test"  project in the  downloaded cdcomponent.zip but got lots of compiling errors;  i do not need to install linux ,  do i ??? 

 

have you been able to compile cfcomponent successfully ? 

i tried it for 1s40fullfeatured using niosii v1.01 but 

got compile errors (see below); did you have to modify 

any code (eg how did you# define cf_ide_base , "cf",....  and the file altera_avalon_cf_regs.h is installed but the compile didn&#39;t see it) 

and  which version of niosii you used? maybe v1.01 is too 

new?) 

 

thanks # #################################################### 

 

error *** [obj/ideutils.o] error 1 cf_ide_test_0_1s40  

error# error this ide utility requires a compactflash 

interface component named "cf" ideutils.c 

cf_ide_test_0_1s40 line 16 

 

<snip> 

--- Quote End ---  

 

Nope, I didn&#39;t try to compile the project that came with the cf_component. I believe I used linux.ptf for my development board. I don&#39;t know what you&#39;d use for an S40 development board. 

 

Look for the# defines here. 

C:\ALTERA\kits\nios2\components\altera_avalon_cf\inc 

 

Opinions now, since I don&#39;t have the answer: 

Linux has support for the cf&#39;s VFAT filesystem. Your software must support VFAT - not just the IDE interface, but a real live PC-readable filesystem - to use the cf card properly. 

 

Make sense? 

 

Unfortunately, the kernal and filesystem projects I created in November no longer work. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/ohmy.gif How distressing. I&#39;ll be coming back to it next week, I hope. 

 

Maybe one of the experts can get more detailed info for you.
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

Hi dennis 

can you give me the pins alloction of the CF in the stratix 10E board. 

 

 

 

Thank you !
0 Kudos
Altera_Forum
Honored Contributor II
588 Views

To Dennis and Ken, 

Could you help with this problem symptom I faced when trying your CF_component zip files (after modifying pinout to work with my ALtera Stratix2 2s60ES board and recompile in Quartus to get my working linux.sof; note my software doesn&#39;t have Linux kernel, just your ideutils.c, idemon.c files):  

 

-1)(in function IDE_inititalize) these 10 writes/verfies using this command are successful : 

IOWR_ALTERA_AVALON_CF_IDE_SECTOR_NUMBER(ide_base, ucWrite); 

-2)the insertion and removal interrupts of the CFcard seem to work OK and reliably 

-3)but , in your file ideutils.c function "IDE_identifyDevice" , when reading CF register "alternate status register" to poll for DRDY line to be High , this line never goes High which caused the function call "IDE_identifyDevice" to fail. Does this indicate a hardware (eg pinout or CFcard itself) or software problem? 

 

Thanks for your help!!! 

 

Note: 2 related symptoms are:  

a) in step 1, the 10 writes/verifies ALSO PASSed even if I DELETED (in function "IDE_initialize") the command to turn ON the MOSFET power to CF : 

IOWR_ALTERA_AVALON_CF_CTL_CONTROL(ctl_base, ALTERA_AVALON_CF_CTL_STATUS_POWER_MSK); 

Why is this possible? Do you expect CFcard to work without this Power_on command? 

 

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif when first run the software(before any write) , DRDY is actually High , but then any write command to CF (eg write to SECTOR_NUMBER register as in step#1) would cause DRDY to stuck low forever
0 Kudos
Reply