Contiki: serialdump-linux executable is broken in instant-contiki

Created on 17 May 2015  路  10Comments  路  Source: contiki-os/contiki

From https://github.com/contiki-os/contiki/pull/1048

When cloning a vanilla contiki in Instant Contiki and executing the serialdump-linux fails to run, shows
./serialdump-linux -h bash: ./serialdump-linux: cannot execute binary file

Recompiling and running again shows a different error:
./serialdump-linux /dev/ttyUSB0 connecting to /dev/ttyUSB0 (115200) open: Invalid argument

However the device is connected:
Z1RC00848 /dev/ttyUSB0 Silicon Labs Zolertia Z1

Reverting back to the previous pre-compiled object at 09a9f0d00a1bd8065f3866c3c577f949569fdf99 works as expected.

bug

All 10 comments

32- vs 64-bit thing?

That was my first guess, but recompiling didn't work.

@alignan I was able to reproduce the issue on another system. Could you try https://github.com/cmorty/contiki/tree/pull/serialdump

Sure! here are the results, the current binary:

$ ./serialdump-linux /dev/ttyUSB1 bash: ./serialdump-linux: cannot execute binary file

Recompiling brings joy:
$ ./serialdump-linux /dev/ttyUSB1 connecting to /dev/ttyUSB1 (115200) [OK] Send --> 81

Probably someone should recompile the binaries. Shipping binaries isn't the best idea anyway. Or ship precompiled ones and copy them in the Makefile if there is no CC available. But that's for someone else to ponder about. :) Probably adding a regression test for the binary would be a good idea, too.

New Pull: https://github.com/contiki-os/contiki/pull/1076

hello, @alignan @g-oikonomou , i am trying to set up contiki on Raspbian within Raspberry Pi3,
i have done all the necessary and all works fine, but finally met a problem when i make login:

pi@raspberrypi:~/contiki/examples/hello-world $ make login
using saved target 'zoul'
../../tools/sky/serialdump-linux -b115200 /dev/ttyUSB0
../../tools/sky/serialdump-linux: 1: ../../tools/sky/serialdump-linux: Syntax error: ")" unexpected
../../platform/zoul/Makefile.zoul:115: recipe for target 'login' failed
make: *** [login] Error 2

It seems to be the problem about serialdump-linux issue related to here.
Could you please tell me how to figure it ?

Thx a lot!

ps: i am using armv71 , i think it is 32bit of arch.

pi@raspberrypi:~/contiki/examples/hello-world $ Linux raspberrypi 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux

You need to recompile the serialdump binary, as the current one it has been compiled for a different architecture.

cd tools && rm serialdump-linux && make serialdump && mv serialdump serialdump-linux

This is also not the place to ask questions, you should write instead to the contiki mailing list :smile: (sorry for reviving an issue already closed)

Which probably tells us that we may want to reconsider shipping binaries... :)

Yes, it works! but it should be in repo sky.
so cd tools/sky && rm serialdump-linux && make serialdump && mv serialdump serialdump-linux
thx kindly @alignan @g-oikonomou :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alejandr0 picture alejandr0  路  12Comments

ragbagger16 picture ragbagger16  路  10Comments

joakimeriksson picture joakimeriksson  路  36Comments

remyleone picture remyleone  路  3Comments

davidsantosb picture davidsantosb  路  7Comments