Forum Discussion
Altera_Forum
Honored Contributor
22 years agoCompact 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
Honored Contributor
Hi all,
I would like to share the CF data/address bus via a tristate bridge? But the option(s) do not appear on SOPC Builder to allow me to connect to the shared bus? Any ideas? Thanks! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif - Altera_Forum
Honored Contributor
To Kerri, Joe90 and Anagnost,
-Have you been able to compile successfully the CFcomponent zip file'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' 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' ideutils.c cf_ide_test_0_1s40 line 78 Error error: `CF_CTL_BASE' 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' ideutils.c cf_ide_test_0_1s40 line 86 Error error: `ALTERA_AVALON_CF_CTL_STATUS_PRESENT_MSK' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 87 Error error: `CF_IDE_BASE' 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' ideutils.c cf_ide_test_0_1s40 line 120 Error error: `CF_IDE_BASE' 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' ideutils.c cf_ide_test_0_1s40 line 165 Error error: `CF_IDE_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 195 Error error: `CF_IDE_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 216 Error error: `CF_IDE_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 237 Error error: `CF_IDE_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 257 Error error: `CF_IDE_BASE' 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' ideutils.c cf_ide_test_0_1s40 line 289 Warning implicit declaration of function `IOWR_ALTERA_AVALON_CF_IDE_DEVICE_CONTROL' ideutils.c cf_ide_test_0_1s40 line 293 Warning implicit declaration of function `IORD_ALTERA_AVALON_CF_IDE_SECTOR_COUNT' ideutils.c cf_ide_test_0_1s40 line 378 Warning implicit declaration of function `IORD_ALTERA_AVALON_CF_IDE_SECTOR_NUMBER' ideutils.c cf_ide_test_0_1s40 line 379 Warning implicit declaration of function `IORD_ALTERA_AVALON_CF_IDE_CYLINDER_LOW' ideutils.c cf_ide_test_0_1s40 line 380 Warning implicit declaration of function `IORD_ALTERA_AVALON_CF_IDE_CYLINDER_HIGH' ideutils.c cf_ide_test_0_1s40 line 381 Warning implicit declaration of function `IORD_ALTERA_AVALON_CF_IDE_DEVICE_HEAD' ideutils.c cf_ide_test_0_1s40 line 382 Error error: `CF_IDE_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 415 Error error: `CF_IDE_BASE' 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' ideutils.c cf_ide_test_0_1s40 line 513 Error error: `CF_IDE_BASE' 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' ideutils.c cf_ide_test_0_1s40 line 556 Warning implicit declaration of function `IOWR_ALTERA_AVALON_CF_IDE_SECTOR_NUMBER' ideutils.c cf_ide_test_0_1s40 line 557 Warning implicit declaration of function `IOWR_ALTERA_AVALON_CF_IDE_CYLINDER_LOW' ideutils.c cf_ide_test_0_1s40 line 558 Warning implicit declaration of function `IOWR_ALTERA_AVALON_CF_IDE_CYLINDER_HIGH' ideutils.c cf_ide_test_0_1s40 line 559 Warning implicit declaration of function `IOWR_ALTERA_AVALON_CF_IDE_COMMAND' ideutils.c cf_ide_test_0_1s40 line 566 Error error: `CF_IDE_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 591 Error error: `CF_IDE_BASE' 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' ideutils.c cf_ide_test_0_1s40 line 670 Error error: `CF_IDE_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 810 Error error: `CF_IDE_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 970 Error error: `CF_IDE_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1080 Error error: `CF_CTL_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1216 Error error: `ALTERA_AVALON_CF_CTL_STATUS_PRESENT_MSK' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1217 Error error: `CF_IDE_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1242 Error error: `ALTERA_AVALON_CF_CTL_STATUS_POWER_MSK' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1943 Error error: `CF_CTL_BASE' 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' ideutils.c cf_ide_test_0_1s40 line 1943 Error error: `CF_IDE_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1954 Error error: `CF_CTL_IRQ' 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' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1979 Error error: `CF_IDE_IRQ' 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' 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' ideutils.c cf_ide_test_0_1s40 line 1983 Error error: `CF_CTL_BASE' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1999 Error error: `CF_IDE_IRQ' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 2002 Error error: `CF_CTL_IRQ' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 2003 - Altera_Forum
Honored 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'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' 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' ideutils.c cf_ide_test_0_1s40 line 78
error error: `cf_ctl_base' 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' ideutils.c cf_ide_test_0_1s40 line 86
error error: `altera_avalon_cf_ctl_status_present_msk' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 87
error error: `cf_ide_base' 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' ideutils.c cf_ide_test_0_1s40 line 120
error error: `cf_ide_base' 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' ideutils.c cf_ide_test_0_1s40 line 165
error error: `cf_ide_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 195
error error: `cf_ide_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 216
error error: `cf_ide_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 237
error error: `cf_ide_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 257
error error: `cf_ide_base' 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' ideutils.c cf_ide_test_0_1s40 line 289
warning implicit declaration of function `iowr_altera_avalon_cf_ide_device_control' ideutils.c cf_ide_test_0_1s40 line 293
warning implicit declaration of function `iord_altera_avalon_cf_ide_sector_count' ideutils.c cf_ide_test_0_1s40 line 378
warning implicit declaration of function `iord_altera_avalon_cf_ide_sector_number' ideutils.c cf_ide_test_0_1s40 line 379
warning implicit declaration of function `iord_altera_avalon_cf_ide_cylinder_low' ideutils.c cf_ide_test_0_1s40 line 380
warning implicit declaration of function `iord_altera_avalon_cf_ide_cylinder_high' ideutils.c cf_ide_test_0_1s40 line 381
warning implicit declaration of function `iord_altera_avalon_cf_ide_device_head' ideutils.c cf_ide_test_0_1s40 line 382
error error: `cf_ide_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 415
error error: `cf_ide_base' 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' ideutils.c cf_ide_test_0_1s40 line 513
error error: `cf_ide_base' 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' ideutils.c cf_ide_test_0_1s40 line 556
warning implicit declaration of function `iowr_altera_avalon_cf_ide_sector_number' ideutils.c cf_ide_test_0_1s40 line 557
warning implicit declaration of function `iowr_altera_avalon_cf_ide_cylinder_low' ideutils.c cf_ide_test_0_1s40 line 558
warning implicit declaration of function `iowr_altera_avalon_cf_ide_cylinder_high' ideutils.c cf_ide_test_0_1s40 line 559
warning implicit declaration of function `iowr_altera_avalon_cf_ide_command' ideutils.c cf_ide_test_0_1s40 line 566
error error: `cf_ide_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 591
error error: `cf_ide_base' 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' ideutils.c cf_ide_test_0_1s40 line 670
error error: `cf_ide_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 810
error error: `cf_ide_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 970
error error: `cf_ide_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1080
error error: `cf_ctl_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1216
error error: `altera_avalon_cf_ctl_status_present_msk' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1217
error error: `cf_ide_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1242
error error: `altera_avalon_cf_ctl_status_power_msk' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1943
error error: `cf_ctl_base' 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' ideutils.c cf_ide_test_0_1s40 line 1943
error error: `cf_ide_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1954
error error: `cf_ctl_irq' 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' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1979
error error: `cf_ide_irq' 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' 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' ideutils.c cf_ide_test_0_1s40 line 1983
error error: `cf_ctl_base' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 1999
error error: `cf_ide_irq' undeclared (first use in this function) ideutils.c cf_ide_test_0_1s40 line 2002
error error: `cf_ctl_irq' 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"