2017-11-28 31 views
-2

Platformio를 사용하여 arduino 프로젝트에 CLion을 사용할 수 있으려면 link을 따랐습니다. 내가 여기에 게시 할 두 가지 이슈가 있는데, 관련성이 있다고 생각합니다.CLion 및 Platformio : 대상을 찾을 수 없습니다. 구성상의 문제

난 당신이 다음 이미지에서 볼 수 있듯이

Build project (DO NOT use “Run” button, see marks on the screenshot above): Menu: Run > Build.

을 말한다 마지막 단계에 갇히지있어

첫 번째 문제, PLATFORMIO_BUILD 대상은 고장 난 실행할 수 없습니다 그것.

Build bar

편집 구성은 다음과 같다, 그 같이 될 운명 나도 몰라. 다음 이미지에서 볼 수 있듯이 오류는 다음과 같습니다 : Target PLATFORMIO_BUILD not found.

Edit Configurations Window

나는 행운과 함께, 여러 번 과정을 반복했습니다. CLion은 2017.2.3이고 Platformio는 마지막 버전입니다.

프로젝트 자체는 괜찮습니다. platformio run --target upload을 명령 줄에서 실행하면 프로젝트가 컴파일되어 arduino에 업로드됩니다. 이 때문에

This file does not belong to any project target, code insight features might not work properly

이 CLion 사용의 이점의 대부분은 사라 :

두 번째 문제는

내 프로젝트의 모든 파일은 말 노란색 헤더를 보여줍니다.

모든 파일과 폴더가 포함 된 폴더는 회색으로 표시됩니다. CMAKELists에 수동으로 포함시켜야할지 모르겠지만, 이해하면 명령 platformio init --ide clion --board uno이 이미 처리됩니다.

처음으로 CLion을 사용하고 있으며 내가 인식하지 못하는 몇 가지 기본 구성에 문제가있는 것 같습니다. 감사!

답변

0

해결되었습니다. 나는 다음과 같은 오류가 점점 된 CMake 로그 확인 :

rm -rf /Library/Developer/CommandLineTools 

하고 다시 설치 :

Error:The C compiler "/usr/bin/cc" is not able to compile a simple test program. It fails with the following output: Change Dir: /Users/... .../default/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTC_ab383/fast" xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun CMake will not be able to correctly generate this project. Error:Configuration Debug The C compiler "/usr/bin/cc" is not able to compile a simple test program.

같은 문제가 here을 발견하고, here되었고, 내 경우에 해결책은 명령 행 도구를 제거했다 다시 :

xcode-select --install