GithubHelp home page GithubHelp logo

eiryu / clionarduinoplugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vsch/clionarduinoplugin

0.0 0.0 0.0 32.36 MB

A plugin for CLion that enables arduino-cmake integration.

License: Apache License 2.0

Shell 0.08% C++ 19.49% C 0.30% Java 53.22% Kotlin 23.26% CMake 3.65%

clionarduinoplugin's Introduction

pluginIcon.svg Arduino Support

A JetBrains CLion plugin to integrate Arduino CMake into the IDE.

JetBrains Plugin Page

Install and create Arduino CMake projects in one click with new project wizard types and view communications with the integrated serial monitor tool window.

  • Arduino Sketch and Arduino Library project types to new project wizard, with Options to select board type, cpu, programmer and port.

  • Arduino Sketch new file action.

  • Serial port monitor tool window with options to disconnect on build start and reconnect on build complete.

    ⚠️ Build events are only available in CLion 2018.3 (or later) so these options are disabled if you are running an earlier version of CLion.

  • Change current build parameters Tools > Arduino Support > Change build settings.

  • Customize template files used for creating new projects.

  • Use bundled boards.txt and programmers.txt or your own versions.

Screenshot_NewProject.png

Screenshot_ProjectSettings

Screenshot_SerialMonitor

Screenshot_ChangeBuildSettings

Screenshot_ChangeBuildDiff

⚠️ Serial Port Monitor plugin cannot be used with Arduino Support

Both plugins use jSSC-2.8.0 serial library and only one plugin can load the native libraries. Please uninstall or disable Serial Port Monitor plugin before installing Arduino Support.

Uploading a sketch

Select the upload configuration from the dropdown. The type (debug/release) does not matter.

select upload from dropdown

Use the build action to upload your sketch. Do not use the run action.

Use build action, not run

Settings (Preferences on Mac)

Some settings can also be changed in settings under Languages & Frameworks > Arduino, for convenience.

Additionally, you can point the plugin to your own versions of boards.txt and programmers.txt.

Screenshot_AppSettings

The Show Difference button is only displayed when a valid file is selected to let you quickly see if there are differences from the bundled version.

The Create From Bundled button is only displayed when a non-existent directory is given and it can be created. Pressing it will create the directory and populate it with the bundled templates. For layout and caveats of this directory please refer to the README.md file in that directory.

On Disconnect Delay, 50ms default. Introduces a short (0-100ms) delay before a build when disconnecting a port to allow the port to become available. On some projects with very short build times, disconnecting a port does not allow enough time for the port to become available, causing the upload to fail with "Resource busy" error. Adding a short delay after disconnect solves the problem. On some project it is not needed on others 20ms was sufficient.

Status

Forked to fix CLion 2018 issues and decided to add a few creature comforts:

From previous experience, when I see an issue open for a couple of years I can see that the maintainer is no longer motivated by the project. I can understand but I am not motivated to report suggestions or go to the trouble of a PR. I feel it would be a hassle to the maintainer.

I opt out for another solution or implement it myself. At least with the latter I am limited by my available time and motivation to get the functionality the way I like it. Until I too loose interest. Then maybe someone else will pick up the torch at take it further.

Wish List

  • Convert to project wizard in new project as Arduino Sketch Project, instead of file menu item.
  • Add Configuration options:
  • User selectable boards.txt and programmers.txt location. By default the plugin will use embedded version of these files.
  • Add: Serial Terminal tool window, current Serial Monitor plugin is functional but prevents JSSC native libraries from being used to list available ports, is not actively developed and lacks creature comforts:
    • auto disconnect on project build so update build can connect to the board,
    • reconnect after successful build is done
    • recognize the enter key as send
    • option to send individual keys as they are typed, with or without local echo, simulating a real serial
    • Add Hex pane in addition to text view. Either one or both could be displayed. With coordinated highlighting carets between the two. That way text view is not mangled into a block but naturally flows as you would expect, while hex view can be either a block or flow to match the text.
    • Display of ascii codes without resorting to hex display in text mode console.
  • add CMake parser and builder to allow extracting and modifying CMake files programmatically, after project creation
  • add option for using customized project templates
  • add code for loading project options from CMakeLists.txt (for UI modification)
  • Add UI for changing existing CMakeLists.txt configuration
    • Change board, cpu, programmer, port, etc. All options which were available on project creation and make sense to modify on existing project.
  • Refactoring support which CLion does not handle:
    • Add file to sources or headers (CLion cannot make sense of the Arduino project file)
    • Add updating of keywords.txt when identifiers in source or headers are renamed.
    • Add reload of CMakeLists.txt when library includes are added.
  • Add Import Arduino IDE config, sketches and libraries
  • Load Additional Libraries from URLs
  • Add: Generate keywords.txt action to generate keywords.txt based on contained project classes and functions.

Release notes

Version Notes

History

This plugin is a fork of Original CLionArduinoPlugin written by Francois Campbell.

Notes

For serial port list and functionality the plugin uses jSSC-2.8.0, Licensed under GNU Lesser GPL

clionarduinoplugin's People

Contributors

vsch avatar francoiscampbell avatar matthiaskunnen avatar

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.