I am having a lot of trouble compiling my program. I think I have everything set up right. The code files are in a directory with all the mios directories (bin, etc, lib, …). I have copied the makefile from the C template. The first set of errors told me that the MIOS_PATH variable hadn’t been set, so I set that in the makefile. Now I’m getting an error saying that MIOS_BIN_PATH isn’t set, but it is clearly set in the makefile. The makefile I’m using is below.
MIOS_PATH = .
MIOS_BIN_PATH = ./bin
# define the processor, linker file and project name
PROCESSOR = 18f4685
LKR_FILE = $(MIOS_PATH)/etc/lkr/p$(PROCESSOR).lkr
PROJECT = project
# list of objects that should be created and linked
OBJS = mios_wrapper.o app_lcd.o main.o debug_msg.o
# include pathes (more will be added by .mk files)
GPASM_INCLUDE =
SDCC_INCLUDE =
# optional defines that should be passed to GPASM/SDCC
GPASM_DEFINES = -DDEBUG_MODE=0
SDCC_DEFINES = -DDEBUG_MODE=0
# pass parameters to MIOS wrapper
MIOS_WRAPPER_DEFINES = -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f
# directories and files that should be part of the distribution (release) package
# more will be added by *.mk files
DIST = ./
# include the common.mk file
include $(MIOS_PATH)/include/makefile/common.mk
# include debug message module
include $(MIOS_PATH)/modules/debug_msg/debug_msg.mk
# include application specific driver (select app_lcd/dummy if MIOS internal driver used)
include $(MIOS_PATH)/modules/app_lcd/dummy/app_lcd.mk
the setup is already done! In order to try it, change to the SDCC skeleton app and compile it:
[code]
cd $MIOS_PATH/apps/templates/sdcc_skeleton
make
Best Regards, Thorsten.
P.S.: if the “~/” (references your home directory) causes an issue at your side, and you don’t know how to fix it, please mention the operating system under which you are working, and the path of your home directory (echo $HOME)
at 1: warning 118: option '--fommit-frame-pointer-?' no longer supported 'use --fomit-frame-pointer instead'
at 1: warning 117: unknown compiler option '--optimize-goto' ignored
In file included from main.c:17:
/usr/local/bin/../share/sdcc/include/pic16/pic18fregs.h:51:25: error: pic18f452.h: No such file or directory
/Users/aaron/svn/mios/trunk/include/c/cmios.h:240: warning 197: keyword 'data' is deprecated, use '__data' instead
/Users/aaron/svn/mios/trunk/include/c/cmios.h:250: warning 197: keyword 'code' is deprecated, use '__code' instead
/Users/aaron/svn/mios/trunk/include/c/cmios.h:251: warning 197: keyword 'code' is deprecated, use '__code' instead
/Users/aaron/svn/mios/trunk/include/c/cmios.h:252: warning 197: keyword 'code' is deprecated, use '__code' instead
/Users/aaron/svn/mios/trunk/include/c/cmios.h:263: warning 197: keyword 'code' is deprecated, use '__code' instead
/Users/aaron/svn/mios/trunk/include/c/cmios.h:264: warning 197: keyword 'code' is deprecated, use '__code' instead
/Users/aaron/svn/mios/trunk/include/c/cmios.h:266: warning 197: keyword 'code' is deprecated, use '__code' instead
/Users/aaron/svn/mios/trunk/include/c/cmios.h:275: warning 197: keyword 'code' is deprecated, use '__code' instead
/Users/aaron/svn/mios/trunk/include/c/cmios.h:276: warning 197: keyword 'code' is deprecated, use '__code' instead
sdcc --version
[/code]
It should return:
[code]
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.0 #5117 (Mar 23 2008) (Mac OS X i386)
The wrapper code heavily depends on the compiler which is used. Currently only SDCC is supported, since this is the only compiler for the PIC18F architecture which is freely available. Also the compiler version is important, since the parameter passing method is not stable yet. Therefore please only use official releases (no snapshots) which have been tested with the wrapper. The current working release is 2.8.0