Jump to content

Programming platform and Ubuntu 8.04


ris8_allo_zen0
 Share

Recommended Posts

Hi all,

I tried to compile button_duoled_matrix_v1_2b (which is a C application using the new programming platform, I think) in my Ubuntu 8.04 system and had some troubles:

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/app_lcd/dummy -I ./modules/blm  -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

./bin/mios-gpasm: 25: declare: not found

./bin/mios-gpasm: 28: declare: not found

./bin/mios-gpasm: 38: Syntax error: "(" unexpected (expecting "fi")

make: *** [_output/mios_wrapper.o] Error 2

I thought it was something related to sh/bash, so I changed the following lines in include/makefile/common.mk around line 30:

# GPASM execution via wrapper

GPASM = sh $(MIOS_BIN_PATH)/mios-gpasm -c

# SDCC execution via wrapper

SDCC = sh $(MIOS_BIN_PATH)/mios-sdcc -c

to

# GPASM execution via wrapper

GPASM = bash $(MIOS_BIN_PATH)/mios-gpasm -c

# SDCC execution via wrapper

SDCC = bash $(MIOS_BIN_PATH)/mios-sdcc -c

A similar issue is in the last line bin/mios-sdcc:

sdcc --asm="sh ${MIOS_BIN_PATH}/mios-gpasm -fixasm" $@

which I changed to

sdcc --asm="bash ${MIOS_BIN_PATH}/mios-gpasm -fixasm" $@

These fixes worked for me.

Moreover, gpasm and sdcc packages (and their related packages, sdcc-libraries) provided from the Ubuntu repository (i.e. from Synaptic) are too old for the MIOS programming platform. I also solved this issue by manually downloading the newer versions from the "unstable" Debian repository:

http://packages.debian.org/sid/i386/gputils/download

http://packages.debian.org/sid/all/gputils-common/download

http://packages.debian.org/sid/i386/sdcc/download

http://packages.debian.org/sid/all/sdcc-libraries/download

Best regards,

RAZ

Link to comment
Share on other sites

The workaround for "dash" (which is used as default shell instead of bash) are already in the repository

There is a new environment variable which has to be set by Ubuntu users:

export MIOS_SHELL=/bin/bash

For the case that you haven't downloaded the repository yet, just type:

svn co svn://svnmios.midibox.org/mios

Best Regards, Thorsten.

P.S.: the applications will be re-released once the modifications has been tested well enough on different operating systems.

Link to comment
Share on other sites

hi

yep basically there is a little issue with Ubuntu and probably other distros related to sh/bash/dash.There is a workaround as you ve found out, but probably something should be changed in the source code of the application, i know Stryd _one is working on it, if you want to join the bandwagon and some some ideas feel free to drop by the chat sometime.

Simone

eheh ok TK was faster not only on answering but getting the source fixed, thanks Ubuntu users are very happy for that! ;)

Link to comment
Share on other sites

Just for future reference and to help people find a hit in a search:

This also happens on Solaris, and HPUX, and any other debian-based distro. It will happen on any distro which does not use bash as the default shell.

If you're not sure, you can type:

sh --version

and if it doesn't say that it's 'bash', then you need to set this MIOS_SHELL variable to specify the path to bash.

You can use export as shown above, or set it in your .rc file permanently.

Just for the geeks:

Yes, we could have changed the scripts to just use bash, like ris8 did above.... but that would break it for users of MSYS, which does not have a bash.exe. This (like the old version of make) will be fixed in a future release of MSYS (1.0.11) but that release is not expected soon. So, we decided that unix geeks are more likely to be comfortable with setting an environment variable, than your average windows user.

Just for the future:

When we have our repository up and running, I will be maintaining more recent builds of our tools, so you can always install the package to know that you are using a version which has been tested and is used by myself and the other maintainers.

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...
 Share

×
×
  • Create New...