Jump to content

Compile Errors


avockley

Recommended Posts

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
This is the error I'm getting.
new-host-3:Software aaron$ make

rm -rf _output/*

rm -rf _output

rm -rf *.cod *.map *.lst

rm -rf *.hex

mkdir -p _output

sh ./bin/mios-gpasm -c -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/debug_msg -I ./modules/app_lcd/dummy -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -I ./modules/mios_wrapper modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o

sh ./bin/mios-gpasm -c -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/debug_msg -I ./modules/app_lcd/dummy -DDEBUG_MODE=0   modules/app_lcd/dummy/app_lcd.asm -o _output/app_lcd.o

sh ./bin/mios-sdcc -c -mpic16 -p18f4685 --fommit-frame-pointer --optimize-goto --optimize-cmp --disable-warning 85 --obanksel=2  -I./src -I ./include/c -I ./include/share -I ./modules/debug_msg -DDEBUG_MODE=0  main.c -o _output/main.o

ERROR ./bin/mios-sdcc: MIOS_BIN_PATH variable not set!

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

I really have no idea what I'm doing here. Any help would be greatly appreciated.

Link to comment
Share on other sites

Your setup isn't correct: it isn't required to move directories.

Unfortunately (like many users) you forgot to mention under which operating system you are working.

I also don't see how you downloaded the repository... this makes it difficult to give you explicit hints. :sad:

Based on the terminal output I guess that you are either working under Linux or MacOS, so here some simple step-by-step instructions:

1) create a directory named "svn" in your home directory:


mkdir ~/svn
cd ~/svn
[/code] 2) check-out the MIOS repository:
[code]
svn co svn://svnmios.midibox.org/mios
3) set the MIOS variables:

export MIOS_PATH="~/svn/mios/trunk"
export MIOS_BIN_PATH="~/svn/mios/trunk/bin"
[/code] 4) 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)

Link to comment
Share on other sites

Now I'm getting a whole bunch of other errors.

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

Link to comment
Share on other sites

You have to show the complete compile log, otherwise it's difficult to help you remotely (without knowing the history)

And you still haven't mentioned, under which operating system you are working...

I guess that there is a compatibility issue with the installed SDCC version.

As documented here, SDCC 2.8.0 should be used.

Meanwhile I guess that you are working on a Mac, here a direct link to the appr. binary:

http://sourceforge.net/projects/sdcc/files/sdcc-macosx/2.8.0/

If you are working under a different operating system, please search for the link by yourself!

Best Regards, Thorsten.

Link to comment
Share on other sites

Sorry, forgot to mention I'm running OS X 10.7.4

Here is the complete log

new-host-3:Software aaron$ make

rm -rf _output/*

rm -rf _output

rm -rf *.cod *.map *.lst

rm -rf *.hex

mkdir -p _output

sh ~/svn/mios/trunk/bin/mios-gpasm -c -p p18f452 -I./src -I ~/svn/mios/trunk/include/asm -I ~/svn/mios/trunk/include/share -I ~/svn/mios/trunk/modules/debug_msg -I ~/svn/mios/trunk/modules/app_lcd/dummy -DDEBUG_MODE=0  -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -I ~/svn/mios/trunk/modules/mios_wrapper /Users/aaron/svn/mios/trunk/modules/mios_wrapper/mios_wrapper.asm  -o _output/mios_wrapper.o

sh ~/svn/mios/trunk/bin/mios-gpasm -c -p p18f452 -I./src -I ~/svn/mios/trunk/include/asm -I ~/svn/mios/trunk/include/share -I ~/svn/mios/trunk/modules/debug_msg -I ~/svn/mios/trunk/modules/app_lcd/dummy -DDEBUG_MODE=0   /Users/aaron/svn/mios/trunk/modules/app_lcd/dummy/app_lcd.asm -o _output/app_lcd.o

sh ~/svn/mios/trunk/bin/mios-sdcc -c -mpic16 -p18f452 --fommit-frame-pointer --optimize-goto --optimize-cmp --disable-warning 85 --obanksel=2  -I./src -I ~/svn/mios/trunk/include/c -I ~/svn/mios/trunk/include/share -I ~/svn/mios/trunk/modules/debug_msg -DDEBUG_MODE=0  main.c -o _output/main.o

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


extraFunctions.c:24: syntax error: token -> '[' ; column 14

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

new-host-3:Software aaron$ 

Link to comment
Share on other sites

What is the output of


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)

Best Regards, Thorsten.

Link to comment
Share on other sites

Yes, because:

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

I don't plan to support newer versions.

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...