Jump to content
Sign in to follow this  
kuyars

Where Is String.h?

Recommended Posts

Hi, I'm not that new to C programming, however, in all the IDEs I've used before, I've always freely included headers such as string.h, math.h, etc. I tried finding any instance of string.h (which I'd like to use for my program), but notice that there is no such file included with the installation. How can I use string.h with SourceBoost? Thanks in advance!

Share this post


Link to post
Share on other sites
... in all the IDEs I've used before, I've always freely included headers such as string.h, math.h, etc...

For which platforms (processors) did you compile code "in all the IDEs you've used before"?

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

well, I'm a student so all the environments have already been setup for us. VisualDSP++ for the blackfin, unix programming using vi and compiling with gcc, and visual studio series are some of the environments that I've used. I realize that the admins would have setup the header files, so I'd just like to know how to setup sourceboost so that I can use the string functions, thank you.

Share this post


Link to post
Share on other sites

OK, C2C is set up for really-really small processors. We're talking 390 bytes RAM Maximum, and 8K words of flash rom. They have not implemented all the 'Standard C Library' stuff that you are used to from the big world.

 

However, there's nothing stopping you from implementing your own string handling. Just be aware that C2C has those limitations.

Share this post


Link to post
Share on other sites
OK, C2C is set up for really-really small processors.  We're talking 390 bytes RAM Maximum, and 8K words of flash rom.  They have not implemented all the 'Standard C Library' stuff that you are used to from the big world.

 

However, there's nothing stopping you from implementing your own string handling.  Just be aware that C2C has those limitations.

A want to add that there will be a few string functions included into BoostC compiler system library.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Kuyars,

 

You roll your own, but fortunately there is a lot of sample

code out there from C2C's open source heritage, including

some on Picant's page at:

 

http://www.picant.com/c2c/examples.html

 

Look the examples over, and start with one that is

appropriate for what you need. Look at the bright

side - you feel a lot of ownership in any program you

write ;)

 

As noted, this is pretty much true of the other small

device compilers, and when they do have bits from

standard libraries, they tend to be kinda expensive

spacewise to use.

 

Jim

Share this post


Link to post
Share on other sites

Thank you everyone for your help. I had wrongly assumed that all environments will have these functions for use. I did just roll my own as suggested.

 

However, I just downloaded the new SourceBoost to try the BoostC compiler. I installed it and changed the toolsuit to BoostC in the Options menu. However, it seems that all the C2C Plus functions such as disable_interrup(), clear_wdt(), set_tris_a(), etc dont work anymore. They arent recognized by the BoostC compiler. Is there any way to still use these functions or will I have to use inline assembly?

Share this post


Link to post
Share on other sites
... However, it seems that all the C2C Plus functions such as disable_interrup(), clear_wdt(), set_tris_a(), etc dont work anymore.  They arent recognized by the BoostC compiler.  Is there any way to still use these functions or will I have to use inline assembly?...

Analogues of C2C built-in functions are included into BoostC system header file (include\boostc.h) that is included via system.h header. Currently is has nop/clear_wdt/sleep inline functions and clear_bit/set_bit macros (and you are welcome to add more).

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...