cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Scholar
Scholar
1,610 Views
Registered: ‎04-27-2010

Code grayed out even though define set

I am using the serial flash lib and have defined a Spansion type in the lib cfg (2018.1 SDK). But when I look at the code in the lib files it is grayed out. The XPAR_XISF_FLASH_FAMILY is defined so I dont really understand what the issue is. Thanks

 

Untitled.png

 

/* Xilinx EDK In-system and Serial Flash Library (XilIsf) User Settings */
#define XPAR_XISF_FLASH_FAMILY 5
#define XPAR_XISF_INTERFACE_AXISPI 1
#define XPAR_XISF_INTERFACE_AXISPI 1
#define XPAR_XISF_INTERFACE_AXISPI 1
#define XPAR_XISF_INTERFACE_AXISPI 1

 

 

0 Kudos
9 Replies
Highlighted
Explorer
Explorer
1,589 Views
Registered: ‎07-14-2014

Try the following from the menu:

 

Project->C/C++ Index->Rebuild (or freshen all files)

 

I've had a similar issue in the past when I know something is definitely defined but the GUI says otherwise.

 

Of course that may not be the problem but it has worked for similar things to me in the past

 

Regards

 

Simon

0 Kudos
Highlighted
Contributor
Contributor
1,585 Views
Registered: ‎07-18-2018

Hello @beandigital,

 

XPAR_XISF_FLASH_FAMILY being defined is not enough. 

You should check if it matches any of INTEL, STM, WINBOND, SPANSION, or SST value. If any of the mentioned parameters has value of 5, then this block should not be grayed out. You check that, simply hover your mouse cursor on each of them to see their values.

 

\Razi
-- Don’t forget to Reply, Kudo, and Accept as Solution --
0 Kudos
Highlighted
Scholar
Scholar
1,572 Views
Registered: ‎04-27-2010

Simon, thanks but that didnt work
Razi, it does match the SPANSION value. When I debug the code it goes into that code, its just that its displayed grayed out
0 Kudos
Highlighted
Scholar
Scholar
1,529 Views
Registered: ‎04-13-2015

@beandigital

 

It's likely due to the optimization level.

The higher the optimization level, the more difficult it becomes for SDK to display the debug info.

You will also likely see when single stepping it goes all over the place.

 

Highlighted
Xilinx Employee
Xilinx Employee
1,407 Views
Registered: ‎10-06-2016

Hi @beandigital,

Did you solve the issue? or just you are able to live with it? I'm quite interested if you found what was going wrong.

Regards
Ibai

Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Visitor
Visitor
1,255 Views
Registered: ‎10-23-2008

I've seen the same thing in my SDK 2018.2 project using xilisf libarary v5.8. 

 

Somehow the project is not seeing the xparameters.h file (referenced in xilisf.h), which is where XPAR_XISF_FLASH_FAMILY and XPAR_XISF_INTERFACE_XXX defines are set during generate BSP sources.

 

All the paths to includes and libs are set in project but the code is still grayed out for debug or release.

I haven't figured it out yet. The code appears to build properly.

 

Artix-7

FLASH: Micron MT25QL256

BTW xilisf v5.11 is broken for MT25QL256 parts, MT25QL128 works.

 

 

Chad

 

 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
1,150 Views
Registered: ‎12-21-2016

Grayed out is just a visual issue, otherwise the code works fine without any issue. This is a pure eclipse problem. Future upgrade of eclipse might solve this issue. 

Regards,
Raju
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.

0 Kudos
Highlighted
Visitor
Visitor
185 Views
Registered: ‎04-26-2017

Hi,

Is there any progress on this? It looks like if I do define in Project C/C++ options it shows active code under define as inactive.

0 Kudos
Highlighted
Visitor
Visitor
177 Views
Registered: ‎04-26-2017

Sorry, will answer to myself:

Preferences->Indexer->Use active build configuration 

fixed it for me

0 Kudos