Philipp Klaus Krause | 27 Oct 14:24 2014
Picon

stm8 tutorials

I've written a few tutorials for getting started with the stm8 port:

They show doing simple LED I/O, setting up an accurate timer, doing
serial I/O and running the Dhrystone and Whetstone benchmarks:

http://www.colecovision.eu/stm8/

They use the STM8L-DISCOVERY and STM8/128-EVAL boards - I don't have any
other.

Philipp

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Philipp Klaus Krause | 26 Oct 12:42 2014
Picon

Eine kurze Einführung zu sdcc 3.4.0

Since there is a somewhat active electronics community in Germany, I
wrote a short introduction to sdcc 3.4.0 in German:

http://www.colecovision.eu/sdcc.shtml

Philipp

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Oli | 18 Oct 01:27 2014
Picon

Drastically increased estimated code size after sdcc 3.0.0 for pic14

Hello

Today I tried to recompile an old project for a pic16f690 and the thing
was suddenly too big too fit in the pic :
  error: no target memory available for section "code_happyhourjuhe"

As I changed some of the code I tried to reduce the size, but I had to
remove the complete main function (half of the code) to make it compile.

After some drinking I had the idea to try the old compiler version I was
using back in 2011.

Here's a comparison of the estimated file sizes for different sdcc
versions.

SDCC : pic16/pic14 3.4.0/*rc1*/ #8960 (Mar 10 2014)

bin/obj/EEPROM.asm              ;	   22+   12 =    34 instructions (
92 byte)
bin/obj/Globals_DEF.asm         ;	    0+    0 =     0 instructions (
0 byte)
bin/obj/I2C_adapter.asm         ;	 1061+  355 =  1416 instructions
( 3542 byte)
bin/obj/I2C_slave.asm           ;	  164+   61 =   225 instructions (
572 byte)
bin/obj/IncSwitch.asm           ;	   23+    7 =    30 instructions (
74 byte)
bin/obj/main.asm                ;	 1060+  371 =  1431 instructions
( 3604 byte)
bin/obj/ServoFunctions.asm      ;	  102+   32 =   134 instructions (
(Continue reading)

Electropepper PIC | 16 Oct 01:32 2014
Picon

Missing definition for symbol

I am trying to compile this header file http://burningsmell.org/pic16f628/src/tsmdelay.h ,
whit code :

#define KHZ 1000L

#include <pic12f1822.h>
#include "tsmdelay.h"
#include "tsmtypes.h"

/* Setup chip configuration */
__code int __at(_CONFIG1) __CONFIG = _FOSC_INTOSC & _WDTE_OFF & _PWRTE_OFF & _MCLRE_ON & _CP_OFF & _CPD_OFF & _BOREN_OFF & _CLKOUTEN_OFF & _IESO_OFF & _FCMEN_OFF;

void setup(void);
unsigned char minute = 60;



void main(void) {

    setup();


    while(1) {

        while (minute--){
            DELAY_BIG_US(1000000LU);
        }
        LATA |= (1<<2);
    }

}

void setup(void) {

    OSCCON = 0b01011000;
    LATA = 0;
    TRISA = 0x00;
    PORTA = 0x00;
}


And i keep getting error :
message: Using default linker script "/usr/local/share/gputils/lkr/12f1822_g.lkr".
error: Missing definition for symbol "_dvar", required by "main.o".
error: Missing definition for symbol "_cycle_eater", required by "main.o".
make: *** [main.o] Error 1

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Electropepper PIC | 15 Oct 13:38 2014
Picon

12f1822 fail to compile

I cannot compile a simple led on :

rm -rf main.o main.asm main.map main.lst main.cod
sdcc  -mpic14 -p12f1822 --use-non-free -L /usr/local/share/sdcc/lib/src/pic14 -L /usr/share/gputils/lkr main.c
main.asm:9:Error [132] Unknown processor.
/usr/share/gputils/header/p12f1822.inc:33:Message [301] Processor-header file mismatch.  Verify selected processor.
/usr/share/gputils/header/p12f1822.inc:878:Error [131] Processor type is undefined.
/usr/share/gputils/header/p12f1822.inc:879:Error [131] Processor type is undefined.
/usr/share/gputils/header/p12f1822.inc:880:Error [131] Processor type is undefined.
/usr/share/gputils/header/p12f1822.inc:883:Error [131] Processor type is undefined.
/usr/share/gputils/header/p12f1822.inc:884:Error [131] Processor type is undefined.
/usr/share/gputils/header/p12f1822.inc:885:Error [131] Processor type is undefined.
/usr/share/gputils/header/p12f1822.inc:948:Error [131] Processor type is undefined.
/usr/share/gputils/header/p12f1822.inc:949:Error [131] Processor type is undefined.
/usr/share/gputils/header/p12f1822.inc:950:Error [131] Processor type is undefined.
/usr/share/gputils/header/p12f1822.inc:951:Error [131] Processor type is undefined.
/usr/share/gputils/header/p12f1822.inc:952:Error [131] Processor type is undefined.
/usr/share/gputils/header/p12f1822.inc:953:Error [131] Processor type is undefined.
main.asm:15:Error [131] Processor type is undefined.
main.asm:223:Error [131] Processor type is undefined.
main.asm:224:Error [131] Processor type is undefined.
main.asm:225:Error [131] Processor type is undefined.
main.asm:226:Error [131] Processor type is undefined.
main.asm:227:Error [131] Processor type is undefined.
main.asm:228:Error [131] Processor type is undefined.
main.asm:290:Error [131] Processor type is undefined.
main.asm:291:Error [131] Processor type is undefined.



The code is :
#define __12f1822                                                                                                                 
#include <pic12f1822.h>                                                                                                   
                                                                                                                                 
/* Setup chip configuration */                                                                                              
__code int __at(_CONFIG1) __CONFIG = _FOSC_INTOSC & _WDTE_OFF & _PWRTE_OFF & _MCLRE_ON & _CP_OFF & _CPD_OFF & _BOREN_OFF & _CLKOUTEN_OFF
 & _IESO_OFF & _FCMEN_OFF;                                                                                             


void main(void) {                                                                                                                    
                                                                                                                                      
    LATA = 0;                                                                                                                        
    TRISA = 0xFF;                                                                                                                    
    PORTA = 0x00;                                                                                                                    
                                                                                                                                   
    while(1) {                                                                                                                       
        PORTA |= (1<<2);                                                                                                            
    }                                                                                                                               
                                                                                                                                    
}


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Ricardo | 14 Oct 20:17 2014

error sdcc 2.9

Good personal later
 
I'm having a problem in the calculation below, the result is coming out wrong,


signed long int xdata Resultado;


Resultado = 512;
Resultado = Resultado * EEPROM93xx_read( DesenhoCamadas );                     // Resultado * 50 = 25600
Resultado = Resultado + ( EEPROM93xx_read( DesenhoAjuste ) - 100 );         // Resultado + ( 86 - 100 ) = 25586
Resultado = (long)(Resultado) * (long)(4) / (long)(5);                                     // Resultado * 4 / 5 = 7361 *** ERROR OCCURS HERE *** - This 7361 returning, as if he were doing the calculation using variables of type int.

Can anyone give me a hand.
hugs
Ricardo
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Molnár Károly | 14 Oct 20:08 2014
Picon

gputils-1.4.0 released

		Dear sdcc users!

The gputils-1.4.0 has been released. The source code package is available at
http://sourceforge.net/projects/gputils/files/gputils/1.4.0/gputils-1.4.0.tar.gz
Windows 32bit setup package is at
http://sourceforge.net/projects/gputils/files/gputils-win32/1.4.0/gputils-1.4.0.exe

The gputils 1.4.0 includes the following enhancements:

-- Extended error and warning messages.
-- Enabled the CONFIG directive on the 12-bit and 14-bit devices.
-- Enabled the IDLOCS directive on the pic18fxxx devices.
-- The gpasm lists the properties of the processors.
-- New predefined constants in the gpasm: __EEPROM_START, etc.
-- The gpdasm shows the names of SFRs and bits, in addition shows the labels in code.
-- The inc and lkr files are synced with MPLABX 2.20 version.

More details:
https://sourceforge.net/p/gputils/blog/2014/06/the-major-changes-since-the-stable-release-2/

Molnár Károly

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
Jonas De Craene | 8 Oct 15:58 2014

8051, static inline functions

Hi,

 

I have been using the SDCC compiler fora n 8051, and my goal is to optimize code size.

I have noticed that when declaring a function as static inline, the function does get inlined in the resulting assembler code,

but also the definition of that function is in there, so as a callable function, although this is used nowhere in the assembler code listing.

This as a result wastes precious code space. Is there a way to optimize this function definition away? Using just inline (and not static inline) for a function works, but then I cannot use this header file with functions in a project with multiple c files.

 

Thanks for your help.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Philipp Klaus Krause | 8 Oct 14:43 2014
Picon

Re: Changing the default for char from signed char to unsigned char

On 07.10.2014 19:47, Erlo Haugen wrote:
> After the change, the compiler will naturally catch assignment of
> negative values to char,

It should give a

warning 158: overflow in implicit constant conversion

but this seems to be partially broken for chars. Currently none of

char z = 255;
signed char s = 255;
unsigned char u = -128;

gives this warning, no matter if char is signed or not.

> check for loop bounds

Yes. It does:

warning 94: comparison is always true due to limited range of data type

Philipp

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
陳韋任 (Wei-Ren Chen | 3 Oct 09:45 2014
Picon

What is SUB_PORT?

Hi all,

  I see some ports have so-called SUB_PORT. Take hc08 for example, it
has sub-port hc08 and s08. What's the relationship between them? Maybe
one's instruction set is a subset of another?

  And I have another question about the commandline options, -m and -p.
It seems I can only use "-m" to switch sub-port, then what "-p" option
means/does? Because I thought that maybe I can switch sub-port like
this,

  sdcc -mhc08 -ps08

but it turns out that I should do this,

  sdcc -ms08

So I want to know what "-p" option's role here. Does it affect any
compiler behavior or codegen?

  Thanks.

Regards,
chenwj

--

-- 
Wei-Ren Chen (陳韋任)
Homepage: http://people.cs.nctu.edu.tw/~chenwj

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Sdcc-user mailing list
Sdcc-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user
陳韋任 (Wei-Ren Chen | 2 Oct 03:48 2014
Picon

Question about genCall

Hi All,

  I have a question about genCall while tracing the codegen. The code
snippet below:

  /* make the call */
  if (IS_LITERAL (etype))
    {
      /* ??? */
    }
  else
    {
      /* docall(); */
    }

  I can't figure out under what kind of function call will go through the
if-stmt part (IS_LITERAL is true). Would anyone give me a hint?

  Thanks. :-)

BR,
chenwj

--

-- 
Wei-Ren Chen (陳韋任)
Homepage: http://people.cs.nctu.edu.tw/~chenwj

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Sdcc-user mailing list
Sdcc-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Gmane