VItis: rework project creation; include DesyRDL C header files
Adding sources
This merge request also changes the way sources are added to the project. I think this was mostly broken. Having multiple application folders within src/sw/
did not work because the whole sw/
folder was symlinked into the project folder, creating conflicts. It now works like this:
- a software application has a Tcl file, e.g.
src/sw/mb_periph/user.tcl
- that Tcl file does
addSources {./src "sources"}
. fwk will add a symlink:prj/lisa_pm_adc_sw_mb_periph/mb_periph/src -> src/sw/mb_periph/src
- that Tcl file can also do
addSources {./include "includes"}
. fwk will configure the Vitis project to search for include files on that path - the linker script must be specified manually with e.g.
addSources {./lscript.ld "linker-script"}
Side note: in the given example, application-specific header files are actually just part of the src
folder and there is no include
folder
I think this will make it possible to simplify constructs like this.
Creating projects
It is now possible to create a workspace without creating any application by omitting AppName=foo
from the foo.cfg
config file. Only the platform and domain will be created, and one can use the wizard to create a new application from a template.
We need the ability to modify some of the BSP settings in a Vitis project, especially the stdin/stdout device selection. The previous attempt by Nima in !45 was never finished.
During project creation fwk now checks for Stdin
and Stdout
constants from the cfg file. If one is found, that setting on the BSP is changed accordingly.
Using C headers from DesyRDL
fwk already has the ability to generate C header files using DesyRDL and add them to a project, but for Vitis this seemed to be broken. They are now put into their own subfolder, and that folder is is added to the project's include search path.
As a reminder, this has to be enabled by setting these variables, e.g. in the tcl/sw_project.tcl
file:
set ::fwfwk::addr::TypesToGen {h}
set ::fwfwk::addr::TypesToAdd {h}