alloc.c undefined reference to `_end'

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

alloc.c undefined reference to `_end'

1,455 Views
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 Kudos
3 Replies

1,173 Views
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 Kudos

1,173 Views
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 Kudos

1,173 Views
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 Kudos