An error occurred after the library file was imported

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

An error occurred after the library file was imported

跳至解决方案
1,581 次查看
zenging
Contributor I

I am using S32K311, I added the library file to the project through new, after compiling, there will be an error. May I ask if there is any solution

viewfile.png

2.png3.png

0 项奖励
回复
1 解答
1,430 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

the app_callbacks.h is not visible for the Release configuration. Please check the Include paths. 

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,530 次查看
stanish
NXP Employee
NXP Employee

Hi,

This linking error indicates the data sections do not fit into internal SRAM memory.

If this happen after you add a library to the project - it may indicate that the linker does not dead-strip the unused library functions.

Could you check if the linker option is enabled: 

--gc-sections

stanish_0-1724683088057.png

enable the option and rebuild the project.

If it does not help, please check your code/data may not fit into the memory.

 

Hope it helps.

Stan

 

0 项奖励
回复
1,509 次查看
zenging
Contributor I

HI,@stanish 

As you suggested, I enabled --gc-sections and recompiled the project. When I use Debug_Flash, I can enter the debug phase normally.

97bbb590e7ba5823994d23466ee8cc5.png

However, I find that I still get an error when I use release_Flash. I want to ask how to solve it.

8f0cce10766b2e1adaaac59052742dd.png

0 项奖励
回复
1,431 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

the app_callbacks.h is not visible for the Release configuration. Please check the Include paths. 

 

0 项奖励
回复