Visible to Intel only — GUID: sca1728287469990
Ixiasoft
Visible to Intel only — GUID: sca1728287469990
Ixiasoft
13.3.6.2. Integrating Device Drivers with Initialization Manually
- Navigate to the <BSP project folder>/drivers.
- Separately navigate to <Quartus Prime directory>/<Version>/ip/altera/pgm/altera_s10_mailbox_client/HAL.
- Observe that both folder directories are having the same – inc and src files.
- Copy the contents of Quartus® Prime HAL folders into the BSP drivers folders respectively.
- Navigate to <Quartus Prime directory>/<version>/ip/altera/pgm/altera_s10_mailbox_client/inc.
- Copy altera_s10_mailbox_client_regs.h into the BSP drivers/inc folder.
- Verify the content of the BSP inc folder contains the files in the following figure.
Figure 24. BSP inc folder
- Verify the content of the BSP src folder contains the files in the following figure.
Figure 25. BSP src folder
- Modify the target_sources in BSP CMakeLists.txt.
- Add the following C files in the PRIVATE column:
drivers/src/altera_s10_mailbox_client.c
drivers/src/altera_s10_mailbox_client_flash.c
drivers/src/altera_s10_mailbox_client_flash_rsu.c
drivers/src/altera_s10_mailbox_client_rsu.c
drivers/src/librsu.c
drivers/src/librsu_cb.c
drivers/src/librsu_cfg.c
drivers/src/librsu_ll_qspi.c
drivers/src/librsu_misc.c
drivers/src/rsu_client.c
…
- Add the header files in the PUBLIC column.
drivers/inc/altera_s10_mailbox_client.h
drivers/inc/altera_s10_mailbox_client_flash.h
drivers/inc/altera_s10_mailbox_client_flash_rsu.h
drivers/inc/altera_s10_mailbox_client_regs.h
drivers/inc/altera_s10_mailbox_client_rsu.h
drivers/inc/librsu.h
drivers/inc/librsu_cb.h
drivers/inc/librsu_cfg.h
drivers/inc/librsu_ll.h
drivers/inc/librsu_misc.h
drivers/inc/rsu_client.h
…
- Add the following C files in the PRIVATE column:
- Modify the alt_sys_init.c in the following sections:
- Device headers.
- #include "altera_s10_mailbox_client.h"
- Allocate the device storage.
- ALTERA_S10_MAILBOX_CLIENT_INSTANCE ( MAILBOX_CLIENT, mailbox_client);
- Initialize non-interrupt controller device.
- ALTERA_S10_MAILBOX_CLIENT_INIT ( MAILBOX_CLIENT, mailbox_client);
- Device headers.
- Proceed to compile the software project.