How to #include a driver from a IP component to my construction, in Nios II?
Hi. I have a difficult problem (task), that is for me important to solve for finishing my construktion.
I have search for any solution on the net for several months, and I need some expert help.
The most of it is already finished and tested. But the customer really needs the VGA-driver for the construction, to be saved inside his IP-component, instead of inside the project map.
When I tries to include the driver, #include <VGA_driver.h> , in the top of the main .c file (Hello world), I got the error message: hello_world.c:37:24: fatal error: VGA_driver.h: No such file or directory. When I writes the link in the .tcl file (or c-file), to the VGA driver, it expects it to be in the project folder (in the inc folder with the other .h files).
I have tried to add the link address into the makefile (but the error remains the same).
I have also included the driver in the project as a file and as a link, (but the error remains the same).
How do I solve this matter?
The project folder is:
The customer wants the driver in this directory instead:
VGA_driver_sw.tcl below:
create_driver VGA_driver_sw
set_sw_property hw_class_name VGA_driver
set_sw_property version 1
set_sw_property min_compatible_hw_version 1.0
add_sw_property bsp_subdirectory drivers
add_sw_property c_source <d://AGSTU/Kurs_C/C_engineering_job/IP/DE10_Lite_VGA_IP/HAL/src/VGA_driver.c #Alt 3. Doesn't work.
add_sw_property c_source <d://AGSTU/Kurs_C/C_engineering_job/IP/DE10_Lite_VGA_IP/HAL/src/draw_vga.c #Alt 3. Doesn't work.
# add_sw_property c_source IP/DE10_Lite_VGA_IP/HAL/src/VGA_driver.c #Alt 2. Doesn't work.
# add_sw_property c_source IP/DE10_Lite_VGA_IP/HAL/src/draw_vga.c #Alt 2. Doesn't work.
# add_sw_property c_source HAL/src/VGA_driver.c #Alt 1. Doesn't work.
# add_sw_property c_source HAL/src/draw_vga.c #Alt 1. Doesn't work.
add_sw_property include_source <d://AGSTU/Kurs_C/C_engineering_job/IP/DE10_Lite_VGA_IP/HAL/inc/VGA_driver.h> #Alt 3. Doesn't work.
# add_sw_property include_source IP/DE10_Lite_VGA_IP/HAL/inc/VGA_driver.h #Alt 2. Doesn't work.
# add_sw_property include_source HAL/inc/VGA_driver.h #Alt 1. Doesn't work.
add_sw_property supported_bsp_type HAL
I think I got the construction to work now. The errormessage has disappeared. The file seems to be found.
Thanks for all help. Hareesh, you are a hero. I have asked others about this matter. You are the one that have guided me to an solution.