棋子 · 2020年02月10日

Compiling error "system_MKL25Z4.h"

I have been trying to compile a GPIO example for the FRDM-KL25Z Arm Cortex-M0+. At the beginning I run into the problem of not finding the path for "MKL25Z4.h". After a quick search online, I found that I had to add the directory path to the project's "Include Paths" (C:/Keil_v5/ARM/PACK/Keil/Kinetis_KLxx_DFP/1.15.0/Device/Include). While this solved the error, another one came out. This time is regarding the "system_MKL25Z4.h" header file. I do not understand why this error surfaced even though I already provided the full path to the directory containing this file.

I would highly appreciate any leads on how to address this situation. Plus, more kudos, if someone could explain to me why adding the full path to the directory does not solve the problem.

Furthermore, I did think of writing the full path to the preprocessor definition inside "MKL25Z4.h". However, I think that there must be a better way to address this error.

1 个回答 得票排序 · 时间排序
极术小姐姐 · 2020年02月10日

Your title says "Linker path".

Header files are used by the compiler - not the Linker - so if you have added it in the Linker options, that's the wrong place!

Take a look at the diagrams here to see how the tools in the tool chain relate, and which files are associated with which tools.

Manuel Chavez said:
While this solved the error, another one came out. This time is regarding the "system_MKL25Z4.h" header file
You do actually have that file present on your system?

If that's in a different folder, then you also need to add that to your Includes Path.

Manuel Chavez said:
a GPIO example for the FRDM-KL25Z
Where did you obtain the example?

Have you contacted the author/supplier for support with it?

你的回答
关注数
1
收藏数
0
浏览数
1706
极术小姐姐
极术微信服务号
关注极术微信号
实时接收点赞提醒和评论通知
安谋科技学堂公众号
关注安谋科技学堂
实时获取安谋科技及 Arm 教学资源
安谋科技招聘公众号
关注安谋科技招聘
实时获取安谋科技中国职位信息