Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Mar 17 15:48
    a3f commented #43
  • Mar 17 15:41
    goretkin opened #43
  • Mar 16 18:35
    goretkin commented #34
  • Oct 10 2021 12:01
    a3f commented #53
  • Oct 10 2021 10:08
    pacojavi closed #53
  • Oct 10 2021 10:07
    pacojavi ready_for_review #53
  • Oct 10 2021 10:06
    pacojavi converted_to_draft #53
  • Jul 24 2021 03:46
    Eisverygoodletter closed #56
  • Jul 24 2021 03:46
    Eisverygoodletter commented #56
  • Jun 28 2021 09:53
    pacojavi commented #53
  • Jun 27 2021 20:38
    JakubVanek commented #53
  • Jun 27 2021 19:34
    a3f commented #56
  • Jun 26 2021 06:14
    Eisverygoodletter opened #56
  • Jun 16 2021 06:41
    pacojavi synchronize #53
  • Jun 13 2021 23:39
    pacojavi synchronize #53
  • Jun 11 2021 19:26
    pacojavi synchronize #53
  • Jun 11 2021 18:52
    pacojavi synchronize #53
  • May 18 2021 16:59
    pacojavi synchronize #53
  • May 15 2021 06:30
    pacojavi synchronize #53
  • Apr 25 2021 17:09
    pacojavi synchronize #53
botondklenk
@botondklenk
@JakubVanek I see then ill try the other way till then.
Jakub Vaněk
@JakubVanek
It seems it does kind-of work, but the experience isn't ideal.
It is necessary to right-click on the project folder in Project Explorer, go to Properties and there it should be enough to set these options:
musl1.png
musl2.png
The first screenshot also shows where the -static-libstdc++ needs to be removed in the case of the GCC 4.3.3 toolchain.
Jakub Vaněk
@JakubVanek
Then it is necessary to copy cs-make.exe and cs-rm.exe from GCC 4.3.3 to the musl gcc bin folder so that the eclipse build system works
and finally, it is necessary to recompile libev3api.a...
First, the toolchain path needs to be fixed in path/to/ev3/API/Makefile (CROSS_COMPILE=/path/to/toolchain/bin/armel-linux-musleabi-). Then the API can be recompiled by running this in CMD in the path/to/ev3/API folder:
del /Q *.o *.a *.d example
/path/to/toolchain/bin/cs-make.exe
C++ compilation can be made to work with the GCC 4.3.3 though and this should be easier to set up
Jakub Vaněk
@JakubVanek
stock2.png
This needs to replace the -static-libstdc++ flag; the -rpath argument will add a new search path for shared libraries on the brick. EDIT: the content is -Wl,-rpath,/home/root/lms2012/prjs
Jakub Vaněk
@JakubVanek
You then only need to upload the libstdc++ library using ev3duder, optionally stripping it before to reduce its size:
copy <path to gcc4.3.3>/arm-none-linux-gnueabi/libc/usr/lib/libstdc++.so.6 libcpp.so
<path to gcc4.3.3>/bin/arm-none-linux-gnueabi-strip libcpp.so
ev3duder up libcpp.so /home/root/lms2012/prjs/libcpp.so
ev3duder exec "mv /home/root/lms2012/prjs/libcpp.so /home/root/lms2012/prjs/libstdc++.so.6"
botondklenk
@botondklenk
@JakubVanek is it important to use the 4.3.3 version?
Jakub Vaněk
@JakubVanek
@botondklenk The GCC 4.3.3 shipped with C4EV3 has the advantage that almost all its system libraries (except for libstdc++) are already on the brick, removing the necessity of static linking (-> decreasing binary size) and ruling out incompatibilities between the shared libraries. It should be possible to use other versions too, but the setup may be a bit different.
botondklenk
@botondklenk
@JakubVanek Could you help me find a link cause i only find newr versions?
botondklenk
@botondklenk
@JakubVanek i guess its a problem that i cant find the libcpp.so file...
Jakub Vaněk
@JakubVanek
@botondklenk The file is in reality <toolchain>/arm-none-linux-gnueabi/libc/usr/lib/libstdc++.so.6, but ev3duder cannot upload the library with a plus in its name (it is not the fault of ev3duder though), so it has to be uploaded as "libcpp.so" or something without a plus in it.
Jakub Vaněk
@JakubVanek
However, C4EV3 programs are still trying to find the library under the name libstdc++.so.6, which is why it is necessary to execute the mv (move) command on the brick via ev3duder exec - this will rename it from libcpp.so to libstdc++.so.6.
botondklenk
@botondklenk
So i kind of know what i miss understanded, but its still not working. Is the copy command right, i mean cmd says that it cant find the file. Im still learning the commands ands stuff so sry if dont know something that should be easy...
botondklenk
@botondklenk
Now i can find it, but i have no right to copy it.
Jakub Vaněk
@JakubVanek
@botondklenk I'm sorry for the delayed reply. I think the problem is that the path to the ev3duder.exe binary has to be provided too (I have forgotten it), it should be C:\ev3\uploader\ev3duder.exe.
botondklenk
@botondklenk
It wasnt that, i just uploaded succesfully, now ill try the program.
I just have one more problem, after some setting changes the project cant find the string libary. Where did i just remove it?
Jakub Vaněk
@JakubVanek
Can you still build the program? I saw some glitches in Eclipse where it would show some code in red for a while.
If the build fails too, does the g++ command in the output window have an argument like -nostdinc or -nostdinc++?
Jakub Vaněk
@JakubVanek
@botondklenk Last idea I have is if can Windows find a file named "string" somewhere in the GCC4.3.3 directory?
botondklenk
@botondklenk
I cant build it says: 'arm-linux-musleabi-g++' is not recognized as an internal or external command,
operable program or batch file. And i tried it and it goes wrong when i overwrite the prefix in toolchain settings.
Jakub Vaněk
@JakubVanek
This seems to come from the musl toochain. GCC4.3.3 needs the prefix to be arm-none-linux-gnueabi- (I hope) and the path to be set to the toolchain directory.
botondklenk
@botondklenk
@JakubVanek Now i feel terrible... i just misstyped the name.
I don't know what did i wrong... but the EV3 only display the mindstorms logo and the name of the program again.
Jakub Vaněk
@JakubVanek
@botondklenk Re name: That's okay, everybody makes mistakes :smile:
botondklenk
@botondklenk
I guess i have problems with this: "ev3duder exec "mv /home/root/lms2012/prjs/libcpp.so /home/root/lms2012/prjs/libstdc++.so.6"" cause in that directory i only have the libcpp.so file.
Jakub Vaněk
@JakubVanek
This will be it, the program is trying to find the library, but it cannot. However, the move should succeed, yet it failed for some reason.
Jakub Vaněk
@JakubVanek
Creating a symbolic link to the library instead of moving it may help. This can be done with .../ev3duder.exe exec "ln -s libcpp.so /home/root/lms2012/prjs/libstdc++.so.6"
botondklenk
@botondklenk
Is that normal that if i write anyithing after exec than its not say that it happend or not? Anyway it didnt work yet...
Jakub Vaněk
@JakubVanek
This is strange, it should say "'exec' finished successfully" or something like that
Jakub Vaněk
@JakubVanek
@botondklenk When you plug in your EV3, does it appear also as a flash drive?
this is a feature of the 1.10E firmware that was developed by Microsoft for their MakeCode environment
I think it accepts only files in a special UF2 format, but it has an open specification
I have hacked together a python script that is able to create a limited variant of it, so I can try to send you the library packed inside it
Jakub Vaněk
@JakubVanek
this only needs to be dropped to the emulated USB flash drive, the software on the brick does the rest
this installs /home/root/lms2012/prjs/BrkProg_SAVE/libstdc++.so.6 and a small test app (sources here)
to make compilation in Eclipse work, it will be necessary to replace the rpath argument with -Wl,-rpath,/home/root/lms2012/prjs/BrkProg_SAVE as now the library is in a subdirectory
Jakub Vaněk
@JakubVanek
@a3f Could you please take a look at my pull requests for ev3duder? There are some fixes to the existing code and then there are some less used but still useful new features
botondklenk
@botondklenk
@JakubVanek I will try it thanks for all the help :D
Ahmad Fatoum
@a3f
@JakubVanek ye, it's on my bucket list for tomorrow. Sorry for the delay
Habib ShahErshad
@HShahershad_twitter
Hi, I'm new with ev3, I try to install c4ev3 but the installation not complete due to cannot find eclipse directory. What should I do? I already install Eclipse. I'm using windows