Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12435 Discussions

Modify/Add a new Function to existing BSP/HAL Driver

Altera_Forum
Honored Contributor II
1,196 Views

Can someone Help with the steps involved in modifying an existing bsp/HAL driver for Nios.  

I need to add few Features in the exiting driver. I cannot even add print statements as the "generate BSP" would overwrite all of my changes. 

Please provide me with detailed steps.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
112 Views

You shouldn't be changing the auto generated HAL drivers. If you want to add your own custom files start a new .h and .c files in your project folder and# include the generated HAL files (or not if you don't want to use the auto generated drivers). 

 

If you don't include a driver in your main program then it won't be used. You can make your own drivers (by including system.h) as described above.
Altera_Forum
Honored Contributor II
112 Views

Hi, I've managed to do this. I've written a very basic Avalon-Memory-Mapped component with a few registers which I wanted to incorporate into a .qsys file and be seen by a Nios. Attached in the zip file is the component "avalonmm_regspace_vhdl.hdl" and the .tcl files required to incorporate it into the hardware " avalonmm_regspace_vhdl_hw.tcl" and then the software (ie. driver) "avalonmm_regspace_vhdl_sw.tcl". In Eclipse as long as when you generate your BSP it looks into the directory containing the ..._sw.tcl file it should incorporate the driver into a "driver" directory. 

 

 

Hope this helps. 

Cindy
Altera_Forum
Honored Contributor II
112 Views

Thanks Cindy, 

I will check this out and provide you with the updates 

 

Regards 

Chandramohan
Reply