printf/scanf, snprintf/snscanf support

Moderator: Benj

Post Reply
Huib Koppers
Posts: 63
Joined: Fri Oct 12, 2007 5:13 pm
Location: Netherlands
Been thanked: 1 time
Contact:

printf/scanf, snprintf/snscanf support

Post by Huib Koppers »

Hello,

Can the following C funtions like sprintf / scanf or better the snprintf / snscanf supported on de ARM FlowCode Compiler for example as a checkbox in the FlowCode V4 configuration menu.

Kind Regards

Huib Koppers

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: printf/scanf, snprintf/snscanf support

Post by Benj »

Hello Huib,

It's tricky to support functionality like that across the board. What ifically do you want it to do?

Eg write to the LCD? Write to a Flash Card?

The functions we currently have allow for this same functionality but simply using call names that allow us to differentiate between the data end points.

Huib Koppers
Posts: 63
Joined: Fri Oct 12, 2007 5:13 pm
Location: Netherlands
Been thanked: 1 time
Contact:

Re: printf/scanf, snprintf/snscanf support

Post by Huib Koppers »

Hello Benj,

First i want to use it to convert Float to string to write on LCD for version V3 of ARM FlowCode.
Now i am using gcvt(FCV_FT, 9, FCV_STRING); to do the job but has the disavantage that the zero's after the point wil not be printed on LCD
I understand that using mentioned C code wil not be seen by simulation just by programming and see the results.

I don't know what features are available or supported in ARM FlowCode V4, but it would be nice to have following funtions for example split 32 bit(long) to 4 times 8 byte, unsplit 4 times 8byte to get a 32bit(long) to read or store 32bit numbers from AD or FlasCard by SPI port and next the Float to String function, String to Float function to do convertions and write to LCD which are then also available by simulation which is more convenient before programming to see the result.

Will the new ARM FlowCode V4 support mentioned functions ?

The Float2Sstring and String2Float functions are available in Pic/AVR FlowCode V4 and work very well by simulation but do not have the right precision i wanted (3 digits before the point and 6 digits after point) when programmed to the chip.
The ARM has 32bits and can perform more precise and have the possibility to do that, but only when de GNU compiler is told to support this.

So that is why i have this question to this topic

kind regards

Huib

Post Reply