cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
fostercl1
Contributor
Contributor
598 Views
Registered: ‎01-31-2018

Single Bootloader For Multiple Hardware Projects

Hi,

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!

0 Kudos
2 Replies
ibaie
Xilinx Employee
Xilinx Employee
522 Views
Registered: ‎10-06-2016

Hi @fostercl1,

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.

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
fostercl1
Contributor
Contributor
462 Views
Registered: ‎01-31-2018

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.

0 Kudos