SOLVED ![]()
LINUX - UBUNTU 14
1. Install some Software:
open “Terminal” type, and enter/install this:
sudo apt-get install gputils
Dont do this:
sudo apt-get install sdcc
- it would install the latest version (in my case 3.3.0) - and that may dont work.
Do this:
manually download 2.8.0, unzip anyware, reading the Install.txt :
Change to the sdcc directory and copy all files to /usr/local
cd sdcc
cp -r * /usr/local
This will install sdcc binaries into: /usr/local/bin/
header files into: /usr/local/share/sdcc/include/
library files into: /usr/local/share/sdcc/lib/
and documentation into: /usr/local/share/sdcc/doc/
You can test the install by entering
/usr/local/bin/sdcc -v
should return:
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.0 #5117 (Mar 23 2008) (UNIX)
2. add some variables in the file “/etc/enviroment”
MIOS_PATH=“/mios/”
MIOS_BIN_PATH=“/mios/bin”
MIOS_SHELL=“/bin/bash” <<< the " " was the problem!!!
PROCESSOR=18f452
you have to write the whole path (crimic is my username):
MIOS_PATH=“/home/crimic/mios”
MIOS_BIN_PATH=“/home/crimic/mios/bin”
MIOS_SHELL=/bin/bash
PROCESSOR=18f452
click save >>> ooops the file “Enviroment” is “Read only” - no save possible — so 1.1:
1.1 have “write rights” to change the “enviroment”
open “terminal” (console, command) tpe “gksudo” > enter > a window with a clear field pop up > type “nautilus” (nautilus is the “explorer”/“filemanagement” of ubuntu) > nautilus now pop up > navigate to /etc/enviroment > add following lines @ the end of the document:
MIOS_PATH=“/home/crimic/mios”
MIOS_BIN_PATH=“/home/crimic/mios/bin”
MIOS_SHELL=/bin/bash
PROCESSOR=18f452
This Tutorial say…<Forget this Tutorial it’s outdatet!
1.2 Proove if you do right: open “terminal” type
printenv PROCESSOR
now it prints:
18f452
well done!
3. Download toolchain
well not very easy to find, in the tutorial for windows i found that mios_base_v1_1.zip
or you do it with:
svn checkout svn://svnmios.midibox.org/mios
but then you have to change the Mios paths in 1.1! (/mios/trunk…)
After download, i renamed the “mios_base_v1_1” folder into “mios” and drop the folder in my USER (deutsch Persönlicher Ordner) - so if you now open “terminal” and you type:
cd mios
cd apps
cd examples
cd lcd7
cd dog
cd c
make
this should build/make an application but i get errors:
rm -rf _output/*
rm -rf _output
rm -rf *.cod *.map *.lst
rm -rf *.hex
mkdir -p _output
/bin/bash /home/crimic/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/crimic/mios/include/asm -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/app_lcd/dog -DDEBUG_MODE=0 -DSTACK_HEAD=0x37f -DSTACK_IRQ_HEAD=0x33f -I /home/crimic/mios/modules/mios_wrapper /home/crimic/mios/modules/mios_wrapper/mios_wrapper.asm -o _output/mios_wrapper.o
/bin/bash /home/crimic/mios/bin/mios-gpasm -c -p p18f452 -I./src -I /home/crimic/mios/include/asm -I /home/crimic/mios/include/share -I /home/crimic/mios/modules/app_lcd/dog -DDEBUG_MODE=0 /home/crimic/mios/modules/app_lcd/dog/app_lcd.asm -o _output/app_lcd.o
/bin/bash /home/crimic/mios/bin/mios-sdcc -c -mpic16 -p18f452 --fommit-frame-pointer --optimize-goto --optimize-cmp --disable-warning 85 --obanksel=2 -I./src -I /home/crimic/mios/include/c -I /home/crimic/mios/include/share -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/bin/../share/sdcc/include/pic16/pic18fregs.h:427:25: error: pic18f452.h: No such file or directory
/home/crimic/mios/include/c/cmios.h:245: syntax error: token -> ‘char’ ; column 43
make: *** [_output/main.o] Fehler 1
well this path /user/bin is really no such file or directory!!!
but this exist:
/usr/share/sdcc/include/pic16
of course i would love to simply make a 32bit applicaton, and use the new cores, but i have 10 or more 8bit cores here!!! I shame to waste them! — and for my things (triggerbox for techstar ts306) it is really enough.