Hi,
I am unable to make malloc calls in the code. Can you please check it?
*************************************************
struct node
{
char data[5];
struct node *next;
}*head;
struct node *nptr;
nptr = malloc(sizeof(struct node));
*************************************************
When I move mouse tooltip on nptr in above code, I see below warning.
/*******************
Multiple errors reported.
1) Failed to execute MI command:
-var-create - * nptr
Error message from debugger back end:
value has been optimized out
2) Unable to create variable object
3) Failed to execute MI command:
-var-create - * nptr
Error message from debugger back end:
value has been optimized out
*******************/
Thanks
Mohan
Hi Mohan,
it is some error with PE Micro debugging. Try to restart S32DS. Did you also include <stdlib.h> header ?
Anyway - usage dynamically allocated memory in embedded systems - and especially in automotive industry - is not good practice.
Jiri
Hello Mohan,
which version of S32 Design Studio you use and which architecture (Power Architecture, ARM...)?
Could you please share the whole example?
Regards,
Martin