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# 16633

3.1 EDK - There appears to be a bug in the ppc/mb compiler?? (The "volatile" keyword is possibly required in the declaration)


General Description:

A bug appears to be present in the ppc/mb compiler.


In some cases, your coding style may affect the compiler results. The "volatile" keyword is an important concept in embedded programming.

Most compilers optimize the code by assuming that a value stays in the memory unless the program changes it. General compilers feature this optimization for better performance. In embedded system applications, this may cause a problem in the shared-data code and I/O access. Make sure that you use the "volatile" keyword in the variable declaration (the "volatile" keyword is part of the C standard.) This keyword specifies to the compiler that the microprocessor must read the value from the memory location (or memory-mapped location) every time it is referenced.

AR# 16633
Date 12/15/2012
Status Active
Type General Article