2017-02-22 01:50 AM
Hello All,
I am working on SPC560B54L5 controller and I am using SPC5studio version 5.2.1
I am trying to use sscanf() in my application but SPC5studio throwing the following errors, even I include stdio.h library file in my project.
undefined reference to 'close'
undefined reference to 'lseek'
undefined reference to 'read'
undefined reference to 'write'
kindly suggest in resolving the issue.
Thanks in advance,
Best Regards,
R.Santhamurthy
Solved! Go to Solution.
2017-02-24 12:55 AM
Hello Santhamuthy R ,
Several choices
1) Recompile newlib with
pcc-freevle-eabi- and some stubs
2) You can use the output formatter (a component in SPC5Studio)
3) Create a lighter sscanf.
Anyway, sscanf uses a lot of stacks and a lot of memories in the embedded world
i recommend to create a lighter sscanf or uses the output formatter.
Best regards
Erwan
2017-02-23 12:17 AM
Hello
I have moved your question to the
https://community.st.com/community/automotive-mcus-community/spc5-automotive-mcus
forum where someone should be able to assist you.Thanks
2017-02-23 04:48 AM
Hello
R.Santhamurthy ,
this toolchain ppc-freevle-eabi- is optimized for PowerPc core (e200 cores)
for your information, sscanf is working with hightec compiler not in freegcc
in pcc-freevle-eabi- you need a small work of stubs
we have a change request for this task for newlib
Best regards
Erwan
2017-02-23 06:14 AM
Hi Erwan,
Thank you very much for reply.
I understand the concern and it will very grateful if you suggest any other alternative approach for quickly fulfilling my request
Thanks,
R.Santhamurthy
2017-02-24 12:55 AM
Hello Santhamuthy R ,
Several choices
1) Recompile newlib with
pcc-freevle-eabi- and some stubs
2) You can use the output formatter (a component in SPC5Studio)
3) Create a lighter sscanf.
Anyway, sscanf uses a lot of stacks and a lot of memories in the embedded world
i recommend to create a lighter sscanf or uses the output formatter.
Best regards
Erwan