alloc.c undefined reference to `_end'

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

alloc.c undefined reference to `_end'

2,777 次查看
tangbing
Contributor I

hello! 

  want to use the malloc functionin S32k144 broad,when I  #include "stdlib.h", There is an error

Description Resource Path Location Type S32DS/arm_ewl/EWL_C/src/stdlib/alloc.c undefined reference to `_end' T-BOX-S32k line 294 C/C++ Problem”

How do I use right he malloc functionin?

0 项奖励
回复
3 回复数

2,495 次查看
martin_kovar
NXP Employee
NXP Employee

Hello,

which version of S32 Design Studio you use?

I tested malloc function in S32 Design Studio v1.3 and it works correct. Also in version 1.2 I am able to compile following code while I am using EWL library.

int *p;

p = (int *)malloc(10*sizeof(int));

Regards,

Martin

0 项奖励
回复

2,495 次查看
tangbing
Contributor I

Hello,

   I built a new project in S32 Design Studio v1.2, the use of malloc functionin, to quote the following wrong me. I am using EWL librarypro.png

0 项奖励
回复

2,495 次查看
martin_kovar
NXP Employee
NXP Employee

Hello,

I found en error in linker file, which is provided to project with SDK.

Please see the figure below and add the marked symbol to your linker file

pastedImage_1.png

Regards,

Martin

0 项奖励
回复