- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As the subject name says , How can i use the function "sprintf()" in PSoC Designer ,thanx!
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think the latest Imagecraft version that comes with PSD5.0 SP6 and later has printf function. But this does not show up in the C Language user guide. I will try to get some information on this.
Best Regards,
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. Basic with no long / floating point, or modifier,
2. Support for long , and
3. Support for floating point.
By default the option 1 is supported. To use option 2 or 3 the following changes are required in the compiler settings.
Support for float:
1. Open local.mk file from "Projects" tab in PSoC Designer. If local.mk file is not already available, create a text file called local.mk in the project directory.
2. At the bottom of local.mk, add CODECOMPRESSOR:=$(CODECOMPRESSOR) -lfpm8c (this will link the libfpm8c.a, which contains the floating point capability of printf/scanf with modifier support)
3. Save local.mk file and build the project.
More code and data/stack space are needed for the fully featured versions (for the support of long and float).
Support for long:
1. Open local.mk file from "Projects" tab in PSoC Designer. If local.mk file does not already exist, create a text file called local.mk in the project directory.
2. At the bottom of local.mk, add CODECOMPRESSOR:=$(CODECOMPRESSOR) -llpm8c (this will link the liblpm8c.a , which contains the long data type capability of printf/scanf)
3. Save local.mk file and build the project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am trying to use the SAR10 Module in the CY28xxx series PSoC1 and would like to convert the integer result into float and then display on LCD. I can display the count easily, but am not getting beyond this. Apart from this, I have been hunting high and low for a c..o..m..p..l..e..t..e C guide for the free included Imagecraft C compiler, but till now have only found the standard one that makes no mention of csprintf and many of the other functions found in stdio.h, etc. Where am I missing something that should be so easy to do and find???
Your help is highly appreciated.