Hi all,
Recently, we encountered some problems when using the ARM KEIL with RA6T2 from Renesas.
Because of the requirement from the project, we need to combine the .cpp and .c in the project.
But when we call the malloc() in the .cpp, the return address point to the on-chip flash instead of SRAM.
Please refer to https://community.renesas.com/mcu-mpu/ra/f/forum/29390/ra6t2-in-keil for the detailed information.
Is there anyone can give us some advises?
Thanks,
Regards.
Cooper
It might be worth checking if you have configured your heap region properly.
e.g. if you are not using microlib of Arm compiler toolchain, you can check these manual pages to see how to configure your heap region:
https://developer.arm.com/documentation/100748/0619/Embedded-Software-Development/Placing-the-stack-and-heap?lang=en
developer.arm.com/.../Placing-the-stack-and-heap-with-a-scatter-file
Hi ChenTang,
Thanks for your reply.
I think the scatter file isn't the problem, because I had compared the scatter files in the two projects, and they are the same.
The only difference is that
the project return invalid address consist of .c and .cpp and does not use the MicroLIB,
and the other return correct address is consist of .c and using MicroLIB.
So why the returned address will be invalid if I don't check the using MicroLIB option?
Thanks.