ModusToolbox 1.1 sscanf

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

cross mob
RoBe_1502026
Level 4
Level 4
25 replies posted 10 replies posted 5 replies posted

Hi,

I am trying to convert an entry from the usart (2 char buffer ) which represents a number into the uint8 value.

I have tried atoi() - i knows its not the recommended option just a habbit to try first.

then I tried sscanf() but with each, I get an error 'undefined reference to 'sscanf' and 'atoi' (tried separately )

I even enabled the   newlib-nano to see if that works. because I am not using floats, I did not enable that option.

Does anyone have a suggestion? I have looked on the forums and not much helped. Most messages recommend using sscanf()

Thanks!

Rob

0 Likes
1 Solution

Yeah,

I read in a few posts the lib is too big for a small memory.

I found some code that works.

Rob Berry

R&J control

When the power fails...

We won't!

View solution in original post

0 Likes
2 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Off the bat, have you added "#include<stdio.h>" at the top of your file? Check if that solves your issue.

Regards,

Dheeraj

0 Likes

Yeah,

I read in a few posts the lib is too big for a small memory.

I found some code that works.

Rob Berry

R&J control

When the power fails...

We won't!

0 Likes