Re: [Sdcc-user] A Question About support of AVR

2009-07-27 Thread Sébastien Lorquet
your question was answered a few days ago. See here: http://sourceforge.net/mailarchive/message.php?msg_name=5B96C97B1988A4419C8FED50FF66A29B086095%40exchbj02.viatech.com.bj Regards, Seb On Mon, Jul 27, 2009 at 1:13 PM, PowerMan wrote: > *Hello, I am looking for a compiler for AVR, > but I not

Re: [Sdcc-user] 8051 booting query with SDDC binary

2009-07-30 Thread Sébastien Lorquet
your attachements got lost. I think you know it: the hex file is not a binary image. the interpreted contents has to be loaded in ROM at address zero, the read strobe for code memory is /PSEN, not /RD. Just use google to learn how to unpack ihx data to binary if needed. I did not know this compan

[Sdcc-user] asctime for pic18 (or other) ?

2010-01-10 Thread Sébastien Lorquet
Hi all, first of all, huge thanks for sdcc. I'm making a project with a pic 18f452. I'm using the mplab + sdcc integration I found on the web. All is well, except that now my project gets "real" and I need asctime(), and this function is not defined. Here is my linker command line: Executing: "C

Re: [Sdcc-user] asctime for pic18 (or other) ?

2010-01-10 Thread Sébastien Lorquet
2010 at 12:24 AM, Sébastien Lorquet wrote: > Hi all, > > first of all, huge thanks for sdcc. > > I'm making a project with a pic 18f452. > I'm using the mplab + sdcc integration I found on the web. > All is well, except that now my project gets "real" an

Re: [Sdcc-user] asctime for pic18 (or other) ?

2010-01-11 Thread Sébastien Lorquet
Hi, ACK. But adding the related routines to my project lead to another problem: sprintf was not implemented as well. And then, what's this? http://sdcc.svn.sourceforge.net/viewvc/sdcc/trunk/sdcc/device/lib/time.c?revision=5507&view=markup Why do we need device specific versions?

Re: [Sdcc-user] asctime for pic18 (or other) ?

2010-01-11 Thread Sébastien Lorquet
GIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Sébastien Lorquet schrieb: > > > Why do we need device specific versions? > > Device-specific versions of library functions exist for two reasons: > > - - Compiler bugs: Some ports are not yet able to compile the library >

Re: [Sdcc-user] asctime for pic18 (or other) ?

2010-01-11 Thread Sébastien Lorquet
status update. just to be sure, i did the following -add time.c from the *latest svn revision* to my project (just svn update 'ed minutes ago) -add -llibc18f.lib to the linker command line I forgot the second step before. result: The project built fine, without a change in time.c what error did

Re: [Sdcc-user] asctime for pic18 (or other) ?

2010-01-11 Thread Sébastien Lorquet
On Mon, Jan 11, 2010 at 1:14 PM, Raphael Neider wrote: > Hi, > > > I *will* code the time functions and contribute them, because I need > > them: > > -asctime > > -difftime > > -probably also time_t / struct tm conversions > > > > How should I proceed? Write the in the lib/src/pic16 directory, th

Re: [Sdcc-user] how to define a bit in a sfr?

2010-01-31 Thread Sébastien Lorquet
hi, what about: __sbit__ at (0xD7) CY; ? On Sun, Jan 31, 2010 at 10:16 AM, Grissiom wrote: > Hello all, > > I want to define a sbit in a sfr. Here is the code, which is for a 8051: > > __sfr __at (0xD0) PSW; > __sbit __at (PSW + 7) CY; > ... > > But sdcc(20100130-5661) complains: > > error 2:

Re: [Sdcc-user] Difficulty with GPSIM and SDCC

2010-02-02 Thread Sébastien Lorquet
Did you succeed with source debugging using mplab and sdcc? I didn't. Regards Sebastien On Tue, Feb 2, 2010 at 9:37 AM, Vaclav Peroutka wrote: > You can try to run MPLab under Wine. Anyway I personally have not tried > that. > > Vaclav > > > > > What Linux alternative to GPSIM does support C so

Re: [Sdcc-user] strange problem with passing variables on stack (mcs51, --auto-stack, large memory model, w/ bank switching)

2010-02-26 Thread Sébastien Lorquet
probably off topic, sorry, but what I miss in the 8051 port is a 16 bit-stack pointer in xdata mode :( On Fri, Feb 26, 2010 at 9:30 AM, Anthony Asterisk < anthony.aster...@gmail.com> wrote: > Oh GREAT!!! > > I'll give it a try tomorrow, thanks! > > a* > > > Maarten Brock wrote: > > I think you m

Re: [Sdcc-user] strange problem with passing variables on stack (mcs51, --auto-stack, large memory model, w/ bank switching)

2010-02-26 Thread Sébastien Lorquet
Oh, that's a pretty cool idea ! Thanks for the tip! Sebastien :-) On Fri, Feb 26, 2010 at 12:38 PM, Frieder Ferlemann < frieder.ferlem...@web.de> wrote: > Hi Sébastien, > > Am 26.02.2010 10:02, schrieb Sébastien Lorquet: > > probably off topic, sorry, but what I mis

Re: [Sdcc-user] What is the efficient way to get the high/low byte of a 16bit int?

2010-03-30 Thread Sébastien Lorquet
Hi, Aren't the (shortValue&0xFF) and (shortValue>>8) optimized ? I think they are, at least for pic16. Sebastien On Tue, Mar 30, 2010 at 10:10 AM, Kustaa Nyholm wrote: > Classically this has been done in C by defining a union of two chars and a > short or int, something like: > > typedef union

Re: [Sdcc-user] Visual debugging of '51 under Windows - first steps

2010-06-20 Thread Sébastien Lorquet
Hi, to save spacetime, XMing may be interesting: http://sourceforge.net/projects/xming/ However, ddd does not seem to exist for mingw/msys, or I missed it :( Regards Sebastien On Sat, Jun 12, 2010 at 6:44 PM, Borut Razem wrote: > Jan, > > you could put this on the SDCC wiki... > > Borut > > >

Re: [Sdcc-user] Example or tutorial for I2C usage with PIC

2010-07-07 Thread Sébastien Lorquet
Hi, Your message made it to the list :) I'm searching the same information for PIC18. Sebastien On Wed, Jul 7, 2010 at 3:30 PM, Laurent FAILLIE wrote: > Hello, > > I googled but w/o success ... can someone point me out a tutorial or at > least an example of I2C slave programming with SDcc on

Re: [Sdcc-user] Example or tutorial for I2C usage with PIC

2010-07-07 Thread Sébastien Lorquet
ed, Jul 7, 2010 at 4:07 PM, Sébastien Lorquet > wrote: > > Hi, > > > > Your message made it to the list :) > > > > I'm searching the same information for PIC18. > > > > Sebastien > > > > On Wed, Jul 7, 2010 at 3:30 PM, Laurent FAILLIE &

Re: [Sdcc-user] Example or tutorial for I2C usage with PIC

2010-07-07 Thread Sébastien Lorquet
And reading the app note (AN734) reveals the modifications required for PIC18. Sebastien On Wed, Jul 7, 2010 at 9:57 PM, Sébastien Lorquet wrote: > Thanks, nice. > > For PIC16, I just found that: > > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=18

Re: [Sdcc-user] Example or tutorial for I2C usage with PIC

2010-07-08 Thread Sébastien Lorquet
sdcc uses gpasm as backend, if gpasm is compatible with mplab then you're done. Or you can just translate the microchip AN register accesses into sdcc c code. Regards Sebastien On Thu, Jul 8, 2010 at 1:06 PM, Laurent FAILLIE wrote: > Bonjour Michelle, > >> Why not use the sample sources provide

Re: [Sdcc-user] Example or tutorial for I2C usage with PIC

2010-07-08 Thread Sébastien Lorquet
Hi, this is code for a master I2C device. We're talking about slaves here. Make the PIC behave as an I2C device like an EEPROM or something like that. Yes that's a bit trickier, even with hardware support :) Sebastien On Thu, Jul 8, 2010 at 2:47 AM, wrote: > Quoting "Laurent FAILLIE" : > >> He

Re: [Sdcc-user] Example or tutorial for I2C usage with PIC

2010-07-09 Thread Sébastien Lorquet
On Fri, Jul 9, 2010 at 3:25 PM, Laurent FAILLIE wrote: > Thanks Robert :) > I'll keep also this mail which help me for my server coding (on a PC under > Linux). > > But my concern is using this PIC as a slave. Any code for that ? > Nothing new since http://github.com/texane/pic18f_i2c from fabie

Re: [Sdcc-user] Example or tutorial for I2C usage with PIC

2010-07-15 Thread Sébastien Lorquet
hi, Here is the picture of the PIC that will be a I2C slave. The encoding wheel defines the slave address' LSbits. http://www.mirari.fr/vF00 the console will help with debugging :) coupled with the DAC this will make a configurable AFSK modulator. I'm now working on the firmware, using SDCC in

Re: [Sdcc-user] Can specify serial input baud to uCsim S51?

2010-07-16 Thread Sébastien Lorquet
hi, giving away a write enabled svn access on a worldwide public mailing list is not exactly the right way to do it... at least you could make it read only! Do you realize how fast your repository could be screwed with gazillons of useless commits, eating up disk space with huge binary files? re

Re: [Sdcc-user] Can specify serial input baud to uCsim S51?

2010-07-16 Thread Sébastien Lorquet
' work visible, while retaining full control on your server. Regards Sebastien On Fri, Jul 16, 2010 at 12:22 PM, 谢继雷 wrote: > On 2010-7-16 16:34, Sébastien Lorquet wrote: > > hi, > > > > giving away a write enabled svn access on a worldwide public mailing > > list

Re: [Sdcc-user] Example or tutorial for I2C usage with PIC

2010-07-19 Thread Sébastien Lorquet
Hi, appnote 736 has additional information about I2C slave inner workings, including flow charts. http://ww1.microchip.com/downloads/en/AppNotes/00736a.pdf Sebastien -- This SF.net email is sponsored by Sprint What will

[Sdcc-user] interrupts in pic18

2010-07-19 Thread Sébastien Lorquet
hi, i'm playing with interrupts in pic18. in main.c I have: #include SIGHANDLER(i2c_slave_isr); //forward declaration, implementation is elsewhere DEF_INTHIGH(high_int) DEF_HANDLER(SIG_SSP, i2c_slave_isr); END_DEF -

Re: [Sdcc-user] interrupts in pic18

2010-07-19 Thread Sébastien Lorquet
PS: I have SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.9.4 #5599 (Dec 18 2009) (MINGW32) Sebastien -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G pho

Re: [Sdcc-user] interrupts in pic18

2010-07-20 Thread Sébastien Lorquet
e_isr); fails with: main.asm:247:Error [113] Symbol not previously defined (_i2c_slave_isr). main.asm:247:Error [113] Symbol not previously defined (_i2c_slave_isr). The errors are different! And the messages are even formatted differently :-) Regards Sebastien On Tue, Jul 20, 2010 at 9:36 AM, Roel Adri

Re: [Sdcc-user] interrupts in pic18

2010-07-20 Thread Sébastien Lorquet
Hi, Thanks for the clarification, I understand the problem. writing "extern isr_name;" is perfectly fine for me, just had to know it! Would that make its way into the documentation as a tip? could this be implemented as a #pragma symbol USED or another declarator attribute one day or another? R

Re: [Sdcc-user] Example or tutorial for I2C usage with PIC

2010-07-25 Thread Sébastien Lorquet
Hi, I got the i2c slave working, based on the explanations from the application note AN734. My code emulates a 128 bytes RAM. You can read and write registers. To write, use: START ADDR+W REG_ADDRESS_BASE DATA DATA DATA... STOP ADDR+W is the slave address with the LSB cleared (write) REG_ADDR_BA

Re: [Sdcc-user] Example or tutorial for I2C usage with PIC

2010-07-30 Thread Sébastien Lorquet
The code I gave was quite complete. here is some uart code; for ease of use it is not interrupt driven. This is FAR more simpler than an i2c slave. a few more LOC are needed for a main() that calls initialization methods, set pin directions, and globally enable interrupts you also need a DEFINE_IN

Re: [Sdcc-user] Example or tutorial for I2C usage with PIC

2010-08-01 Thread Sébastien Lorquet
Additional note: for a PIC18 with an EUSART, like the pic18f4455 or 18f4685, you need to ensure that the BRG16 bit in BAUDCON is cleared. I just solved a problem related to that. Sebastien On Fri, Jul 30, 2010 at 5:24 PM, Laurent FAILLIE wrote: > Thanks again :) > > > >

Re: [Sdcc-user] SDCC book

2010-08-23 Thread Sébastien Lorquet
http://sdcc.sourceforge.net/doc/sdccman.html/ also available in pdf format. 2010/8/23 Marcus Fazzi (Anunakin) > Are there any SDCC Book? or eBook? > > -- > Marcus Fazzi > オープンソースコード いきかた! > http://anunakin.blogspot.com/ > http://www.vivaphp.net > > > ---

Re: [Sdcc-user] SDDC LATB vs PORTB

2010-08-23 Thread Sébastien Lorquet
pic doc On Mon, Aug 23, 2010 at 6:59 PM, Marcus Fazzi (Anunakin) wrote: > What diff LATB and PORTB? > > -- > Marcus Fazzi > オープンソースコード いきかた! > http://anunakin.blogspot.com/ > http://www.vivaphp.net > > > -- > This SF.net

[Sdcc-user] pic16 without stack

2010-08-25 Thread Sébastien Lorquet
hello, I have a question about something I didn't find in the manual. With the pic16, we automatically have a stack. The resulting code is huge. char foo(char c, char d) { return c+d; } generates: ; ; Starting pCode block S_main__foocode _foo: ;.line81; main.cchar foo(char c, ch

Re: [Sdcc-user] pic16 without stack

2010-08-25 Thread Sébastien Lorquet
n On Wed, Aug 25, 2010 at 3:05 PM, KHMan wrote: > On 8/25/2010 8:03 PM, Sébastien Lorquet wrote: > > > > With the pic16, we automatically have a stack. The resulting code > > is huge. > > [snip] > > > > This is a very big overhead. and every movff counts fo

Re: [Sdcc-user] About SDCC AVR

2010-10-13 Thread Sébastien Lorquet
Hi, I agree what you mention are valuable reasons. and I don't have time either :( Why not file a GSoC project to enhance this port LOL? Sebastien On Wed, Oct 13, 2010 at 3:23 PM, Jan Waclawek wrote: > Value of AVR port of SDCC would be the significantly higher flexibility of > SDCC than GCC,

Re: [Sdcc-user] cc2431 header file contribution

2010-11-23 Thread Sébastien Lorquet
what about an inclusion like this: basiccpu.h #define something extendedcpu.h #include "basiccpu.h" #define someotherthing ? Sebastien On Tue, Nov 23, 2010 at 1:31 PM, Maarten Brock wrote: > Hi George, > > I'm also not sure what is best. I try not to create too many redundant > header files i

Re: [Sdcc-user] Is pic16f1824 supported

2011-02-07 Thread Sébastien Lorquet
Don't we have free compilers for the msp430 architecture already? to begin, is it harvard or von neumann? Sebastien On Mon, Feb 7, 2011 at 6:50 PM, Harley Laue wrote: > On Mon, Feb 7, 2011 at 11:01 AM, Mark Rages wrote: >> On Mon, Feb 7, 2011 at 3:53 AM, Suco wrote: >>> Hello, >>>   I'm develo

Re: [Sdcc-user] Question about ADuC841 programming

2011-02-12 Thread Sébastien Lorquet
on debian the package is "apt-get install tofrodos". Sebastien PS: didn't know this english expression: http://en.wikipedia.org/wiki/Teaching_grandmother_to_suck_eggs it's quite funny! On Sat, Feb 12, 2011 at 5:50 PM, Rod Boyce wrote: > I have seen a similar problem with LPC900 chips, try con

Re: [Sdcc-user] error 2:Initializer element is not constant?

2011-03-24 Thread Sébastien Lorquet
GCC is better designed for CPUs where all the different memories (RAM, ROM, etc) are accessible in an homogenous manner, such as x86 , ARM, MIPS, PIC and 8051, however, have different address spaces for program and data, and SDCC does a better job than GCC at managing them. I don't know anyt

Re: [Sdcc-user] GPL+LE/LP pic/pic16 header Interest?

2011-03-31 Thread Sébastien Lorquet
at this point of the discussion, what about asking microchip about what they think? Sebastien -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all

Re: [Sdcc-user] GPL+LE/LP pic/pic16 header Interest?

2011-03-31 Thread Sébastien Lorquet
Please RTFM @ http://sourceforge.net/apps/trac/sdcc/wiki/Library%20License%20Selection ;-) Cheers Sebastien 2011/3/31 Alain Mouette > Ok, but what is LE? Google could not help, nor even SDCC's site... > > Could you send a link (or the licence)? > > Thanks, > Alain > > Em 31-03-2011 02:07, Borut

Re: [Sdcc-user] PIC18F97J60 configuration bits...

2011-04-19 Thread Sébastien Lorquet
This is nothing magic but simply a variable definition, in the code address space (__code) at the correct address (__at adr) and initialized with a value! The name is not important, e.g. char foovalue; /*variable*/ char foovalue = 42; /* initialized*/ __code char foovalue = 42; /*address space

Re: [Sdcc-user] PIC18F97J60 configuration bits...

2011-04-19 Thread Sébastien Lorquet
nd > "CONFIG" or "__CONFIG", general concept and syntax it's in fact the same, > keywords or macros are the difference (at least it seems so to me). > > Regards > > Olgierd > > > On 19-04-2011 7:47, Sébastien Lorquet wrote: > > This is nothing

Re: [Sdcc-user] official SDCC forum

2011-05-14 Thread Sébastien Lorquet
same here sebastien On Sat, May 14, 2011 at 4:10 PM, Bodo Wenzel wrote: > As one just reading this list and not contributing anything, presumably > I'm one of the targeted audience. And as such: > > > SDCC already has a forum on sourceforge. I see no reason to have > > another one at a location

Re: [Sdcc-user] official SDCC forum

2011-05-16 Thread Sébastien Lorquet
On Mon, May 16, 2011 at 6:26 PM, Alain Mouette wrote: > I am amazed how some people step in with lots of good intentions willing > to modify existing comunities without asking for opinions... > > Alain > Not to mention the fact that the proposed "official" forum has an average of one "welcome" p