Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serialdump-linux executable is broken in instant-contiki #1073

Closed
alignan opened this issue May 17, 2015 · 10 comments
Closed

serialdump-linux executable is broken in instant-contiki #1073

alignan opened this issue May 17, 2015 · 10 comments
Labels

Comments

@alignan
Copy link
Member

alignan commented May 17, 2015

From #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 09a9f0d works as expected.

@g-oikonomou
Copy link
Contributor

32- vs 64-bit thing?

@alignan
Copy link
Member Author

alignan commented May 17, 2015

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

@cmorty
Copy link
Contributor

cmorty commented May 18, 2015

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

@alignan
Copy link
Member Author

alignan commented May 18, 2015

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

@cmorty
Copy link
Contributor

cmorty commented May 18, 2015

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: #1076

@alignan
Copy link
Member Author

alignan commented Sep 7, 2015

Closed via #1076

@alignan alignan closed this as completed Sep 7, 2015
@zhangtuoparis13
Copy link

zhangtuoparis13 commented Nov 30, 2016

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

@alignan
Copy link
Member Author

alignan commented Nov 30, 2016

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 😄 (sorry for reviving an issue already closed)

@g-oikonomou
Copy link
Contributor

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

@zhangtuoparis13
Copy link

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants