User Activity

  • Created ticket #2732 on Small Device C Compiler (SDCC)

    printf("%s", _str_) cannot print _str_ if strlen(_str_) > 127

  • Posted a comment on discussion Help on Small Device C Compiler (SDCC)

    Sorry, I forgot to mention, I use z80 backend. I used custom crt0. I found recenly the following. 1. I use this sample code snippet main.c: #include <stdio.h> #include <string.h> unsigned long a, b; void main() { a = b = 1; while (1) { a += b; b++; printf("%d%d", a / b, a * b); } } I took SDCC\lib\z80\crt0.rel, put it into source folder and compiled code using following command line: sdcc -mz80 --std-sdcc11 --no-std-crt0 --opt-code-speed crt0.rel main.c -o obj/out.hex I obtained following *.map:...

  • Posted a comment on discussion Help on Small Device C Compiler (SDCC)

    Philipp, imagine you have a set of functions that generate all possible commands for some ASIC, for example display list commands, in a file named dlcommands.c. You may use 20% of them in real life. But dlcommands.c is a part of ASIC library which is shipped with it and it is hard to imagine that one will tailor it for every special case. That's exact my case.

  • Posted a comment on discussion Help on Small Device C Compiler (SDCC)

    Thanks, this helps. I had to write a tool which splits C source file into plenty of small files each one containing only one function. Then I separately compile each and put them into library. Guys, you make my life interesting! But the question is: WHY the linker cannot use one object (function, array) from library? Provided it knows which symbol is requested during linking and the object has its clear boundaries in library...

  • Posted a comment on discussion Help on Small Device C Compiler (SDCC)

    Hi, None from mentioned worked out. Tested linking separate .rel as well as prepared .lib. In both cases resulting binary included all unused functions. Any ideas yet? Thank you.

  • Posted a comment on discussion Help on Small Device C Compiler (SDCC)

    Hi. Is it ever possible to remove unreferenced and thus unused functions during compilation (like GCC does) so that they don't waste place in resulting binary code in SDCC? Thank you.

  • Modified a comment on discussion Help on Small Device C Compiler (SDCC)

    I found that some library functions end up in HOME section. For example: _HOME 00006008 00000DCB = 3531. bytes (REL,CON) Value Global Global Defined In Module ----- -------------------------------- ------------------------ 00006008 ___fsmul _fsmul 000063F8 ___fsadd _fsadd 000067F6 ___fs2uint _fs2uint 00006825 ___fsdiv _fsdiv 00006B8F __mullong _mullong 00006D11 ___fs2ulong _fs2ulong On the other hand some other still library functions are placed in CODE: _CODE 00007000 00000CB3 = 3251. bytes (REL,CON)...

  • Modified a comment on discussion Help on Small Device C Compiler (SDCC)

    I found that some library functions end up in HOME section. For example: _HOME 00006008 00000DCB = 3531. bytes (REL,CON) Value Global Global Defined In Module ----- -------------------------------- ------------------------ 00006008 ___fsmul _fsmul 000063F8 ___fsadd _fsadd 000067F6 ___fs2uint _fs2uint 00006825 ___fsdiv _fsdiv 00006B8F __mullong _mullong 00006D11 ___fs2ulong _fs2ulong On the other hand some other still library functions are placed in CODE: _CODE 00007000 00000CB3 = 3251. bytes (REL,CON)...

View All

Personal Data

Username:
tslabs
Joined:
2013-09-26 02:04:11

Projects

  • No projects to display.

Personal Tools