Open MJBina opened 1 year ago
Hi @MJBina. Short answer — Yes
, but it will take time :)
See Vladimir's comment here: https://github.com/vsch/CLionArduinoPlugin/issues/62#issuecomment-1464742400
Tried CLion 2023.1.1 on an Arduino project with Arduino Support plugin. Get error on loading:
CMake Error at /Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.25/Modules/Platform/UnixPaths.cmake:47 (_cmake_record_install_prefix):
Unknown CMake command "_cmake_record_install_prefix".
Call Stack (most recent call first):
arduino-cmake/ArduinoToolchain.cmake:23 (include)
cmake-build-debug/CMakeFiles/3.25.2/CMakeSystem.cmake:6 (include)
CMakeLists.txt:59 (project)
CLion.app/Contents/bin/cmake/mac/share/cmake-3.25/Modules/Platform/UnixPaths.cmake:47
Is the culprit, _cmake_record_install_prefix()
was not in the last working version CLion 2022.2, but is in 2022.3 and 2023.1 and 2023.1.1
Removing the line allows Arduino-CMake projects to work, but you will need to do it manually in the installed app contents.
I don't know if it will work on Windows but since UnixPaths.cmake will not be included in the script it should work.
I also updated cmake/Platform/Arduino.cmake to scan the included library directory and if it has source files under src/
to automatically set RECURSE
for the library. I don't see when not having this done and forcing the user to do it, would be a better option. So I applied the changes. I tripped over this in my project and decided to look into the cmake file.
I also added the option to specify an external Toolchain file, with an option to create from bundled. Again, having the toolchain copied into every project is convenient for sharing the project across systems but is a pain when the toolchain files need updating. Now there is an option to create it locally and new projects will have this toolchain referenced instead of project directory local one.
Did not try it, but specifying another toolchain altogether, like Arduino-CMake-Toolchain might work out of the box.
@MJBina, @KSDaemon, the dist directory has a new build 1.5.35 https://github.com/vsch/CLionArduinoPlugin/blob/master/dist/CLionArduinoPlugin-1.5.35.zip
This one works from 2020.3 to 2023.1, and should work for later versions unless the API changes a lot.
I migrated to gradle build and fixed a bunch of complaints and deprecation warnings. Some I cannot fix without bringing up the minimum version, which I don't think is worth it.
If someone has a Windows machine setup for Arduino development, I would like to know if it works on the latest versions.
List of fixes and changes:
2020.3
for gradle build compatibility with later versions.ArduinoToolchain.cmake
to work with CLion 2022.3 and 2023.1Change Build Options
action.CommandArgument
class to encapsulate the value and leading spaces instead of lugging around two separate lists._SRCS
and _HRDS
to be resolved, with arguments to remain unresolved.CMakeLists.txt
file. Only changing text for values which were changed.CMakeLists.txt
file with mixed project macro name when PROJECT_NAME
or CMAKE_PROJECT_NAME
is used to set _SRCS
and _HDRS
, while project was set with another macro name, for example project(${ANOTHER_NAME})
ArduinoToolchain.cmake
so that other toolchain files will not be erroneously compared to bundled version.Platform/Arduino.cmake
ArduinoToolchain.cmake
file name automatically.cmake
directory and tool chain files in every project. Also allows to use different toolchain than ArduinoCmake.cmake
.src/
subdirectory containing source files. If one is found the library source search is recursed.cmake-build
or examples
. Otherwise, it went off to use sources from the build directories to determine library dependence.programmers.txt
from Arduino version 1.8.19
@vsch Wow! That's awesome! Thank you! I'll give it a try!
Pre-Release available. This version factored out serial port comms to a separate plugin, which could be used by multiple plugins without conflicting on the jssc
implementation. See version notes in the release if interested.
This means the IDE will prompt you to install the SimpleSerialConnectorService
plugin, when installing Arduino Support.
You can download the pre-release plugin from the assets of the release https://github.com/vsch/CLionArduinoPlugin/releases/tag/1.5.39 or from this link: https://github.com/vsch/CLionArduinoPlugin/releases/download/1.5.39/CLionArduinoPlugin-1.5.39.zip and install the plugin from disk in IDE plugins page.
Tried to install 1.5.39 release from zip - strangely can not activate the plugin. It installs sucessfully, I can see it in the plugins list, but Enabling/putting a checkmark doesn't make any sense.
CLion 2023.1.1 / Mac OS
Did the IDE prompt you to install SimpleSerialConnectorService plugin? It should have since it is a dependency of Arduino Support plugin.
On my system it prompts to install it and enable it.
You can install the SimpleSerialConnectorService from the marketplace and enable it. Afterwards, you should be able to enable Arduino Support.
Hmm... No... Just installed it by hands and now all is enabled and looks working! (At least loaded) I'll see how it goes! Thanks for your help!
The full error message is:
Error Plugin 'Arduino Support' (version '1.5.6') is not compatible with the current version of the IDE, because it requires build 222.* or older but the current build is CL-223.8836.42.
Is there an update planned?