Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Indexer not finding symbol 'SCB->CCR'
Indexer not finding symbol 'SCB->CCR' [message #1828415] Tue, 09 June 2020 12:33 Go to next message
trampas Mising name is currently offline trampas Mising nameFriend
Messages: 43
Registered: July 2009
Member
I have some ARM M7 code which is looking at the CCR register

SCB->CCR to be specific. The indexer says it can not find CCR
"Field 'CCR' could not be resolved"

I can click on CCR and "Open Definition" and it does open the correct definition.

Does anyone have an idea why it is messing up on the SCB structure?

Thanks
Trampas
Re: Indexer not finding symbol 'SCB->CCR' [message #1828501 is a reply to message #1828415] Thu, 11 June 2020 05:37 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Can't say since there's not enough information.
There are any number of reasons why.

Are you using a plugin?

Lacking any further info some common tactics:

  • Digging through the Parser log may reveal the reason.
  • Rebuilding the index might work.
  • Turning off heuristic resolution of includes might help.
  • Changing the build configuration option (default vs. fixed) might also.
  • Is it maybe a CODAN error (usually has a bug icon)?

Can you provide a small example that others can use to replicate the problem?
Since we don't have your project files to look at you are pretty much on your own.


Re: Indexer not finding symbol 'SCB->CCR' [message #1828522 is a reply to message #1828501] Thu, 11 June 2020 10:40 Go to previous messageGo to next message
trampas Mising name is currently offline trampas Mising nameFriend
Messages: 43
Registered: July 2009
Member
I guess I should be asking if there is a way to debug this? For example you mention the parser log, how do I access that.

Thanks
Trampas
Re: Indexer not finding symbol 'SCB->CCR' [message #1828523 is a reply to message #1828501] Thu, 11 June 2020 10:46 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
The OP has not told it, but I guess that he's attempting to see a register structure definition in the chip manufacturer's headers.

Guessing some more, it seems to be from the STM hardware code headers. The headers attempt to attack all the manufacturer's chips at once, and the resulting jungle is a maze of conditional code. The OP probably does not have all the necessary symbols defined for the indexer.

I solved the problem by jettisoning both Atmel's and STM's code and by writing my own hardware structure definitions and driver code. Eclipse behaves correctly with them.


--

Tauno Voipio
Re: Indexer not finding symbol 'SCB->CCR' [message #1828524 is a reply to message #1828522] Thu, 11 June 2020 10:55 Go to previous message
trampas Mising name is currently offline trampas Mising nameFriend
Messages: 43
Registered: July 2009
Member
OK I found the bug...

When the SCB register is defined as this it works
#define SCB ((SCB_Type *) 0xE000ED00UL ) /*!< SCB configuration struct */

When it is defined like this it does not work
#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */
#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */
#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */
#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */

#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */
#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */

Thanks
Trampas

Previous Topic:GNU Tools for ARM embedded processors vs GNU MCU eclipse ARM embedded GCC
Next Topic:Code block editing
Goto Forum:
  


Current Time: Fri Apr 19 16:24:24 GMT 2024

Powered by FUDForum. Page generated in 0.02100 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top