so i was getting ready to try and start making some kinda app… i figured the best place to start would be to get this to compile on my box first. along the way i ran into two errors when i run make in a clean copy of the sdcc_skeleton from svn.
the easy one…
/home/l/midibox/svn/mios/trunk/bin/mios-gpasm: 24: declare: not found
/home/l/midibox/svn/mios/trunk/bin/mios-gpasm: 27: declare: not found
i fixed these 2 errors by changing “declare -a” to “local” on both lines in the mios-gpasm script and saving the file.
—apparently this error is caused by the ubuntu team switching the default shell between 6.06 and 8.04 from sh to dash according to what i read here: https://wiki.kubuntu.org/DashAsBinSh
so i’m sorta new to programming.. does anyone have any ideas on what would fix this in the mios-gpasm script? obviously i know it’s a syntax error in the code on line 37, but, i don’t know what the correct syntax is YET.. i will search on!
in the meantime… does anyone have any ideas on what would fix this in the mios-gpasm script?
I added those lines in “/etc/environment” to have them set at startup automatically. You should not have to modify mios-gpasm at all, this looks like some basic missconfiguration to me.
If you have your toolchain set up properly (sdcc / gputils), and the environment variables above, try “make” in the sdcc skelleton folder. If this fails, there’s something wrong.
If this works, copy “main.c” “Makefile” “README.txt” from the sdcc skelleton folder to a new folder (without .svn dir!) and start coding
I suppose you first made a clean checkout of the whole mios-repository?
yes, did this as a first step…
did you define your environment variables properly? in my kubuntu system:
MIOS_SHELL=“/bin/bash”
DOH! this is one would have prevented me needing to change the “declare -a” to “local”, i bet…
with stryd’s help in chat the other day, i discovered what was missing… it was my PATH variables. i did set the MIOSPATH and MIOS_BIN_PATH up in my /etc/environment file. i must have missed the SHELL variable in my excitement of learning to program these pic thingys.
(on a side note… the ubuntu build environment howto has “and now we need to set up our environment variables…” and then nothing after searching through the wiki and the forums i didn’t find a list of everything that needs to be set with PATH=. maybe i overlooked something)
If this works, copy “main.c” “Makefile” “README.txt” from the sdcc skelleton folder to a new folder (without .svn dir!) and start coding
will give it a go with a clean copy of mios-gpasm, after i set up the rest of my PATH (MIOS_SHELL=“/bin/bash”).
ehh.. ok fixed… i finally tried to recompile and it’s all well after setting ALL the correct environment variables… in /etc/environment. (i swear i read about 30 forum posts and wiki pages looking for them.. )
with stryd’s help in chat the other day, i discovered what was missing… it was my PATH variables. i did set the MIOSPATH and MIOS_BIN_PATH up in my /etc/environment file. i must have missed the SHELL variable in my excitement of learning to program these pic thingys.
Errr… Guilty. I forgot that you were on ubuntu, and didn’t tell you about the MIOS_SHELL var. I did grab you the next day and tell you though! There was a lot of traffic I guess you missed it. Sorry man!