Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

Compact Flash Card problem

I am trying to implemnent the CF Card in my Nios system.

But there is not any reference about it.

Should I write a driver for it and prepare the subroutine? or there is already one?

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/huh.gif Thanks a lot!!

13 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    To Kerri, Joe90 and Anagnost,

    -Have you been able to compile successfully the CFcomponent zip file&#39;s project "cf_ide_test"?

    I tried it for 1S40fullfeatured using NIOSII V1.01 but got compile errors (see below); did you have to modify any code (eg# define CF_IDE_BASE , "cf",....) and which version of NIOSII you used? maybe V1.01 is too new?)

    -besides this test, does ALtera have any other test to verify the inserted CFcard works or not?

    The "board_diag" project in the installation only test the onboard flash chip, not the CFcard

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by niosfan@Jan 6 2005, 04:25 PM

    to kerri, joe90 and anagnost,

    -have you been able to compile successfully the cfcomponent zip file&#39;s project "cf_ide_test"?

    i tried it for 1s40fullfeatured using niosii v1.01 but got compile errors (see below); did you have to modify any code (eg# define cf_ide_base , "cf",....) and which version of niosii you used? maybe v1.01 is too new?)

    -besides this test, does altera have any other test to verify the inserted cfcard works or not?

    the "board_diag" project in the installation only test the onboard flash chip, not the cfcard

    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

    --- Quote End ---

    hi

    you have to change the name

    for example

    you compactflash card name is cf_0

    you should change "cf_ide_irq" to "cf_0_ide_irq"