01-17-2019 10:27 AM
We have two nearly-identical products from the first stage, and second stage bootloader side of things. The only difference is that each project references the respective ps7_init.c file.
Ideally, we'd be able to manage this project as a single body of code, and have the correct ps7_init.c file compiled in based on the build configuration.
I've noticed that this file gets referenced in the Linked Resources tab from the Project Settings, which is not tied to a build configuration.
Is there a way to achieve this?
I've been able to add a conditional "cp" command from in a pre-build step, but that doesn't quite work - the ps7_init.c file is one step behind so the first compilation attempt will fail.
Any suggestions are greatly appreciated!
01-22-2019 12:02 AM
I don't really recall any way of having a conditional link file within Eclipse/XilinxSDK so I would say there is no a clean way to implement your use case.
As alternatives I guess you can use your current approach or modify the psu_init files to include a conditional preprocesor symbol (#ifdef design1) and use the build configuration as input.
02-01-2019 08:37 AM
We were able to achieve what we wanted through the Source Location / Link Folders menu. It will compile one ps7_init.c for one configuration, and the other version for the other configuration.