User Activity

  • Posted a comment on ticket #4122 on Small Device C Compiler (SDCC)

    Thank you, Maarten. I moved the fix from src/pic16/gen.c to src/pic16/glue.c, inside pic16emitRegularMap(), as suggested. The new patch adds used, non-static, non-extern inline function symbols to the externs set. I tested the change with SDCC trunk r16997, PIC18F452, and gputils: Taking the address of an external-linkage inline function correctly emits extern _twice. GPASM succeeds without Error[113]. The two-translation-unit test links successfully with GPLINK and produces a 632-byte HEX file....

  • Posted a comment on ticket #4122 on Small Device C Compiler (SDCC)

    Additional regression test: local function pointer initialization I also tested an address-taken non-static inline function initialized into a local function pointer: inline unsigned char twice(unsigned char x) { return x + x; } unsigned char test(void) { unsigned char (*fp)(unsigned char) = twice; return fp(5); } With unpatched SDCC r16997, assembly generation succeeds, but GPASM reports three Error[113] errors for _twice, because the required extern declaration is missing. With the proposed seven-line...

  • Posted a comment on ticket #4122 on Small Device C Compiler (SDCC)

    PIC16: Tested patch for missing extern declaration (r16997) I have attached a seven-line patch for src/pic16/gen.c, together with a minimal two-translation-unit reproducer. Unpatched SDCC r16997: Generates references to _twice without declaring it as an external symbol. GPASM fails with three Error[113]: Symbol not previously defined errors. Patched SDCC r16997: Automatically emits extern _twice. Both translation units compile and assemble successfully. GPLINK resolves the external symbol and successfully...

  • Posted a comment on ticket #4122 on Small Device C Compiler (SDCC)

    I repeated the function-pointer test with a clean build of SDCC trunk r16997, after the r16990 change, targeting PIC18F452. The generated assembly still references _stdc_rotate_left_uc using UPPER(), HIGH(), and LOW(), but does not emit either global or extern for this symbol. GPASM fails with: pic_test.asm:61:Error[113] Symbol not previously defined: "_stdc_rotate_left_uc" pic_test.asm:63:Error[113] Symbol not previously defined: "_stdc_rotate_left_uc" pic_test.asm:65:Error[113] Symbol not previously...

  • Posted a comment on ticket #4122 on Small Device C Compiler (SDCC)

    I tested this with SDCC 4.6.4 #16960 and gpasm/gplink 1.5.2 #1333, targeting PIC18F452. The original assembly generated by SDCC contains: global _bar global _foo There is no global or extern declaration for _stdc_rotate_left_uc, although its address is referenced as follows: MOVLW UPPER(_stdc_rotate_left_uc) MOVLW HIGH(_stdc_rotate_left_uc) MOVLW LOW(_stdc_rotate_left_uc) I tested three cases: 1. No declaration GPASM reports: Error[113] Symbol not previously defined: "_stdc_rotate_left_uc" 2. Adding...

  • Posted a comment on ticket #4122 on Small Device C Compiler (SDCC)

    Thanks for pointing this out. I downloaded the attachment from #4122 and confirmed that it is indeed empty. No, this is a separate fix from #4110. Issue #4110 concerns stdbit.h / _BitInt, whereas #4122 fixes the PIC16 backend incorrectly adding non-static, non-extern inline functions to the public symbol list when no external definition is emitted. I will replace the empty attachment with the correct patch. Sorry for the confusion.

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

    PIC16: avoid exporting non-static inline functions as public symbols

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

    PIC14: emit COFF type and array debug metadata with --debug-xtra

View All

Personal Data

Username:
zeynelsagcan
Joined:
2026-10-03 12:41:23.628000
Location:
Turkey / +03

Projects

  • No projects to display.

Personal Tools