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.
Sample C file
Patch to fix problem
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.
Patch applied in svn revision #6214.
Borut