mirror of
https://github.com/platformio/platformio-core.git
synced 2025-10-06 10:30:57 +02:00
Add src_dir
option to [platformio]
section of platformio.ini
which allows to redefine location to project’s source directory // Resolve #83
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
* See LICENSE for details.
|
||||
*/
|
||||
|
||||
#ifndef LED_PIN
|
||||
#define LED_PIN 13 // Most Arduino boards already have a LED attached to pin 13 on the board itself
|
||||
#endif
|
||||
|
||||
|
||||
void setup()
|
||||
{
|
||||
pinMode(LED_PIN, OUTPUT); // set pin as output
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
digitalWrite(LED_PIN, HIGH); // set the LED on
|
||||
delay(1000); // wait for a second
|
||||
digitalWrite(LED_PIN, LOW); // set the LED off
|
||||
delay(1000); // wait for a second
|
||||
}
|
21
examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst
Normal file
21
examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst
Normal file
@@ -0,0 +1,21 @@
|
||||
How to buid PlatformIO based project
|
||||
====================================
|
||||
|
||||
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
|
||||
2. Download `source code with examples <https://github.com/ivankravets/platformio/archive/develop.zip>`_
|
||||
3. Extract ZIP archive
|
||||
4. Run these commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to example
|
||||
> cd platformio-develop/examples/arduino-own-src_dir
|
||||
|
||||
# Process example project
|
||||
> platformio run
|
||||
|
||||
# Upload firmware
|
||||
> platformio run --target upload
|
||||
|
||||
# Clean build files
|
||||
> platformio run --target clean
|
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[platformio]
|
||||
src_dir = Blink
|
||||
|
||||
[env:arduino_uno]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = uno
|
Reference in New Issue
Block a user