2018-06-11 03:32 PM
Hi all!
I use a
https://community.st.com/tags♯/?tags=stm32f4xx
MCU and I've created a very simple project inhttps://community.st.com/tags♯/?tags=cubemx
‌ forhttps://community.st.com/tags♯/?tags=atollic%20truestudio
‌. While browsing in the project's code and files I run into a strange issue when I tried to use the __INLINE, __STATIC_INLINE or__ASM macros in the main.c file.Let's me explain better.
Since I use the CortexM4 CPU, the reference file for such as macros is the core_cm4.h one. In fact, if I try to call a macro like __CORTEX_M it regularly 'belongs' to such as file (if I open its declaration) and it appears in the drop-down menù of the TrueStudio code editor. On the other hand, the aforementioned macros are not available in the drop-down menù. In addition, they got flagged as 'syntax error' and underlined in yellow if I disregard this defect and write them entirely. As a result, the compilation does not report any message or warning!
The interested code's lines of the core_cm4.h file are (__GNUC__ is defined):
&sharpelif defined ( __GNUC__ )
&sharpdefine __ASM __asm /*!< asm keyword for GNU Compiler */ &sharpdefine __INLINE i nline /*!< inline keyword for GNU Compiler */ &sharpdefine __STATIC_INLINE static inlineEven though I move the macros' declation out of conditional statements the effect is the very same one. It seems they are not visible to TrueStudio absolutely, not even starting from a CubeMX project from scratch.
Is this a bug or I'm overlooking something?
#atollic-truestudio #cubemx #stm32f4xx