Thank You, that worked, while watching the how to videos the guy says change the optimization level, but he was using Keil, that didn't do me any good when I was using STM32 Cube IDE, I looked for a user manual but ST didn't seem to have much.
The only other manufacturer I have experience with is Microchip, and there IDE has a lot of bugs in it, that's why I was looking at ST but it looks like 8bit for them is an after thought.