ARMmbed / yotta

DEPRECATED: yotta build; better software
Apache License 2.0
163 stars 63 forks source link

IDE/Eclipse integration? #604

Open ilg-ul opened 8 years ago

ilg-ul commented 8 years ago

I am considering using yotta modules for my own projects (GNU ARM Eclipse and XCDL), but, in addition to command line support (which I fully agree to be mandatory), I would also need IDE integration (more specifically Eclipse integration).

Unfortunately, I think yotta has some portability problems, which makes this integration difficult:

These days I've been thinking on these issues and here are some thoughts:

As possible compromises:

As far as I can tell, the only missing thing from this image is the possibility to run Python scripts from build scripts.

I do not know how many modules would be affected by not having Python available and if it is realistic to imagine if a version of yotta without Python can be functional.

In case there is anyone else interested in such an Eclipse/other IDE integration, I'd be glad to discuss details.

autopulated commented 8 years ago

Thanks for the detailed feedback, easy things first :grinning:

And the hard things:

I'm sure that there are other people interested in IDE integration, for both Eclipse and others, here ;) I hope this can be a good place for further discussion.

ilg-ul commented 8 years ago

CMake ... Building software, especially embedded software, can get very gnarly around the edges.

yes, building embedded software is not easy, and if you want to support all fantasies that people can come up when using a command line approach and manually configured build systems, it is close to 'mission impossible'; but if you use a managed build environment like Eclipse CDT you do not have to deal with these details, you just throw in sources, headers, linker script, compile options, defines, libraries, everything, and on the other side you get the binary. the CDT build handles all details, generates simple make files, and the build is quite fast. I never felt the need for more, so... I cannot confirm that CMake is really required.

Timmmm commented 8 years ago

I strongly agree with the original comment. I've tried to integrate yotta with Qt Creator, which actually supports CMake. It sort-of works, but you have to re-run yt build to add/remove files, and the linking step doesn't work (Error: you do not have 'intelhex' installed). CMake and Python are fine if you do all your editing from the command line, but they're about the worse choices possible for IDE integration.

It's too late to change in the short term, but in the medium term I would:

  1. Rewrite the yotta program itself in Go. It has a nice large standard library to simplify things like HTTP. There's even a git library you can use (rather than distributing the git binaries - I must have 5 copies of them on my machine by now). It also has the huge advantage of being trivial to cross-compile statically linked binaries. Good luck doing that with Python or C++.
  2. Support more build systems. Unfortunately there still isn't a standard IDE-friendly build system so I can't see any way around it other than just supporting several of them. Some support file globbing so at least you won't have to re-run yt build just to add/remove files. I'd recommend:
    • QBS
    • Eclipse
    • Visual Studio

I don't think you should do this by using CMake to generate the build files.

ilg-ul commented 8 years ago

thank you @Timmmm for your comments. unfortunately I doubt they will make any difference for yotta.

but in xPack/XCDL I plan to correct all these issues, so if you are interested, I can keep you posted on the progress.