Hello
Dear Sir/Madam
I imported MPC574xB-C-G sample application already downloaded from "NXP.com/Autosar", into S32 design studio for PowerPC. I did set the TOOLCHAIN parameter equal to "diab" in the makefile, and launch.bat in build command. Then I clean and build the project. It did generate the elf file successfully without errors. But then I did an integer to float array casting like this:
usnigned short array_i[2] = {0};
float array_f[2] = {0};
......... array_f[0] = (float) array_i[2];
Seems its okay in C language syntax and rules, but it generates warning and errors here. for more information I attached some files from errors.
By the way i did this in online C compilers and it didn't produce any errors. I guess the problem goes back to diab compiler. And its good to know that I use Diab Compiler Version 5.9.6.2 Evaluation.
Regards,
Ehsan
Hi Ehsan,
Beside the linker issue - your array of unsigned short can hold two short values (array is size of two). With index 2 ( array_i[2]; ) you are outside of allocated memory.
Jiri
Hi Ehsan,
This error is rather related to the linker not the compiler. I suspect there is a standard C library missing to be linker with your project. The standard C fucntion such as casting uint to float ("utof") cannot be found.
I'd check if a standard library is available in diab toolchain and try to include it into the project.
Hope it helps.
Stan
@stanish
Hello
Thanks for your reply.
It's Very strange to me. I am waiting for your response.
Regards,
Ehsan