Latest SDCC
Posted: Mon Jul 10, 2017 9:45 am
Which SDCC should we be using?
I’ve used the latest snapshot from Sourceforge, sdcc-snapshot-universal-apple-macosx-20170709-9946.tar.bz2, and get several warnings:
which are all because the code uses e.g. but the compiler defaults 'char' to 'unsigned char'.
Note also that sdcc now comes with sdobjcopy (generates the same output here as arm-eabi-objcopy, so shouldn’t be a problem)
I’ve used the latest snapshot from Sourceforge, sdcc-snapshot-universal-apple-macosx-20170709-9946.tar.bz2, and get several warnings:
Code: Select all
$ make CRPA=1
sdcc -Iinc/ --model-large --std-sdcc99 -DCRPA -c src/main.c -o bin/main.rel
sdcc -Iinc/ --model-large --std-sdcc99 -DCRPA -c src/radio.c -o bin/radio.rel
src/radio.c:365: warning 94: comparison is always false due to limited range of data type
sdcc -Iinc/ --model-large --std-sdcc99 -DCRPA -c src/usb.c -o bin/usb.rel
src/usb.c:49: warning 158: overflow in implicit constant conversion
src/usb.c:50: warning 158: overflow in implicit constant conversion
src/usb.c:567: warning 158: overflow in implicit constant conversion
src/usb.c:567: warning 158: overflow in implicit constant conversion
sdcc -Iinc/ --model-large --std-sdcc99 -DCRPA -c src/usbDescriptor.c -o bin/usbDescriptor.rel
sdcc -Iinc/ --model-large --std-sdcc99 -DCRPA -c src/led.c -o bin/led.rel
sdcc -Iinc/ --model-large --std-sdcc99 -DCRPA -c src/utils.c -o bin/utils.rel
sdcc --xram-loc 0x8000 --xram-size 2048 --model-large bin/main.rel bin/radio.rel bin/usb.rel bin/usbDescriptor.rel bin/led.rel bin/utils.rel -o bin/cradio.ihx
sdobjcopy -I ihex bin/cradio.ihx -O binary bin/cradio.bin
Crazyradio PA build
Code: Select all
static char radioChannel = -1;
Note also that sdcc now comes with sdobjcopy (generates the same output here as arm-eabi-objcopy, so shouldn’t be a problem)