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++
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussões

How to #include a driver from a IP component to my construction, in Nios II?

Hakan_H
Novato
2.381 Visualizações

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).

Hakan_H_5-1657827416368.png

 

I have also included the driver in the project as a file and as a link, (but the error remains the same).

Hakan_H_4-1657827231539.png

 

 

How do I solve this matter?

 

The project folder is: 

Hakan_H_2-1657825514406.png

 

The customer wants the driver in this directory instead:

Hakan_H_3-1657825631943.png

 

 

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

0 Kudos
1 Solução
Hakan_H
Novato
2.317 Visualizações

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.

Ver solução na publicação original

6 Respostas
hareesh
Funcionário
2.363 Visualizações

Hi Hakan_H,


Did you add the VGA IP in your platform design?


can you pls share your platform design


thanks,


Hakan_H
Novato
2.352 Visualizações

No I haven't add it. I uses my own VGA function instead of the customers IP component.

Mayby I have to add it to make it work.

I attach my construction in this message.

 

 

hareesh
Funcionário
2.341 Visualizações

Hi @Hakan_H,

first have to add VGA IP in platform design then only you use those drivers. 

thanks,

Hakan_H
Novato
2.330 Visualizações

OK, many thanks for your help. It's very valuble for me. The idea isn't to use the drivers of the VGA IP. I gonna use my own drivers for the construction instead (that I know works perfectly). But for some reason (that I don't understand), the customer wants  (demands), me to use his VGA IP to store my drivers in.

But the customer gets what the customer wants. I hope he likes the invoice I am gonna send him for the work.

I thougt it was an easy job just to link to his IP component from my construction thru an .tcl file.

The construction is almost finished and working, exept for the linking part. So I will not inplement his cunstrucktion (IP component), into mine in this stage. Becauce it will take me much more time (that I don't have at the moment).

But I will follow your tip to add his VGA IP and link to it from there. I will also com back to you with the result.

Best regards. Håkan.

hareesh
Funcionário
2.323 Visualizações

HI @Hakan_H ,

i think you got the solution, so can i close the case?

 

 If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 9/10 survey.

 

Thank you,

Hakan_H
Novato
2.318 Visualizações

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.

Responder