I can't operate with floats, I have an error in asm
file such us:
trabajo.asm:874:Error [113] Symbol not previously
defined (___fsmul).
trabajo.asm:900:Error [113] Symbol not previously
defined (___fsmul).
trabajo.asm:924:Error [113] Symbol not previously
defined (___fsmul).
trabajo.asm:950:Error [113] Symbol not previously
defined (___fsmul).
trabajo.asm:974:Error [113] Symbol not previously
defined (___fsmul).
trabajo.asm:1000:Error [113] Symbol not previously
defined (___fssub).
trabajo.asm:1024:Error [113] Symbol not previously
defined (___fsadd).
trabajo.asm:1048:Error [113] Symbol not previously
defined (___fssub).
make.exe: *** [trabajo.o] Error 1
It's just multiplicating or dividing, not with
complex operations.
I'm working with PIC 16f876A, and I can't even use
math.h
e-mail: tanok.barracus@gmail.com
Thanks a lot
Logged In: NO
floats will be supported if pic14 port supports unions. The
union float_long is required in some operations and pic14
port doesn't handle unions!
This is a big deal, so I believe fixing this issue, pic14
can handle successfully floats, unless we have another issue
related to internal representation of floats in the uC
structures...
Logged In: YES
user_id=1115835
The pic14 port is currently missing the required support
routines (__fssub, __fsmul, ...) to deal with floats.
I guess using floats on a device as small as a pic14 device
does not make much sense, but I will add the functions
nonetheless. Should be there within the week... I hope...
Regards,
Raphael
Logged In: NO
Correction about unions... the pic14 port supports, but
all variables must be declared static! (Deviation from
ANSI?) I moved all _fs things from lib/src, to libsdcc
inside pic/ and run make again. Some errors ocurred but
mitigated revoking some volatiles and putting "static"
before any "union" type var declaration.
Also There are duplicated symbols that is being generated
by sdcc during compilation that makes gpasm to fail. To
solve this I edited manually the .asm amd compiled it
(using gpasm).
As far as I know, it's working fine (I didn't do
regression tests, maybe I write one!)
Logged In: YES
user_id=1115835
Floating point support has now been added to PIC14, but
beware: Due to register allocation problems and code page
selection problems (still to to further investigated) this
is to regarded more as a technology demo than production
quality code. I just managed to get one FP operation (add,
sub od mul) execute correctly, further applications jump
into nirvana...
Div loops endlessly, mod is untested, but if you want to
give it a try, it's part of SDCC r4250.
Keeping this report open for now,
Raphael
BTW: Support for local variables has been added, too!
Logged In: YES
user_id=1115835
Oh, I forgot to mention: Currently you need to manually link
against libm.lib when using more advanced mathematics
(again: highly untested).
Just thougth you might want to know...
Regards,
Raphael