Page 1 of 1

printf/scanf, snprintf/snscanf support

Posted: Sun Jul 04, 2010 9:46 am
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

Re: printf/scanf, snprintf/snscanf support

Posted: Mon Jul 05, 2010 9:02 am
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.

Re: printf/scanf, snprintf/snscanf support

Posted: Mon Jul 05, 2010 3:05 pm
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