Menu

#1596 __code initialized structures cause asm syntax error +patch

closed-fixed
5
2013-05-25
2009-12-31
No

When I compile the attached file with

sdcc -mpic14 -p12f675 test.c

I get a bunch of errors like:

test.asm:120:Error [103] syntax error
test.asm:121:Error [103] syntax error

I am using a pretty modern compiler:

SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.9.5 #5608 (Dec 23 2009) (UNIX)

The problem appears to be that I have an array of structures which contain bitfields and I want these in __code memory. The generated code has syntax errors, but worse, if you add the missing newlines, it doesn't generate the correct values either.

Discussion

  • Philip Gladstone

    Sample C file

     
  • Philip Gladstone

    Patch to fix problem

     
  • Philip Gladstone

    I've just uploaded a patch to resolve the problem. It works for my simple test case, and shouldn't break anything that currently works.

     
  • Philip Gladstone

    • summary: __code initialized structures cause asm syntax error --> __code initialized structures cause asm syntax error +patch
     
  • Borut Ražem

    Borut Ražem - 2011-02-07
    • milestone: --> fixed
    • assigned_to: nobody --> borutr
    • status: open --> open-fixed
     
  • Borut Ražem

    Borut Ražem - 2011-02-07

    Patch applied in svn revision #6214.

    Borut

     
  • Borut Ražem

    Borut Ražem - 2011-02-07
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB