avockley Posted May 30, 2012 Report Share Posted May 30, 2012 I'm having an issue when trying to compile my program. The full make log is included below. I think it is some kind of memory conflict, but I have no idea what it means, or how to solve it. aarons-macbook-pro: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 p18f4685 -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 p18f4685 -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 -p18f4685 --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 /Users/aaron/svn/mios/trunk/bin/mios-gpasm modifies _output/main.asm, result in _output/main__mios-gpasm-tmp.asm sh ~/svn/mios/trunk/bin/mios-gpasm -c -p p18f4685 -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/debug_msg/debug_msg.asm -o _output/debug_msg.o gplink -s ~/svn/mios/trunk/etc/lkr/p18f4685.lkr -m -o project.hex ~/svn/mios/trunk/lib/libsdcc.lib ~/svn/mios/trunk/lib/pic18f4685.lib _output/mios_wrapper.o _output/app_lcd.o _output/main.o _output/debug_msg.o error: multiple sections using address 0x3280 make: *** [project.hex] Error 1 aarons-macbook-pro:Software aaron$ Any suggestions? Quote Link to comment Share on other sites More sharing options...
TK. Posted May 30, 2012 Report Share Posted May 30, 2012 I guess that you added an encoder table, because 0x3280 is the location where this table is expected. Probably you forgot to add -DDONT_INCLUDE_MIOS_ENC_TABLE to the MIOS_WRAPPER_DEFINES variable (located in Makefile) as explained at the bottom of this page: http://www.ucapps.de/mios_c_send_enc_rel.html Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
avockley Posted May 30, 2012 Author Report Share Posted May 30, 2012 That did it. Thanks. Quote Link to comment Share on other sites More sharing options...
Triffki Posted December 8, 2012 Report Share Posted December 8, 2012 I get a similar error to this but at address 0: rm -rf _output/* rm -rf _output rm -rf *.cod *.map *.lst rm -rf *.hex mkdir -p _output /usr/local/bin/gpasm -c -p p18f452 -I./src -I /Users/user/Desktop/MIOS/include/asm -I /Users/user/Desktop/MIOS/include/share -I /Users/user/Desktop/MIOS/modules/debug_msg -I /Users/user/Desktop/MIOS/modules/app_lcd/dummy -DDEBUG_MODE=0 -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -DDONT_INCLUDE_MIOS_ENC_TABLE -I /Users/user/Desktop/MIOS/modules/mios_wrapper /Users/user/Desktop/MIOS/modules/mios_wrapper/mios_wrapper.asm -o _output/mios_wrapper.o /usr/local/bin/gpasm -c -p p18f452 -I./src -I /Users/user/Desktop/MIOS/include/asm -I /Users/user/Desktop/MIOS/include/share -I /Users/user/Desktop/MIOS/modules/debug_msg -I /Users/user/Desktop/MIOS/modules/app_lcd/dummy -DDEBUG_MODE=0 /Users/user/Desktop/MIOS/modules/app_lcd/dummy/app_lcd.asm -o _output/app_lcd.o /usr/local/bin/sdcc -c -mpic16 -p18f452 --fommit-frame-pointer --optimize-goto --optimize-cmp --disable-warning 85 --obanksel=2 -I./src -I /Users/user/Desktop/MIOS/include/c -I /Users/user/Desktop/MIOS/include/share -I /Users/user/Desktop/MIOS/modules/debug_msg -DDEBUG_MODE=0 main.c -o _output/main.o /usr/local/bin/gpasm -c -p p18f452 -I./src -I /Users/user/Desktop/MIOS/include/asm -I /Users/user/Desktop/MIOS/include/share -I /Users/user/Desktop/MIOS/modules/debug_msg -I /Users/user/Desktop/MIOS/modules/app_lcd/dummy -DDEBUG_MODE=0 /Users/user/Desktop/MIOS/modules/debug_msg/debug_msg.asm -o _output/debug_msg.o gplink -s /Users/user/Desktop/MIOS/etc/lkr/p18f452.lkr -m -o project.hex /Users/user/Desktop/MIOS/lib/libsdcc.lib /Users/user/Desktop/MIOS/lib/pic18f452.lib _output/mios_wrapper.o _output/app_lcd.o _output/main.o _output/debug_msg.o error: multiple sections using address 0 make: *** [project.hex] Error 1 Any thoughts, suggestions? Quote Link to comment Share on other sites More sharing options...
TK. Posted December 8, 2012 Report Share Posted December 8, 2012 Could you please attach your sources to this thread for further analysis? Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Triffki Posted December 8, 2012 Report Share Posted December 8, 2012 Hi, I'm using the base package from the bottom of the MIOS8 download page on ucApps. I've added all of these files to a new Xcode project as described here: http://www.midibox.org/dokuwiki/doku.php?id=how_to_use_xcode2_as_ide_on_a_mac I get a bit confused when it mentions the MAKEFILE.SPEC file as this isn't in the package. Nevertheless, I skipped over this part and went on to set up the application target, and also installed SDCC (version 2.6.0) and GPASM (version 0.13.4 beta) on usr/local/bin. I had to add paths to Makefile and common.mk to get them to compile, and these edited files are attached. Here is the shell script I used to initiate the build in Xcode: export MIOS_PATH=~/Desktop/MIOS PATH=/usr/local/bin:$PATH chmod +x /usr/local/bin cd $SRCROOT make exit 0 Makefile.rtf common.rtf Quote Link to comment Share on other sites More sharing options...
TK. Posted December 8, 2012 Report Share Posted December 8, 2012 Hi, this is the wrong SDCC and GPUTILS version. I think that it really makes sense that I'm hosting the right versions at midibox.org Here we are: http://www.midibox.org/mios8_toolchain Please let me know if this works, then I will update the Wiki accordingly. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Triffki Posted December 9, 2012 Report Share Posted December 9, 2012 Cheers for the link. How do I go about updating them? Do I just drag and drop the perls into usr/local/bin? Quote Link to comment Share on other sites More sharing options...
TK. Posted December 9, 2012 Report Share Posted December 9, 2012 It doesn't matter where the directories are located. /usr/local/bin is the traditional location, today we prefer /opt It's important, that your PATH variable points to the appr. bin directories of the packages. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Triffki Posted December 9, 2012 Report Share Posted December 9, 2012 ok, so supposing I put those directories in a folder on my desktop called 'blob', would I have to edit the common.mk file like this: # if MIOS_SHELL environment variable hasn't been set by the user, set it here # Ubuntu users should set it to /bin/bash from external (-> "export MIOS_SHELL /bin/bash") MIOS_SHELL ?= sh export MIOS_SHELL=Users/user/Desktop/blob # output directory OUTDIR = _output # add default libraries LIBS += $(MIOS_PATH)/lib/libsdcc.lib $(MIOS_PATH)/lib/pic$(PROCESSOR).lib # GPASM execution via wrapper GPASM = $(MIOS_SHELL)/gputils-0.14.3/bin/gpasm -c # SDCC execution via wrapper SDCC = $(MIOS_SHELL)/sdcc-2.8.0/bin/sdcc -c ? Do I then have to edit the shell script to this: # shell script goes here export MIOS_PATH=~/Desktop/MIOS PATH=/Desktop/blob:$PATH chmod +x /usr/local/bin cd $SRCROOT make exit 0 ? As you may have guessed I'm a bit lost with all this at the moment, but thanks very much for your advice! Quote Link to comment Share on other sites More sharing options...
TK. Posted December 9, 2012 Report Share Posted December 9, 2012 There are some obsolete settings in your script... Actually it should work this way: # shell script goes here # path to MIOS base directory export MIOS_PATH=~/Desktop/MIOS # path to MIOS bin directory export MIOS_BIN_PATH=${MIOS_PATH}/bin # path to SDCC and GPUTILS bin directories export PATH=~/Desktop/blob/sdcc/bin:~/Desktop/blob/gputils/bin:$PATH # change to SRCROOT (which is passed by Xcode?) cd $SRCROOT # execute the makefile make [/code] Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Triffki Posted December 10, 2012 Report Share Posted December 10, 2012 Now I get a segmentation fault: rm -rf _output/* rm -rf _output rm -rf *.cod *.map *.lst rm -rf *.hex mkdir -p _output sh /Users/user/Desktop/MIOS/bin/mios-gpasm -c -p p18f452 -I./src -I /Users/user/Desktop/MIOS/include/asm -I /Users/user/Desktop/MIOS/include/share -I /Users/user/Desktop/MIOS/modules/debug_msg -I /Users/user/Desktop/MIOS/modules/app_lcd/dummy -DDEBUG_MODE=0 -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -DDONT_INCLUDE_MIOS_ENC_TABLE -I /Users/user/Desktop/MIOS/modules/mios_wrapper /Users/user/Desktop/MIOS/modules/mios_wrapper/mios_wrapper.asm -o _output/mios_wrapper.o /Users/user/Desktop/MIOS/bin/mios-gpasm: line 141: 274 Segmentation fault gpasm $ARGS make: *** [_output/mios_wrapper.o] Error 139 Quote Link to comment Share on other sites More sharing options...
TK. Posted December 10, 2012 Report Share Posted December 10, 2012 Oh! :-( Which MacOS version are you using? Maybe I've to compile the binaries differently. I'm using 10.8 Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Triffki Posted December 10, 2012 Report Share Posted December 10, 2012 I'm running 10.6.8. Could it be anything to do with the fact I have older versions of SDCC and GPUTILS lying around? Quote Link to comment Share on other sites More sharing options...
TK. Posted December 11, 2012 Report Share Posted December 11, 2012 No, because the right versions are selected with highest priority in the PATH variable. It could be, that this is related to a 32bit/64bit issue; Leopard is running in 32bit mode, right? I need some time to find out how to compile for 32bit with the existing Xcode toolchain, because it seems that this isn't properly documented. :-/ Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Triffki Posted December 11, 2012 Report Share Posted December 11, 2012 Ah ok then. Yeah I believe its 32bit. No worries, I've got a PC so I'll try to compile on that instead Thanks again, and good luck! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.