MIOS programming platform issue on linux

Hi all,

I have a problem with the new MIOS programming platform developement

I can’t compile programming examples/templates in the apps/ directory

The error is:

sdcc: glue.c:1318: pic16emitStaticSeg: Assertion `0’ failed.

Caught signal 6: SIGABRT

make: *** [_output/main.o] Error 1

Now I looked into the _output/app_lcd.lst file and I see that there are a lot of Macintosh newline characters

(marked as ^M in vim, it is the character 015 or \r, the newline character on linux should be 012 or \n)

I don’t know if it is relevant though…

I looked all the files in $MIOS_PATH/modules/app_lcd/dummy/

but I do not see the \r character on those files…

How the _output/app_lcd.lst is created ?

I am newbie into Mios programming, but I success to write an application and compile it with an old Makefile

(not with the new MIOS programming platform) so I guess my toolchain is correct

The lst file is generated by the compiler… That error is strange, looks like a compiler internal error.

I’d like to see two things:

The output of sdcc --version

And the text that you cropped out of the above - I’d like to be sure it’s calling sdcc with the correct params, see if there are other warnings/errors/etc.

Edit: sorry got distracted - The linefeeds on my windoze box are windows style (CR+LF, hex is 0x0d,0x0a) …i would assume that the linefeeds in the lst files would normally match your OS… weird…

Thanks for the quick reply!

sdcc -v
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.5.0 #1020 (Apr 17 2007) (UNIX)

And the output from make command in the apps/templates/sdcc_skeleton dir

rm -rf _output/*
rm -rf _output
rm -rf *.cod *.map *.lst
rm -rf *.hex
mkdir -p _output
sh /home/keefaz/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/keefaz/mios/include/asm -I /home/keefaz/mios/include/share -I /home/keefaz/mios/modules/app_lcd/dummy -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -I /home/keefaz/mios/modules/mios_wrapper /home/keefaz/mios/modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o
sh /home/keefaz/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/keefaz/mios/include/asm -I /home/keefaz/mios/include/share -I /home/keefaz/mios/modules/app_lcd/dummy -DDEBUG_MODE=0  /home/keefaz/mios/modules/app_lcd/dummy/app_lcd.asm -o _output/app_lcd.o
sh /home/keefaz/mios/bin/mios-sdcc -c -mpic16 -p18f452 --fommit-frame-pointer --optimize-goto --optimize-cmp --disable-warning 85 --obanksel=2  -I./src -I /home/keefaz/mios/include/c -I /home/keefaz/mios/include/share -DDEBUG_MODE=0  main.c -o _output/main.o
Processor: 18f452
sdcc: glue.c:1318: pic16emitStaticSeg: Assertion `0' failed.
Caught signal 6: SIGABRT
make: *** [_output/main.o] Error 1

BTW, when I use sdcc_skeleton_v1_9a as an app template, everything works fine!

I write the programm, then run make command and it compiles/creates the project.hex,

which I upload successfully in the PIC with MIDI via mios studio and the app run well..

[edit]

The \r characters appear also in the project.lst created in the sdcc_skeleton_v1_9a template dir,

so I guess the error in MIOS programming platform template is not caused by those characters…

must comes from elsewhere…

At least I have a working solution, but I am curious and wonder why the new templates don’t work on my system

sdcc -v

SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.5.0 #1020 (Apr 17 2007) (UNIX)

Older than dirt!

This is current:

sdcc --version

SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.0 #5117 (Mar 23 2008) (MINGW32)

MIOS supports 2.7+

Ok, the sdcc upgrade to 2.8.0 solved the problem!

the skeleton app compilation worked on first try

Thank you stryd_one !

*I admit I hesitated before the sdcc upgrade because I had a working setup, but I wanted the advantages of the fabulous MIOS programming platform, very good job!

Yay :slight_smile:

You’ll be glad you upgraded, SDCC has been vastly improved since 2.5. It outputs lighter code, has new features, and is far more robust.