2022-03-14 08:59 AM
Hello STM32-Community,
I've got a somewhat mundane problem today. Suddenly a piece of .h file decides to give a warning. I'm using STM32CubeMX and have also rebuilt the project multiple times and I still get this warning:
Anyone knows how to fix this issue? I'm just afraid it might also be a warning which can be serious in the future.
Kind regards
crackl1ng
Solved! Go to Solution.
2022-03-14 10:59 AM
GCC is not prone to erratic behavior, gotta be an answer somewhere.
Perhaps mismatched brackets or other syntax error.
I would look at usages of HAL_GPIO_WritePin and GPIOB_BASE.
2022-03-14 09:16 AM
Something behind the curtain went out of sync, I would ignore that.
Delete all warnings in the problems view and retry.
hth
KnarfB
2022-03-14 09:20 AM
Show the code that produces the error. You don't how the call to the function.
Oh it actually is from an include. That is weird. Line 21 of main.c is #include main.h?
2022-03-14 10:18 AM
Exactly. I tried to retrace everything and went from main.c -> main.h -> stm32.... .h etc.
I have also looked where I use GPIOB everywhere and I haven't used it in any new functions. The old ones are unchanged for months.
2022-03-14 10:20 AM
They are just some other unrelated warnings from unused variables, which I use in debugging. I can also delete them, but I dont think it will resolve the issue.
2022-03-14 10:32 AM
Don't see a real issue here. What warnings do you see in the build console window? This is the authoritative gcc generated output. Everthing else is "nice to have" and probably implemented deeply inside Eclipse, while CubeIDE is only a thin crust on top of that.
hth
KnarfB
2022-03-14 10:59 AM
GCC is not prone to erratic behavior, gotta be an answer somewhere.
Perhaps mismatched brackets or other syntax error.
I would look at usages of HAL_GPIO_WritePin and GPIOB_BASE.
2022-03-16 07:10 AM
That was the solution! I confused PIN/Port Accidantly in one. I wonder why it did not mention the error there.
Thank you very much!