Philipp Klaus Krause | 2 Feb 10:35 2016
Picon

char is no longer signed by default

In revision #9493 today the default for char changed from signed to
unsigned. This change might affect user code relying on the old
behaviour (which can be restored using --fsigned-char).
The C standard allows char to be either signed or unsigned by default.
For the architectures targeted by SDCC, more efficient code can be
generated when char is unsigned.

Philipp

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Les N | 29 Jan 18:22 2016
Picon

SDCC 3.5.0 - Syntax Error: Token -> '*' ; column 18 ihex.c


 SDCC 3.5.0 - Syntax Error: Token -> '*' ; column 18 ihex.c 

<!-- .ExternalClass .ecxhmmessage P { padding:0px; } .ExternalClass body.ecxhmmessage { font-size:12pt; font-family:Calibri; } -->
Hi all,
I received the following error when I compile using sdcc 3.50 from the program ihex.c 
 
void hexout (FILE *fhex, int byte, int memory_location, int end);
 
 
Error after running sdcc ihex.c
 
SDCC 3.5.0 - Syntax Error: Token -> '*' ; column 18 ihex.c 
 
Any idea of what the problem is?
 
tnx
les
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Jari Komppa | 18 Jan 10:14 2016
Picon
Gravatar

z80 target, code-loc/data-loc

Hi.

While doing a small project for zx spectrum with sdcc I stumbled upon
a small problem that was fun to diagnose. It's not a bug in sdcc, but
a couple small features would help avoid such problems in the future.

Basically, after adding some innocent code to the project, the program
would crash and burn in spectacular way. Switching order of linked
objects changed the way the program crashed, but didn't remove the
problem.

Eventually I realized (when checking my compiler options and glancing
at my diagnostic memory map) that the --data-loc overlapped the code.
After moving it out of the way things worked again.

This is something that should be relatively easy for the linker to
check and give warning about.

According to documentation, if I don't use --data-loc, the location is
set to "as low in memory as possible". I don't know what this would
result in with zx spectrum, where the low 16k is ROM, next 6k or so is
display memory, and the 16k-32k is "slow memory" which one would
probably avoid using if possible.. It would be nice if there was an
option to calculate and place the --data-loc right after code ends.

Cheers,
  Jari

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
Vicente Sendra | 19 Jan 00:54 2016
Picon
Picon

Re: Option to add a code section for every c function.

El sáb, 16/1/16, Molnár Károly <carlosapo <at> freemail.hu> escribió:

>On Tue, 12 Jan 2016 23:15:51 +0000 (UTC)
>
>Vicente Sendra <visenri <at> yahoo.es> wrote:
>
>> Hello.
>> 
>> I've been using SDCC (PIC port) for some time and using gputils to assemble and link.
>> 
>> Gplink has an option to remove dead sections -O2.
>> 
>> It crashed when using this option, but recently i've repported the bug and it has been quickly fixed.
>> (See details here: https://sourceforge.net/p/gputils/bugs/286/ )
>> 
>> The problem is -O2 removes code only from entire sections not used, and SDCC generates only one code
section for all functions of each file. So code is only removed if no function of a file is used. 
>> This is not very useful, normally you have some libraries and use part of the functions of that files, all
unused functions should be removed. This could be possible if each file had it's own code section. I have
done some test with real projects (adding a code section for each function manually to the resulting asm)
and i've seen very big memory savings after linking (up to 20%, very project dependent).
>> 
>> I suggest adding a new Option for the SDCC PIC port to create a code section for each function in every
compiled file. I think it should be very easy to implement this option, it just adds a line for each function
in the output file, i propose the following format (the one i used in my tests):
>> 
>> function_name (.c file function) -> _function_name (.asm file function) -> code_function_name (.asm
file code section)
>> 
>> Just add "code" prefix to each generated asm function name and add new section line before the function
start label, an example here:
>> 
>> --------------------------------------------------
>> ;***
>> ;  pBlock Stats: dbName = C
>> ;***
>> ;entry:  _serial_hw_init    ;Function
>> start
>> ; 2 exit points
>> ;has an exit
>> ;; Starting pCode block
>> code_serial_hw_init    code   
>> ;Function start
>> _serial_hw_init    ;Function start
>> ; 2 exit points
>> ;    .line    695;
>> "src/serial/serial_hw.c"   
>> pin_mode_input(SERIAL_HW_RX0);
>>     BANKSEL    _TRISB
>>     BSF    _TRISB,5
>
>> 
>
>The solution is ready, in the #9457 svn version.
>
>Molnár Károly

Hello.

I've checked #9462 svn version and everything seems to be ok.

I've tested it with a sample project (PIC16F690) and savings are quite massive:

O1 SDCC pre-svn#9457:
ROM 3780 - RAM 256

O2 SDCC pre-svn#9457:
ROM 3321 - RAM 240 (-12% ROM)

O2 SDCC svn#9462
ROM 2673 - RAM 240 (-29% ROM)

Thank you very much!

El mié, 13/1/16, Philipp Klaus Krause <pkk <at> spth.de> escribió:

>Isn't this a way of implementing RFE #452?
>
>Philipp

As i see it every port will rely on the linker implementation to do it, so implementing RFE #452? will need to
be addressed by each linker program.

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Sdcc-user mailing list
Sdcc-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Maarten Brock | 18 Jan 11:04 2016
Picon

Re: unsubscribe

Hello Rémi,

I don't think you can unsubscribe from the mailing list by sending it a
message with 'unsubscribe' in the subject. Instead you should visit:
https://lists.sourceforge.net/lists/options/sdcc-user

Greetings,
Maarten

>     Dear Mr / Ms,
>
>
>
> Met vriendelijke groet
>
>
> ESSAISSI, Rémi Julien
>
>
>
> On Saturday, 16-01-2016 at 12:35 Maarten Brock wrote:
>
>
> Hello all,
>
> I just enabled voting for the following trackers: Bugs, Feature
> requests and Patches. From now on it should be possible to vote for
> tickets you like to be fixed.
>
> Greetings,
> Maarten Brock

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
Maarten Brock | 16 Jan 12:35 2016
Picon

Tracker voting

Hello all,

I just enabled voting for the following trackers: Bugs, Feature requests
and Patches. From now on it should be possible to vote for tickets you
like to be fixed.

Greetings,
Maarten Brock

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
疯狂野兔 | 15 Jan 09:22 2016

stm8

hello,

i write some code ,use sdcc to compile 5min,
why?

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Vicente Sendra | 13 Jan 00:15 2016
Picon
Picon

Re: Option to add a code section for every c function.

Hello.

I've been using SDCC (PIC port) for some time and using gputils to assemble and link.

Gplink has an option to remove dead sections -O2.

It crashed when using this option, but recently i've repported the bug and it has been quickly fixed.
(See details here: https://sourceforge.net/p/gputils/bugs/286/ )

The problem is -O2 removes code only from entire sections not used, and SDCC generates only one code section
for all functions of each file. So code is only removed if no function of a file is used. 
This is not very useful, normally you have some libraries and use part of the functions of that files, all
unused functions should be removed. This could be possible if each file had it's own code section. I have
done some test with real projects (adding a code section for each function manually to the resulting asm)
and i've seen very big memory savings after linking (up to 20%, very project dependent).

I suggest adding a new Option for the SDCC PIC port to create a code section for each function in every
compiled file. I think it should be very easy to implement this option, it just adds a line for each function
in the output file, i propose the following format (the one i used in my tests):

function_name (.c file function) -> _function_name (.asm file function) -> code_function_name (.asm
file code section)

Just add "code" prefix to each generated asm function name and add new section line before the function
start label, an example here:

--------------------------------------------------
;***
;  pBlock Stats: dbName = C
;***
;entry:  _serial_hw_init    ;Function
start
; 2 exit points
;has an exit
;; Starting pCode block
code_serial_hw_init    code   
;Function start
_serial_hw_init    ;Function start
; 2 exit points
;    .line    695;
"src/serial/serial_hw.c"   
pin_mode_input(SERIAL_HW_RX0);
    BANKSEL    _TRISB
    BSF    _TRISB,5

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Sdcc-user mailing list
Sdcc-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Philipp Klaus Krause | 6 Jan 13:30 2016
Picon

Dropping support for __typeof

SDCC currently has support for __typeof, which is an extension to the C
standard.
In SDCC, __typeof returns an integer constant that depends of the type
of the operand.
SDCC has had this support since 2001, but __typeof is not used in our
library nor is it tested in the regression tests. When support for _Bool
and long long got added to SDCC, the __typeof support was not updated to
support them. __typeof support is quite a few lines of code in different
places.

SDCC now supports _Generic from the ISO C11 standard. _Generic is more
generic than __typeof.

__typeof probably has few users if any, and most use cases of __typeof
should be easy to migrate to _Generic.

I suggest to drop support for __typeof.

Philipp

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
C. SB | 3 Jan 02:53 2016
Picon

PIC14 : "(void) RCREG;" optimized out

Hi,
I was looking at the disassembly for some PIC14 code, and I assumed the SFRs would be naturally declared as
volatile. This would mean code like
****
 (void) RCREG;
 (void) RCREG;
****
would read the RCREG register twice, discarding its value. But those get optimized away ! (tested with
2015-12-31 snapshot)

In the non-free "pic16f628a.h" header (probably others too ?), RCREG is defined as
****
extern __at(0x001A) __sfr RCREG;
****
but the __sfr keyword (applied to PIC*) is undocumented in the sdcc manual.

Is this a bug ? Is there a workaround ?

Thanks !

------------------------------------------------------------------------------
Molnár Károly | 31 Dec 12:14 2015
Picon

gputils-1.4.2 released

		Dear sdcc users!

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

The gputils 1.4.2 includes the following enhancements:

-- Use "IDLOCS CODE" in the --mpasm-compatible mode.
-- Updated with new devices based on the MPLABX 3.15.
-- Added the missing DEBUG config option to many processors.
-- Added __IDLOCS_START,  __IDLOCS_END, __CONFIG_START and __CONFIG_END constants.
-- Improve the check that Flex is more recent than version 2.5.4.
-- Let "--list-chips" adapt to available screen width.
-- More accurate error messages.

Molnár Károly

------------------------------------------------------------------------------

Gmane