In a group, a friend encountered a compilation issue with KEIL and hoped that group members could help him generate a hex file, offering a cup of milk tea as compensation.


Just a few clicks to compile the code and generate the hex file, I thought this was easy! With the temptation of milk tea, I decided to lend a helping hand.
The compilation error he encountered was as follows:

After unzipping his project without making any changes, I compiled it on my computer and received the following error:

It seemed to be an issue with the compilation toolchain, so I made the following changes in the settings:

After making the changes, the error persisted, and this time the error message indicated an Unknown compiler. It appeared to still be a toolchain issue.

Later, I discovered that this project used the CMSIS header files and startup files provided by KEIL.

My CMSIS CORE version is 6.1.1, so I tried selecting the compiler as ARM Compiler 6

However, it still reported a large number of errors. After some thought, I decided to simply delete the higher version of CMSIS.

Switching back to version 5:

Using ARM Compiler 5, there was only one error this time, indicating that success was within reach.

After further observation, I found that there was a problem with the configuration of the startup file in the project. After modifying one of the c files to an s file,


The compilation was finally successful:

It was learned that this friend’s project used the chip ST17H66, and the official code package Device configuration is as follows. Does it not even deserve its own name? Or is the manufacturer just too lazy..

In the end, the milk tea red envelope was received,

Not that I dislike it, I just don’t love milk tea. It’s so hot in summer, I prefer to buy an ice cream.
Follow us:
Join the embedded development group:
