Eclipse does not recognize symbols when using arm-none-eabi-gcc compiler

82 views
Skip to first unread message

chr....@gmail.com

unread,
Jul 7, 2020, 2:43:14 AM7/7/20
to cmake4eclipse user mailing list
  • Windows 10 Version 1809
  • Eclipse IDE for C/C++ Developers
    Version: 2019-06 (4.12.0)
    Build id: 20190614-1200
  • cmake4eclipse 2.1.1
  • cmake version 3.17.0
  • GNU Make 4.2.1


When using the arm-none-eabi-gcc compiler, the Eclipse C/C++ Editor does not recognize my symbols set in the CMakeLists.txt.
...
if(1)
 
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
else()
 
set(CMAKE_C_COMPILER gcc)
endif
()
...



When using the gcc compiler, the Eclipse C/C++ Editor does recognize my symbols set in the CMakeLists.txt.
...
if(0)
 
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
else()
 
set(CMAKE_C_COMPILER gcc)
endif
()
...


Any ideas what's the problem here?

Kind regards,
Christian

chr....@gmail.com

unread,
Jul 7, 2020, 2:45:51 AM7/7/20
to cmake4eclipse user mailing list
Remark: in both cases building the project is working.

chr....@gmail.com

unread,
Jul 8, 2020, 3:44:22 AM7/8/20
to cmake4eclipse user mailing list
Apparently it was caused by the path to the compiler:
"...\IDE_V3.2.2.13\arm_tools\bin\arm-none-eabi-gcc.exe"
-> dots in the folder name IDE_V3.2.2.13

With moving arm_tools folder, the Eclipse Editor recognized the symbols.

It gave me these warnings: (in the sample project I have not defined the entry symbol Reset_Handler)

Thanks Martin for your hint. ;-)

chr....@gmail.com

unread,
Jul 9, 2020, 7:51:03 AM7/9/20
to cmake4eclipse user mailing list
Further problem:

The indexer was set to "Use a fixed build configuration".
That's why I could build in different configurations, but the Editor always showed the flag values of my specified configuration (=Debug).

It should be possible to use project specific (PS) indexer settings, but...
There is a bug within Eclipse which leads to an unintuitive behaviour of the indexer (see bug 205299):
  • WS: Window > Preferences > C/C++ > Indexer > Build configuration for the indexer: Use the build configuration specified in the projects's indexer settings
  • PS: Project Properties > C/C++ General > Indexer > User active build configuration
Solution: Use workspace specific (WS) indexer settings: Use active build configuration

chr....@gmail.com

unread,
Jul 10, 2020, 12:44:52 AM7/10/20
to cmake4eclipse user mailing list
If there is a whitespace " " in the path to the compiler, the Eclipse editor also does not recognize the symbols set in CMakeLists.txt.
set(CMAKE_C_COMPILER "C:/Users/cwalch1/Desktop/gcc-arm-none-eabi 8-2019-q3-update-win32/bin/arm-none-eabi-gcc.exe")

The warning is the same as described in my post on 8. July:

Without whitespaces it's working fine.

Conclusion:
- the path to the compiler must not contain whitespaces or dots.
- consider the Eclipse settings for the indexer (see prevoius post)
Reply all
Reply to author
Forward
0 new messages