Hello Raphael, 

You said:
"Wow, you were able to use sprintf from the pic16 library?!? I also just  
committed some fixes to the way stringbuffers are handled: Prior to these,  
the pointer passed into sprintf would be modified by the  
strmputchar()-routine to always point to the terminating 0 byte... Maybe  
using a global buffer instead of a local pointer saved your day so far..."

Well I researched Internet about using sprintf function in SDCC because I had 
error like "data type" in linking process. So I found something that referred 
to modify the linker file.

I'm using PIC18F4550 with Ubuntu, piklab and SDCC. So I opened 18f4550.lkr 
(/usr/share/gputils/lkr) and made the follow modifications:

DATABANK   NAME=gpr0       START=0x60           END=0x7FF
//DATABANK   NAME=gpr1       START=0x100          END=0x1FF
//DATABANK   NAME=gpr2       START=0x200          END=0x2FF
//DATABANK   NAME=gpr3       START=0x300          END=0x3FF
//DATABANK   NAME=usb4       START=0x400          END=0x7FF          PROTECTED
//DATABANK   NAME=usb4       START=0x400          END=0x4FF          PROTECTED
//DATABANK   NAME=usb5       START=0x500          END=0x5FF          PROTECTED
//DATABANK   NAME=usb6       START=0x600          END=0x6FF          PROTECTED
//DATABANK   NAME=usb7       START=0x700          END=0x7FF          PROTECTED

What I did here was set all "DATABANK" in only one block. This made possible 
use sprintf function on pic16. Note that I tried to leave USB data banks 
unchanged, but that caused same error. The point is to configure all data banks 
as one entire bank or block.

I don't know if this is what you expected to help you, but that was made 
possible to use sprintf function in pic16.

About float, nothing yet! But still trying (I think my problem is how to 
compile and install SDCC with floats enabled - I feel I can reach there ;))

Best regards, 
Alexandre Martins
---------------------------------------------------

Nao perca as melhores sugestoes para o Dia dos Namorados!
Saiba tudo em http://cupido.aeiou.pt/

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to