Forum Discussion
Altera_Forum
Honored Contributor
19 years agoHere I am again.
I still can't get it to work and have even more questions now. All makefiles are generated by the IDE, first the makefile in the Debug directory is created; this file says this: -------------------------------------------------------------------------------------------------# Every subdirectory with source files must be described here SUBDIRS := altera_avalon_lcd_ks0713/HAL/src # Include the makefiles for each source subdirectory -include ${patsubst %, %/subdir.mk, $(SUBDIRS)} MAKEFILE_LIST += $(patsubst %, %/subdir.mk, $(SUBDIRS)) ------------------------------------------------------------------------------------------------- So this is (what I think) what's happening: The auto generated subdir.mk file is included here. This file is located in a subdir of the Debug directory: "altera_avalon_lcd_ks0713/HAL/src". The content of this file is this: ------------------------------------------------------------------------------------------------- C_SRCS += ${addprefix altera_avalon_lcd_ks0713/HAL/src/, altera_avalon_lcd_ks0713.c } CXX_SRCS += ${addprefix altera_avalon_lcd_ks0713/HAL/src/, } ASM_SRCS += ${addprefix altera_avalon_lcd_ks0713/HAL/src/, } ------------------------------------------------------------------------------------------------- So now the compiler will compile this file. But when the file is being compiled, it can't locate the associated header files: "altera_avalon_lcd_16207.h" and "altera_avalon_lcd_ks0713_regs.h". It doesn't use the header file I created, but the one provided by altera, and I just can't get it work. When I take al look at the generated_all.mk file (Located in the system_description directory) a variable called "COMPONENTS_DEVICE_DRIVERS" is made, but with the driver provided by altera located at "/cygdrive/c/eda/altera/quartus60/sopc_builder/components/altera_avalon_lcd_16207" and not with the driver I created. I've read the instructions from altera in the software developer's handbook several times, and I don't know what I do wrong. I've created a directory called "altera_avalon_lcd_ks0713" in the system library directory, and created the subdirs "HAL/inc", "HAL/src" and "inc". I've created a header file called "altera_avalon_lcd_ks0713_regs.h" in the "inc" subdir. I've created a header file called "altera_avalon_lcd_16207.h" in the "HAL/inc" subdir. And I've created a source file called "altera_acalon_lcd_ks0713.c" in the subdir "HAL/src". I've also changed the names to 16207, but this doesn't matter. The instructions from altera says that the system library directory is seached first to locate a header file with the corresponding name from the SOPC builders component. And when the IDE found one, it skips the original driver. But this is not what's happening. I also created the component.mk file in the HAL/src directory with the following contents: ------------------------------------------------------------------------------------------------- C_LIB_SRCS += altera_avalon_lcd_ks0713.c INCLUDE_PATH += altera_avalon_lcd_ks0713/inc ------------------------------------------------------------------------------------------------- I tried various things but I can't get it compiled with the right driver. So I hope someone could give me the right tip. Please help me, I realy need this to work. Best regards, Ronald