System Workbench for STM32

Unexpected type errors on repeated builds


I’m trying to combine HAL and SPL in my project. I understand this might not be the best idea, but I just wanted to merge something generated from CubeMX (thus HAL based) with the Standard Peripheral Library, which I do prefer to do most of the stuff.

When I have realized that HAL and SPL code might use the same names for types (such as GPIO_InitTypeDef), I made my best to only include headers I really need and I have also renamed the SPL types for names that were still in conflict (->SPL_GPIO_InitTypeDef). This did not seem to work, but after restarting the Ac6 IDE, the build succeeded as I would expect. But when I tried to rebuild again, without any code change, then I got again the same list of errors, complaining that members of GPIO_InitTypeDef couldn’t be resolved. Another restart of IDE and another successful first build followed by errorneous build attempts...

Could anybody please advise how to get rid of this issue? Is there any kind of option to be enabled/disabled in the IDE that could help me? (Such as disabling some kind of indexing or another reason why Ac6/Eclipse suddenly sees conflicting type definitions?).

Also, as a side question: why does STM use the same names for types/macros/etc. in both HAL and SPL? This kind of issues could be easily avoided by prefixing the names with HAL_/SPL_...

Thank you in advance for your help

Okay, after getting back to the issue, I have realized that I have added include paths in the “C/C++ general -> Preprocessor Include paths” leading to the modified SPL headers into the Assembly language section, not to GNU C. After fixing it, I can build my project normally, sorry for the post.
I can’t find a delete button for the post though. If it can’t be deleted, please lock it...


Newest Forum Posts

  1. Write option bytes by Just1M, 2019-04-24 11:34
  2. Write option bytes by ihouses, 2019-04-24 08:26
  3. Update vs. install version discrepency by christelle.burguera, 2019-04-23 10:06
  4. Variables by anthony@churchillnavigation.com, 2019-04-22 16:52
  5. Symbol 'SysTick_IRQn' could not be resolved by bart@engine27.be, 2019-04-22 12:56
  6. Update vs. install version discrepency by gbabecki, 2019-04-19 19:41
  7. failed to install drivers while tried to install STM32 workbench on windows 8.1 pro by saidattu32, 2019-04-19 19:13
  8. STemWin Trainning Video - Can't find lab file by agiles chroms, 2019-04-19 18:53
  9. System Workbench for STM32 v2.9.0 release by vionf, 2019-04-19 10:06
  10. Update vs. install version discrepency by dautrevaux, 2019-04-19 08:45

Last-Modified Blogs