GithubHelp home page GithubHelp logo

Can't exec any program on EV3 about ev3-api HOT 15 CLOSED

c4ev3 avatar c4ev3 commented on August 18, 2024
Can't exec any program on EV3

from ev3-api.

Comments (15)

JakubVanek avatar JakubVanek commented on August 18, 2024 1

My tip would be the GCC version 6, or a combination of too new libc and too old on-brick kernel.
Try using the original CodeSourcery toolchain. Yes, it is quite old, but that's probably the only way to go without building your own toolchain or guessing which cross-compiler build is still compatible.

from ev3-api.

JakubVanek avatar JakubVanek commented on August 18, 2024

And you definitely should try linking with -static flag.

from ev3-api.

Fabcha44 avatar Fabcha44 commented on August 18, 2024

Thanks for your answer.
I downloaded the CodeSourcery toolchain but it's not working on Debian 9.
When I invoke the compiler I have the errror : "arm-non-linux-gnueabi-gcc: No such file or directory".
Googling that I read that I had to install ia32-libs.
Package which doesn't exist anymore on Debian, so I installed lib32z1and lib32ncurses5 (apt suggestion), which didn't change anything.

Any clue ?

Thanks,
Fabien

from ev3-api.

a3f avatar a3f commented on August 18, 2024

arm-non-linux-gnueabi-gcc

Does the error still persist after fixing the typo?
Is this the toolchain you're using?

from ev3-api.

Fabcha44 avatar Fabcha44 commented on August 18, 2024

Hi yes sorry for that.
And yes I use the toolchain, and I downloaded the libev3api.a from Guthub (https://github.com/c4ev3/EV3-API/blob/c125568da84981daa156da35c1bf6fa0fc737d54/API/libev3api.a).
However, that didn't solve the issue on the Brick.
Command used for compiling:
~/tmp/arm-2009q1/bin/arm-none-linux-gnueabi-gcc test.c -Os -o test -static -I../ev3-api/API ../ev3-api/API/libev3api.a

from ev3-api.

a3f avatar a3f commented on August 18, 2024

So compilation succeeds and file is uploaded, a menu entry is shown, but still no output on EV3 LCD?
Could you try connecting the EV3 via USB and run

./ev3duder exec /path/to/your/elf/file

You can use ./ev3duder ls or the EV3 File manager in Eclipse to browse around the EV3 file system.

./ev3duder exec pipes back the standard output of the process over HID, so it might provide a clue why the program crashes on the EV3. If you have a Netgear dongle, you could also try connecting over telnet (or was it ssh? You'd have to google).

from ev3-api.

a3f avatar a3f commented on August 18, 2024

Also could you test if at least microSD card works? We had two reports so far that brick storage doesn't work (anymore).

from ev3-api.

Fabcha44 avatar Fabcha44 commented on August 18, 2024

Yes compilation succeeds, menu entry is shown.
I tried with a SD_Card:
ev3duder ls ../prjs/SD_Card/BrkPrg_SAVE/
USB connection established.
00 23 00 00 00 01 99 00 04 2e 2e 2f 70 72 6a 73 2f 53 44 5f 43 61 72 64 2f 42 72 6b 50 72 67 5f 53 41 56 45 2f 00
Checking reply:
EE8E7E4DB7727E466188F3D0F56BB85C 00000048 test.rbf
45361034A998662F3EA68C40A31C7D1B 0009F09D test
../
./
LIST_FILES was successful.

With the SD_Card it's better: when I launch test, either via ev3duder or via EV3 I see that the Brick launch the program.
ev3duder exec ../prjs/SD_Card/BrkPrg_SAVE/test
USB connection established.
exec has been successful.
But I hear no sound, and as the change on the screen doesn't last I'm sure the 'sleep(2)' is not executed.

So I'll try the connection via telnet or ssh.

Thanks for your help.

from ev3-api.

a3f avatar a3f commented on August 18, 2024

If you have the right dongle, SSH/Telnet output would be very helpful.

from ev3-api.

Fabcha44 avatar Fabcha44 commented on August 18, 2024

Hi!
After having installed the EV3 firmware developer edition, everything's fine. I can launch the program either via Telnet or via the Brick, using the CodeSourcery toolchain.
Thanks for your help.
Regards,
Fabien

from ev3-api.

a3f avatar a3f commented on August 18, 2024

Thanks for the update. I didn't know about the developer firmware. Do ev3duder run or exec work now too?

from ev3-api.

Fabcha44 avatar Fabcha44 commented on August 18, 2024

Actually, it works only through wifi.
The reason seems to be that the transfer via USD is not complete. With an original ELF size of 650691 bytes, the file on the brick is only 649763:
root@EV3:/media/card/BrkPrg_SAVE# ls -l
-rwxr-xr-x 1 root root 649763 Jan 1 00:06 test

When transfered via Wifi (with the USD cable unplug), the size is good.

So, not sure that the problem came from my old firmware...

from ev3-api.

a3f avatar a3f commented on August 18, 2024

650691 bytes, the file on the brick is only 649763

Oh, not good. Could you please run:

dd if=/dev/zero of=test count=650691
ev3duder up test ../prjs/BrkPrg_SAVE/test
ev3duder ls ../prjs/BrkPrg_SAVE/

and confirm it prints a different size and whether it's again 649763 (second hex number).

I would like to create a bug report about this, but I don't have an EV3 to reproduce.

from ev3-api.

Fabcha44 avatar Fabcha44 commented on August 18, 2024

OK I have to say I don't understand at all what is happening.
Your test went succesfully (I add bs=1 in the dd command line).
Back to my real program and my script to download it into the brick:
Most of the it works work with thel ELF, and sometimes not, and I can't fund a rule...
Altough, the rbf file is usually not properly downloaded:
On my computer : #ll
[fabien@HPDEB ~/devel/eworkspace/test ]$ ll
total 748
-rwxrwxr-x+ 1 fabien domain users 0 Oct 13 22:23 make.c
-rwxrwxr-x+ 1 fabien domain users 311 Oct 15 10:29 make_test_sdcard.sh
-rwxrwxr-x+ 1 fabien domain users 320 Oct 14 19:02 make_test.sh
-rwxrwxr-x+ 1 fabien domain users 650691 Oct 15 10:30 test
-rwxrwxr-x+ 1 fabien domain users 65872 Oct 7 22:08 test.bin.bak
-rwxrwxr-x+ 1 fabien domain users 454 Oct 14 20:05 test.c
-rwxrwxr-x+ 1 fabien domain users 72 Oct 15 10:30 test.rbf

 **ev3duder up test.rbf ../prjs/SD_Card/BrkPrg_SAVE/test.rbf**
    USB connection established.
    `upload` was successful.
 **ev3duder ls ../prjs/SD_Card/BrkPrg_SAVE**
    USB connection established.
    00 22 00 00 00 01 99 00 04 2e 2e 2f 70 72 6a 73 2f 53 44 5f 43 61 72 64 2f 42 72 6b 50 72 67 5f 53 41 56 45 00 
    Checking reply: 
    D41D8CD98F00B204E9800998ECF8427E 00000000 test.rbf
    0A228D449871F44FDD1AC889F4FA794E 0009EDC3 test

The size of the rbf file is zero!

I add the 'sync' command in my script file between each ev3duder download command, but it change nothing.

I think I will keep working though wifi.

from ev3-api.

a3f avatar a3f commented on August 18, 2024

If I recall correctly, rbf files don't show up in the menu if they aren't in the SD card's root?
I have created an issue about the incomplete uploads here: c4ev3/ev3duder#6

from ev3-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.