Altera_Forum
Honored Contributor
21 years agoIntegrating device driver into HAL
I am trying to integrate a peripheral specific device driver (created by me) into the HAL.
I would like the HAL to automatically instantiate and register my device driver so I have created the appropriate directory structure and files shown in figure 5-1 of the SW Dev Manual. I have created an include file that defines the *_INSTANCE and *_INIT macros and placed it in the device’s HAL/inc directory. I have create source code files that manipulates the device and placed the files into the HAL/src directory. I have included a makefile fragment. After doing all that I have manually called the *_INSTANCE and *_INIT macros from within main() and the driver has successfully registered no problem. I cannot however get the HAL to automatically instantiate and register my device driver. That is, my *_INSTANCE and *_INIT macros are not added to the auto generated file alt_sys_init.c The question is, where should I place the driver files so that they will be picked up by the IDE ? Or, how do I tell the IDE where I have placed the driver files so they will be included ? thanks.