Sysprogs forums › Forums › VisualGDB › Intellisense not working for STM32L1 projects
- This topic has 5 replies, 2 voices, and was last updated 7 years, 4 months ago by support.
-
AuthorPosts
-
June 21, 2017 at 16:46 #11551jeremyvncParticipant
Hello,
I’m trying to program using the STM32L151C6 microcontroller and branch into the lower power series of microcontrollers. However, any new project I make for embedded projects using this series of chips (stm32L1), intellisense does not work. I’m not a fan of Clang Intellisense as I really like the “peek” feature and the line completion popup of the built-in intellisense as well as the fact it feels more “integrated”. I have checked that the vs intellisense does work with the stm32F4 chips and in new c# and other c++ project types (MFC, Win32, etc). It appears to only not work in the newly created visual gdb projects (even examples) for the stm32L1 devices. The first thing I see when opening the main of a stm32L1 project is this error at the very first character of line 1: #include <stm32l1xx_hal.h>: “Error (active) command-line error: invalid macro definition: $$com.sysprogs.bspoptions.stm32.hal_legacy$$”
I tracked the error to the stm32.props file at line 18:
<PreprocessorDefinitions>ARM_MATH_CM3;STM32L151C6;flash_layout;STM32L151xB;$$com.sysprogs.bspoptions.stm32.hal_legacy$$;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>Comparing to stm32.props of a stm32F4:
<PreprocessorDefinitions>ARM_MATH_CM4;STM32F407VG;flash_layout;STM32F407xx;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>I’m trying to remove the offending macro but the top of the file says that it is automatically generated and I should “Use VisualGDB Project Properties dialog or modify Makefile or per-configuration .mak files instead.” I have searched through those places and cannot find the macro specified. However, I tried deleting the macro from the stm32.props line but the error persists even after I clean-rebuild the solution even though after re-opening the file, the macro is still gone.
Can someone help me? Is there something else I need to modify?
Thanks,
JeremyJune 22, 2017 at 18:58 #11559supportKeymasterHi,
This actually looks like a bug in our STM32 BSP. Please try locating the following lines in the BSP.XML file:
<AdditionalIncludeDirs> <string>$$SYS:BSP_ROOT$$/STM32L1xxxx/STM32L1xx_HAL_Driver/Inc</string> <string>$$SYS:BSP_ROOT$$/STM32L1xxxx/STM32L1xx_HAL_Driver/Inc/Legacy</string> <string>$$SYS:BSP_ROOT$$/STM32L1xxxx/CMSIS_HAL/Device/ST/STM32L1xx/Include</string> <string>$$SYS:BSP_ROOT$$/STM32L1xxxx/CMSIS_HAL/Include</string> </AdditionalIncludeDirs> <AdditionalPreprocessorMacros> <string>$$com.sysprogs.bspoptions.primary_memory$$_layout</string> <string>$$com.sysprogs.stm32.hal_device_family$$</string> <string>$$com.sysprogs.bspoptions.stm32.hal_legacy$$</string> </AdditionalPreprocessorMacros>
Then simply remove the line with $$com.sysprogs.bspoptions.stm32.hal_legacy$$ (ensure that you do it for the L1 definition, not F1 definition).
We will also fix this in the upcoming STM32 BSP refresh.
June 22, 2017 at 22:44 #11561jeremyvncParticipantThanks for this. I did some additional digging and F1 also has the same issue with intellisense. I went ahead and removed both lines and all works now.
Thanks again!
JeremyJune 24, 2017 at 03:51 #11570supportKeymasterHi,
Good to know it works. BTW, we have added support for the “Peek definition” feature to the Clang IntelliSense in the upcoming VisualGDB 5.2 Preview 2, and also significantly improved performance and added a special mode for diagnosing parsing time. If this sounds like something worth giving a try, let us know and we can share a build with this feature.
June 27, 2017 at 18:41 #11586jeremyvncParticipantI would definitely be up to trying out the new “peek” mode in Clang especially if it operates faster than before with variable completion.
June 28, 2017 at 07:05 #11601supportKeymasterHi,
No problem. We have just released the Preview 2 that supports Peek Definition and has improved performance. You can download it here: http://visualgdb.com/download/
-
AuthorPosts
- You must be logged in to reply to this topic.