This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Trouble with auto-generated code in Keil

Hi there!

I just recently decided to move to ARM based MCUs from 8-bit AVRs.

I bought myself a NUCLEO-F303K8 board to start exploring. I started with STM32CubeIDE and hated it.

So... I decided to get Keil-MDK and so far, I like it.

I installed all the device specific drivers for the whole F3 family of MCUs and in project creation, I chose the STM32F303K8T6 that is on the evaluation board.

I only included CMSIS->Core package and Device->Startup package as shown in the picture below.

I then encountered a strange problem when building the solution. It said that a header file was missing that apparently is part of HAL (I did not include any HAL libraries).

I found out that an auto-generated header file includes the option to use the HAL driver, however, I never selected any HAL library. By commenting it out.

By commenting out "#define USE_HAL_DRIVER" I got a simple blinking example to work.

However, the header file says that it should not be modified.

I must have missed the option to not use the HAL driver somewhere, but I cannot figure out where.

What am I doing wrong?

The rest of the code:

0