Page 1 of 1

Compiler options

Posted: Sun Dec 09, 2012 11:18 am
by MarkW
Hello

Using FC4 with 18F device. Something i noticed which is not in any manual etc is that
even though i have selected 18F device as the processor, the compiler options remain
set as "pic16" type. Should it not be set to "pic18" type? Seems logical that there are
are obvious differences with the two types of compiler, namely org of code, int vectors etc.

Reason i ask is i am getting strange results using fmul float type function. The return
value is not what is expected.
Also in the BoostC manual there is no reference to float data types and functions. I was
thinking of inserting a C icon to use their float functions directly....but alas its like looking
for an easter egg :?

Thanx

Mark

Re: Compiler options

Posted: Sun Dec 09, 2012 11:37 am
by medelec35
Hi Mark,
Steve answered a similar question here:
http://www.matrixmultimedia.com/mmforum ... 97&#p16680


Martin

Re: Compiler options

Posted: Sun Dec 09, 2012 3:20 pm
by MarkW
Hi Martin

Thanx for the link for the pic16/18 compiler options....seems like FC is doing this
automatically.

However, i think there is a bug with the float to string function. If the resultant
float calculation is larger than integer, then the float to string result (sent as string
to 232 port), is incorrect.

All my variables using float calcs are correctly defined as float type. The calculation
is getting done, but as soon as the result is greater than +32767, the float to string
goes pear shaped.

Its the last part of my project, and has now let me down :(

Do you know what is the native C float to string syntax for the boostc compiler?
Maybe the FC function version is not good and the native function for boostc
will work. I can use the native command in C icon if only i could find the syntax
for it in the manual. The boostc manual is shall we say "lacking" in info.

Thanx

Mark