Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » 'GPIOB' could not be resolved error(STM32 Eclipse C/C++ GPIO)
'GPIOB' could not be resolved error [message #1816108] Mon, 21 October 2019 11:16 Go to next message
Maxim Andreevich Kamensky is currently offline Maxim Andreevich KamenskyFriend
Messages: 1
Registered: October 2019
Junior Member
Hello!

I'm new to eclipse. I was following several manuals to guide me through installation process. I've installed eclipse, GNU MCU plugin, JRE, arm-none-eabi-gcc, configured warkspace, even installed stlinkv2 and it works. I've generated basic code with cubeMX and imported it as Makefile GNU ARM project to eclipse. I have no errors while building project, but when I open main.c file there are several semantic errors. The compiler can not recognize everything what uses GPIO. Here is this errors:

Description Resource Path Location Type
Field '__HAL_RCC_GPIOB_CLK_ENABLE()' could not be resolved main.c /blinkyCubeMX/Src line 149 Semantic Error
Field '__HAL_RCC_GPIOB_CLK_ENABLE()' could not be resolved main.c /blinkyCubeMX/Src line 149 Semantic Error
Symbol 'GPIO_CRL_MODE0_1' could not be resolved main.c /blinkyCubeMX/Src line 158 Semantic Error
Symbol 'GPIOB' could not be resolved main.c /blinkyCubeMX/Src line 152 Semantic Error
Symbol 'GPIOB' could not be resolved main.c /blinkyCubeMX/Src line 159 Semantic Error
Symbol 'RCC_APB2ENR_IOPBEN' could not be resolved main.c /blinkyCubeMX/Src line 149 Semantic Error
Symbol 'RCC_APB2ENR_IOPBEN' could not be resolved main.c /blinkyCubeMX/Src line 149 Semantic Error
Symbol 'RCC_CFGR_HPRE_DIV1' could not be resolved main.c /blinkyCubeMX/Src line 129 Semantic Error
Symbol 'RCC_CFGR_PPRE1_DIV1' could not be resolved main.c /blinkyCubeMX/Src line 130 Semantic Error
Symbol 'RCC_CFGR_PPRE1_DIV1' could not be resolved main.c /blinkyCubeMX/Src line 131 Semantic Error
Symbol 'RCC_CFGR_SW_HSI' could not be resolved main.c /blinkyCubeMX/Src line 128 Semantic Error
Symbol 'RCC_CR_HSION' could not be resolved main.c /blinkyCubeMX/Src line 117 Semantic Error
Symbol 'RCC' could not be resolved main.c /blinkyCubeMX/Src line 149 Semantic Error
Symbol 'RCC' could not be resolved main.c /blinkyCubeMX/Src line 149 Semantic Error
Symbol 'tmpreg' could not be resolved main.c /blinkyCubeMX/Src line 149 Semantic Error
Symbol 'tmpreg' could not be resolved main.c /blinkyCubeMX/Src line 149 Semantic Error
Symbol 'tmpreg' could not be resolved main.c /blinkyCubeMX/Src line 149 Semantic Error
Type '__HAL_RCC_GPIOB_CLK_ENABLE()' could not be resolved main.c /blinkyCubeMX/Src line 149 Semantic Error
Type 'GPIO_PIN_9' could not be resolved main.c /blinkyCubeMX/Src line 152 Semantic Error
Type 'GPIO_PIN_9' could not be resolved main.c /blinkyCubeMX/Src line 155 Semantic Error
Statement has no effect '__HAL_RCC_GPIOB_CLK_ENABLE()' main.c /blinkyCubeMX/Src line 149 Code Analysis Problem

I suppose that I missed some plugins or did something wrong with toolChain configuration, but I can not figure out what's wrong. Can anyone please help?
Re: 'GPIOB' could not be resolved error [message #1816191 is a reply to message #1816108] Wed, 23 October 2019 11:46 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Those don't look like compiler errors.
GNU compiler errors have a different format.

They are likely caused by a confused Indexer or Syntax Analyzer.
Could also be something weird about your code.
But try some of the suggestions here:
https://stackoverflow.com/questions/8148235/eclipse-cdt-shows-semantic-errors-but-compilation-is-ok

One of them is to turn off the Syntax Analyzer as a last resort.

EDIT:
Found this and it superficially looks like your problem.
I only scanned it but it's more recent and might help
https://www.silabs.com/community/mcu/32-bit/knowledge-base.entry.html/2015/06/15/how_to_solve_errorm-2Mrv

[Updated on: Wed, 23 October 2019 11:52]

Report message to a moderator

Previous Topic:Skip build steps (all but linking)
Next Topic:Upgrade Confusion
Goto Forum:
  


Current Time: Sat Apr 27 02:28:43 GMT 2024

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

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

Back to the top