UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 22480

12.1 EDK - Are there target-specific definitions for the MicroBlaze and PowerPC processors?

Description

Are there target-specific definitions for the MicroBlaze and PowerPC processors in the GNU compiler?

Solution

There are target-specific #defines built into mb-gcc and powerpc-eabi-gcc compilers. Following is an example piece of code to demonstrate usage for MicroBlaze and PowerPC, respectively:

#if defined(__PPC__)

if (hdr->ih_arch != IH_CPU_PPC)

#elif defined(__MICROBLAZE__)

if (hdr->ih_arch != IH_CPU_MICROBLAZE)

#else

# error Unknown CPU type

#endif

Linked Answer Records

Master Answer Records

Answer Number Answer Title Version Found Version Resolved
34609 12.x EDK - Master Answer Record List N/A N/A
AR# 22480
Date Created 09/04/2007
Last Updated 12/15/2012
Status Active
Type General Article
Tools
  • EDK - 11.5
  • EDK - 12.1
  • EDK - 12.2