From 7d9cd1c2aebfa1fd13cf18c9b81ced87fa089c50 Mon Sep 17 00:00:00 2001 From: Zach Massia Date: Sun, 3 Jan 2016 00:31:12 -0500 Subject: [PATCH] Add ext. programmer and spiffs targets to Emacs --- docs/ide/emacs.rst | 12 +++++++----- platformio/ide/tpls/emacs/CMakeLists.txt.tpl | 12 ++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/docs/ide/emacs.rst b/docs/ide/emacs.rst index 1152d1f0..db530846 100644 --- a/docs/ide/emacs.rst +++ b/docs/ide/emacs.rst @@ -57,12 +57,14 @@ command and generate project via :option:`platformio init --ide` command: cmake . -There are 4 predefined targets for building. +There are 6 predefined targets for building. -* ``platformio_build`` - Build project without auto-uploading. (``C-c i b``) -* ``platformio_upload`` - Build and upload (if no errors). (``C-c i u``) -* ``platformio_clean`` - Clean compiled objects. (``C-c i c``) -* ``platformio_update`` - Update installed platforms and libraries. (``C-c i d``) +* ``platformio_build`` - Build project without auto-uploading. (``C-c i b``) +* ``platformio_upload`` - Build and upload (if no errors). (``C-c i u``) +* ``platformio_programmer_upload`` - Build and upload using external programmer (if no errors). (``C-c i p``) +* ``platformio_spiffs_upload`` - Upload files to file system SPIFFS). (``C-c i s``) +* ``platformio_clean`` - Clean compiled objects. (``C-c i c``) +* ``platformio_update`` - Update installed platforms and libraries. (``C-c i d``) .. warning:: The libraries which are added, installed or used in the project diff --git a/platformio/ide/tpls/emacs/CMakeLists.txt.tpl b/platformio/ide/tpls/emacs/CMakeLists.txt.tpl index 7083f466..1f457290 100644 --- a/platformio/ide/tpls/emacs/CMakeLists.txt.tpl +++ b/platformio/ide/tpls/emacs/CMakeLists.txt.tpl @@ -39,6 +39,18 @@ add_custom_target( WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) +add_custom_target( + platformio_programmer_upload ALL + COMMAND ${PLATFORMIO_CMD} -f -c emacs run --target program + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +add_custom_target( + platformio_spiffs_upload ALL + COMMAND ${PLATFORMIO_CMD} -f -c emacs run --target uploadfs + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + add_custom_target( platformio_update ALL COMMAND ${PLATFORMIO_CMD} -f -c emacs update