Re: [Sdcc-user] Migrating from Cosmic to SDCC; ASlink-Warning-Undefined Global (Philipp Klaus Krause)

2014-12-17 Thread Maarten Brock
d byte from memory (use 3b address for near&far range) > return(*((@far uint8_t*) addr)); > > // SDCC compiler (doesn't support far pointer --> use inline assembler) > #elif defined(__SDCC) > > // store address & data globally for assember > g_addr = addr;

Re: [Sdcc-user] Migrating from Cosmic to SDCC; ASlink-Warning-Undefined Global (Philipp Klaus Krause)

2014-12-17 Thread Georg Icking-Konert
r assember g_addr = addr; // use inline assembler ASM_START ldf a,[_g_addr+1].e ld_g_val,a ASM_END // return read byte from memory return(g_val); #endif // SDCC } // read_byte > Message: 2 > Date: Tue, 16 Dec 2014 17:16:26 +0100 > From: Philipp Klaus Krause > Sub

Re: [Sdcc-user] Migrating from Cosmic to SDCC; ASlink-Warning-Undefined Global (Philipp Klaus Krause)

2014-12-16 Thread Philipp Klaus Krause
On 16.12.2014 16:35, Georg Icking-Konert wrote: > hi Philipp, hello Rolf, > > actually I have an STM8 application where I need access to >64kB address > range. Specifically I want to program a 128kB device as a datalogger. > The SW already works under Cosmic (using @far identifier), but I > unders

Re: [Sdcc-user] Migrating from Cosmic to SDCC; ASlink-Warning-Undefined Global (Philipp Klaus Krause)

2014-12-16 Thread Georg Icking-Konert
m: Philipp Klaus Krause > Subject: Re: [Sdcc-user] Migrating from Cosmic to SDCC; > ASlink-Warning-Undefined Global > To: sdcc-user@lists.sourceforge.net > Message-ID: <5489c97e.80...@spth.de> > Content-Type: text/plain; charset="windows-1252" > > On

Re: [Sdcc-user] Migrating from Cosmic to SDCC; ASlink-Warning-Undefined Global

2014-12-11 Thread Philipp Klaus Krause
On 18.11.2014 15:14, Rolf Schroder wrote: > FYI: I could not find any information about Storage Class Language > Extensions for the STM8 in the doc so I removed the "@near" / "@far" > extensions used by the COSMIC compiler (instead of replacing them with > SDCC's version). I am not sure whether th

Re: [Sdcc-user] Migrating from Cosmic to SDCC; ASlink-Warning-Undefined Global

2014-11-20 Thread Rolf Schroder
Dear All, thank you for your comments. You were all right: I did not pass the STM8 lib as an argument and it wasn't in the current folder. I tried to link against the lib which came with the SDCC 3.4.0 (win32) install but it did not work (same errors). I managed to compile the two STM8 libraries (

Re: [Sdcc-user] Migrating from Cosmic to SDCC; ASlink-Warning-Undefined Global

2014-11-18 Thread Maarten Brock
> On 17.11.2014 13:05, Rolf Schroder wrote: >> Dear All, >> >> I am trying to compile a firmware for the STM8L. I used STVD & Cosmic >> (compiler) but want to switch to sdcc. I had made some small code >> changes to get everything running and I feel it's compiling correctly. I >> am using the follo

Re: [Sdcc-user] Migrating from Cosmic to SDCC; ASlink-Warning-Undefined Global

2014-11-18 Thread Maarten Brock
Hello, > To fix it, you may need to get the order correctly in which you link .o > files (compiled .c files) and .a/.lib files (static libraries). Generally, > libraries referenced by other modules (.o or .a/.lib) need to come later > on the command line so that the linkers can first known which s

Re: [Sdcc-user] Migrating from Cosmic to SDCC; ASlink-Warning-Undefined Global

2014-11-18 Thread Philipp Klaus Krause
On 17.11.2014 13:05, Rolf Schroder wrote: > Dear All, > > I am trying to compile a firmware for the STM8L. I used STVD & Cosmic > (compiler) but want to switch to sdcc. I had made some small code > changes to get everything running and I feel it's compiling correctly. I > am using the following cm

Re: [Sdcc-user] Migrating from Cosmic to SDCC; ASlink-Warning-Undefined Global

2014-11-17 Thread Raphael Neider
Hi, to answer the first question: The undefined symbols during linking should probably be errors, not warnings. The resulting binary will most likely not work. As you can see, all symbols are by default assumed to reside at address 0x0. I would not flash that ... To fix it, you may need to get th