sprintf issue with _sbrk

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
subk1234
Level 2
Level 2
10 questions asked 10 sign-ins 10 replies posted

Hi,

 I am using the CX3 Denebola board and using the EZ-USB FX3 SDK.

 When I used sprintf() calls in the code to print floating point values, I was getting an error saying _sbrk not found. I looked up the note https://community.infineon.com/t5/Knowledge-Base-Articles/Printing-Floating-Values-using-FX3-SDK-KBA...

  and made the necessary changes.

After these changes, I get the following error. What do I need to do to resolve this issue?

../calls.c: In function '_sbrk':
../calls.c:14:29: error: '__heap_start' undeclared (first use in this function)
heap_end = (char *)&__heap_start;
^
../calls.c:14:29: note: each undeclared identifier is reported only once for each function it appears in
../calls.c:18:28: error: '__heap_end' undeclared (first use in this function)
if (heap_end + incr > &__heap_end)
^
../cycx3_uvc.c:2636:29: note: each undeclared identifier is reported only once for each function it appears in
../cycx3_uvc.c:2640:28: error: '__heap_end' undeclared (first use in this function)
if (heap_end + incr > &__heap_end)

Thanks and Regards,

Subbu

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please let me know if you have made the changes as done in USBBulkSrcSink firmware shared with the KBA and used same cyfxtx and .ld file

Regards,
Rashi

View solution in original post

0 Likes
2 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please let me know if you have made the changes as done in USBBulkSrcSink firmware shared with the KBA and used same cyfxtx and .ld file

Regards,
Rashi
0 Likes
subk1234
Level 2
Level 2
10 questions asked 10 sign-ins 10 replies posted

Hi Rashi,

Thank you for the quick response. I copied the files again correctly and it's working now.

I am able to using sprintf now.

Thanks and Regards,

Subbu

0 Likes