forked from platformio/platformio-core
Add generic targets for IDE // Resolve #427
This commit is contained in:
1 parent
7a7fa845fe
commit
df099e15c0
15 files changed
+196
-28
No files matched your search
Generated
+22
-5
@@ -2,13 +2,15 @@
|
||||
<project version="4">
|
||||
<component name="CMakeRunConfigurationManager" shouldGenerate="true" assignedExecutableTargets="true" buildAllGenerated="true">
|
||||
<generated>
|
||||
<config projectName="clion" targetName="PLATFORMIO_CLEAN" />
|
||||
<config projectName="clion" targetName="PLATFORMIO_RUN" />
|
||||
<config projectName="clion" targetName="PLATFORMIO" />
|
||||
<config projectName="clion" targetName="clion" />
|
||||
<config projectName="clion" targetName="DEBUG" />
|
||||
<config projectName="clion" targetName="PLATFORMIO_BUILD" />
|
||||
<config projectName="clion" targetName="PLATFORMIO_UPLOAD" />
|
||||
<config projectName="clion" targetName="PLATFORMIO_CLEAN" />
|
||||
<config projectName="clion" targetName="PLATFORMIO_PROGRAM" />
|
||||
<config projectName="clion" targetName="PLATFORMIO_UPLOADFS" />
|
||||
<config projectName="clion" targetName="PLATFORMIO_UPDATE_ALL" />
|
||||
<config projectName="clion" targetName="DEBUG" />
|
||||
</generated>
|
||||
</component>
|
||||
<component name="CMakeSettings" AUTO_RELOAD="true" GENERATION_PASS_SYSTEM_ENVIRONMENT="true">
|
||||
@@ -185,11 +187,26 @@
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<list size="4">
|
||||
<configuration default="false" name="PLATFORMIO_UPLOADFS" type="CMakeRunConfiguration" factoryName="Application" WORKING_DIR="" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="clion" TARGET_NAME="PLATFORMIO_UPLOADFS" CONFIG_NAME="Debug">
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="false" name="PLATFORMIO_PROGRAM" type="CMakeRunConfiguration" factoryName="Application" WORKING_DIR="" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="clion" TARGET_NAME="PLATFORMIO_PROGRAM" CONFIG_NAME="Debug">
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="false" name="PLATFORMIO_UPDATE" type="CMakeRunConfiguration" factoryName="Application" WORKING_DIR="" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="clion" TARGET_NAME="PLATFORMIO_UPDATE_ALL" CONFIG_NAME="Debug">
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<list size="7">
|
||||
<item index="0" class="java.lang.String" itemvalue="Application.Build All" />
|
||||
<item index="1" class="java.lang.String" itemvalue="Application.PLATFORMIO_BUILD" />
|
||||
<item index="2" class="java.lang.String" itemvalue="Application.PLATFORMIO_CLEAN" />
|
||||
<item index="3" class="java.lang.String" itemvalue="Application.PLATFORMIO_UPLOAD" />
|
||||
<item index="2" class="java.lang.String" itemvalue="Application.PLATFORMIO_CLEAN" />
|
||||
<item index="5" class="java.lang.String" itemvalue="Application.PLATFORMIO_PROGRAM" />
|
||||
<item index="4" class="java.lang.String" itemvalue="Application.PLATFORMIO_UPLOADFS" />
|
||||
<item index="6" class="java.lang.String" itemvalue="Application.PLATFORMIO_UPDATE" />
|
||||
</list>
|
||||
</component>
|
||||
<component name="ShelveChangesManager" show_recycled="false" />
|
||||
|
||||
@@ -13,8 +13,8 @@ include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/lib/gcc/
|
||||
add_definitions(-DF_CPU=16000000L)
|
||||
add_definitions(-DARDUINO_ARCH_AVR)
|
||||
add_definitions(-DARDUINO_AVR_UNO)
|
||||
add_definitions(-DARDUINO=10605)
|
||||
add_definitions(-DPLATFORMIO=020304)
|
||||
add_definitions(-DARDUINO=10607)
|
||||
add_definitions(-DPLATFORMIO=020701)
|
||||
add_definitions(-D__AVR_ATmega328P__)
|
||||
|
||||
add_custom_target(
|
||||
@@ -35,4 +35,24 @@ add_custom_target(
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_executable(clion src/blink.cpp)
|
||||
add_custom_target(
|
||||
PLATFORMIO_PROGRAM ALL
|
||||
COMMAND ${PLATFORMIO_CMD} -f -c clion run --target program
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
PLATFORMIO_UPLOADFS ALL
|
||||
COMMAND ${PLATFORMIO_CMD} -f -c clion run --target uploadfs
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
PLATFORMIO_UPDATE_ALL ALL
|
||||
COMMAND ${PLATFORMIO_CMD} -f -c clion update
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_executable(clion
|
||||
src/blink.cpp
|
||||
)
|
||||
@@ -131,6 +131,14 @@
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>false</runAllBuilders>
|
||||
</target>
|
||||
<target name="PlatformIO: Update platforms and libraries" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>platformio</buildCommand>
|
||||
<buildArguments>-f -c eclipse</buildArguments>
|
||||
<buildTarget>update</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>false</runAllBuilders>
|
||||
</target>
|
||||
</buildTargets>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
@@ -32,6 +32,37 @@
|
||||
"upload"
|
||||
],
|
||||
"name": "Upload"
|
||||
},
|
||||
{
|
||||
"cmd":
|
||||
[
|
||||
"platformio",
|
||||
"-f", "-c", "sublimetext",
|
||||
"run",
|
||||
"--target",
|
||||
"program"
|
||||
],
|
||||
"name": "Upload using Programmer"
|
||||
},
|
||||
{
|
||||
"cmd":
|
||||
[
|
||||
"platformio",
|
||||
"-f", "-c", "sublimetext",
|
||||
"run",
|
||||
"--target",
|
||||
"uploadfs"
|
||||
],
|
||||
"name": "Upload SPIFFS image"
|
||||
},
|
||||
{
|
||||
"cmd":
|
||||
[
|
||||
"platformio",
|
||||
"-f", "-c", "sublimetext",
|
||||
"update"
|
||||
],
|
||||
"name": "Update platforms and libraries"
|
||||
}
|
||||
],
|
||||
"working_dir": "${project_path:${folder}}",
|
||||
|
||||
Reference in new issue
Block a user