213 views
in Platform Packages by
Hi,

We are trying to port our EW application from V9.30 to V11.00. After porting, during run time, our system is getting a hard fault. While debugging, the stack shows the last call was to this function - EwMathRandInt32(). Inside this function, the last hitting point was rand(). There seems to be an issue with memory allocation. (rand() function uses malloc() - which returns a data section address). We are not able to trace the location of this function call.

The same function is used V9.30 but we did not face any such issues.

Is it OK to use our own logic to generate random number inside EwMathRandInt32() or is there any other way out?

NOTE: There are no hardware changes. Only the EW upgradation is involved.

Could you please help us out.

Thanks in advance!

1 Answer

0 votes
by
Hi,

in principle it is ok to implement your own logic inside von EwMathRandInt32().

What target and what compiler are you using?

Best regards,

Manfred.
by
Our target is LPC54608 and compiler is GCC.

Could you please explain why the same function in 2 different versions of Embedded Wizard maybe causing this type of an issue?

Thank you!
by
Hello,

without doing further investigations its difficult to answer this question. Maybe there was sufficient heap available in one version so that malloc() was working. Please note that rand() is a function of the C library.

Did you change the compiler version? Did you change the linker settings?

Best regards,

Manfred

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...