cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hezi
Contributor
Contributor
321 Views
Registered: ‎09-24-2020

AIE - printf compile variable

Jump to solution

Hi, Is there a way to switch off(disable) printf commands during compile? something similar to --profile for the emulator, just ignoring during compilation time.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
derekh
Xilinx Employee
Xilinx Employee
312 Views
Registered: ‎08-06-2018

Hi,
Have you tested using ifdefs around the prints commands ?

The top level graph input file for example uses that to only include the main function when simulating and not when cross-compiling the PS app.
To use custom define statement you may need to look up how to append your custom statement to CFLAGS to get passed to the code by compiler.

The example below is using flags used by AIE Simulator.

#ifdef __AIESIM__
int main(void)
{
  ...
}
#endif



Derek
SAE DSP and AI Engine, Xilinx Sweden/EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

1 Reply
derekh
Xilinx Employee
Xilinx Employee
313 Views
Registered: ‎08-06-2018

Hi,
Have you tested using ifdefs around the prints commands ?

The top level graph input file for example uses that to only include the main function when simulating and not when cross-compiling the PS app.
To use custom define statement you may need to look up how to append your custom statement to CFLAGS to get passed to the code by compiler.

The example below is using flags used by AIE Simulator.

#ifdef __AIESIM__
int main(void)
{
  ...
}
#endif



Derek
SAE DSP and AI Engine, Xilinx Sweden/EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post