Comments (15)
+-------------------------------------------------+
| |
| Hello, this is Flipper team speaking! |
| |
| We've migrated to new build system |
| It's nice and based on scons |
...
😢
from flipperzero-firmware.
The latest version of CLion (2020.2) introduces proper support for makefile-based projects and removes the necessity to use CMake to unlock the power features of the IDE. CLion seems to process the current repo out of the box (albeit I have the toolchain config already set up), code navigation and insights work very well. When the development hardware becomes available, setting up remote debugging with OpenOCD should either be automatic or pretty easy to set up.
Having said that, switching to CMake at this point when the repo is malleable is also an option.
from flipperzero-firmware.
Can CLion call external script (likedocker-compose
) to build project?
from flipperzero-firmware.
Can CLion call external script (like
docker-compose
) to build project?
Yes, it can call external scripts, but there is no real integration yet for docker with clion (real integration is on the roadmap).
Currently what you need to do is run a pre build script to launch a docker container and then deploy/build your code remotely over ssh in that docker container.
from flipperzero-firmware.
It will be great to add CLion/Idea integration if it don't require massive changing project structure and build system.
from flipperzero-firmware.
How about creating a Language Server Protocol (LSP) so users can connect to it from any editor/IDE they want?
from flipperzero-firmware.
How about creating a Language Server Protocol (LSP) so users can connect to it from any editor/IDE they want?
Interesting idea, I never use it before. We must start LSP server inside docker and IDE can connect to it?
from flipperzero-firmware.
We must start LSP server inside docker and IDE can connect to it?
LSP is a protocol, which means that if a client implements the protocol, it can work with any LSP server it wants to bring the IDE like experience into an editor/IDE, like autocomplete, navigation, errors, etc. The client usually is implemented as a plugin. I believe that the server can't be inside of a docker container, because it needs to have access to the file system to read a project's files. It can be just a process and a client can start/stop/restart an LSP server. Needless to say that each language should implement its own LSP server. So we will need to implement one, and any editor with an LSP plugin can work with it.
All the popular text editors/IDEs should already have a plugin that implements a client for LSP in their plugin repositories.
I used it with emacs + Rust LSP and vscode + Scala 3 LSP. No special plugins for a client were necessary, it was just a generic LSP client. The LSP servers fail sometimes and all the IDE-like features stopped working, I had to restart the server to get them back to work (which was annoying).
from flipperzero-firmware.
believe that the server can't be inside of a docker container, because it needs to have access to the file system to read a project's files.
But we have project dir mounted into container for build. I prefer to run server in docker because user shouldn't run something on its machine and shouldn't install something.
Is there a ready for use LSP servers exist?
from flipperzero-firmware.
Can CLion call external script (like
docker-compose
) to build project?Yes, it can call external scripts, but there is no real integration yet for docker with clion (real integration is on the roadmap).
Currently what you need to do is run a pre build script to launch a docker container and then deploy/build your code remotely over ssh in that docker container.
But IDE will not see libraries, compilers and so on if I understand correctly.
If we want to use SSH, maybe sshfs will be helpful: https://github.com/libfuse/sshfs
(Windows version: https://github.com/billziss-gh/sshfs-win)
Or maybe we just can mount directory to host?
For example, we have two directories /source /source-tmp and script prepare_enviroment.(sh\py).
- Run script
- Script copy files from /source to /source-tmp
- Run container that mount directory from container to /source
- Copy files from /source-tmp to /source
- ...
- Profit!
Also, Remote Development feature looks really promising: https://blog.jetbrains.com/clion/2018/09/initial-remote-dev-support-clion/#remote_development_what_can_i_do
(Maybe you mean exactly that and I just didn't understand)
from flipperzero-firmware.
But we have project dir mounted into container for build.
Mounting a project's directory into a docker container should work. The start command for the container becomes more complicated and that's it.
Is there a ready for use LSP servers exist?
There are plenty of LSP implementations, most of them are open source, we can fork one so we don't need to build everything from ground up. You might be interested in rust, for sublime you can use this plugin
from flipperzero-firmware.
But IDE will not see libraries, compilers and so on if I understand correctly.
why? You can start docker by docker-compose up -d && docker-compose exec dev bash
right now and get full environment with compilers, tools and project source mounted to /project
.
Did I understand correctly that LSP is the alternative to SSH-into-container and remote developement?
I have the following idea of how it should work:
- user start docker container by
docker-compose up -d
- LSP server starts at container startup
- user install LSP plugin for his editor and specify port that container is exposed
- ???
- PROFIT111
What about debugging features integration?
from flipperzero-firmware.
@neshkeev are you ready to integrate LSP into our image?
from flipperzero-firmware.
Look at VSCode + docker integration: https://github.com/MuratovAS/VScode_Docker_Stm32
from flipperzero-firmware.
Everyone feel good with current environment? What IDE are you using?
If this issue makes no sense, I will close it after 2 oct 14:00 UTC.
from flipperzero-firmware.
Related Issues (20)
- Flipper zero
- hey can you please give an IPA file? im on iOS 15 and the app needs iOS 16 (Unless its using newer API) HOT 1
- LFRFID: Indala E9 Support HOT 1
- R/W NFC file while emulating it HOT 1
- CC1101: Impossible to send a long preamble HOT 2
- Flipper crashes when continuously opening and closing the Passport screen
- CC1101: Fixed-length packet mode not supported HOT 3
- CC1101: Impossible to change registers without resetting the device HOT 1
- A JavaScript module for GPIO
- PIN code boot ? HOT 1
- devboard_flash ARGS="-c dev" works with FBT, but not with uFBT HOT 5
- MIFARE Ultralight C hex dump shows bogus data for locked pages HOT 1
- U2F not working at all HOT 6
- Support multiple devices for BT remote HOT 3
- Wrong allowed frequency for SM HOT 4
- Documentation suggestion: mention most 125khz RFID a person receives are read-only
- LFRFID: chubb 125khz tag support HOT 3
- NFC: Desfire Poller furi_check failed HOT 5
- Documentation: furi string HOT 1
- LFRFID: 125khz "Hitag 2" / Aritech ATS1477 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flipperzero-firmware.