forked from platformio/platformio-core
Reorganise examples
This commit is contained in:
1 parent
34f7b8b19a
commit
ebd2e31efe
74 files changed
+37
-16026
No files matched your search
@@ -0,0 +1,20 @@
|
||||
TI MSP430: Native Blink Example
|
||||
===============================
|
||||
|
||||
1. Download ``platformio``
|
||||
`sources <https://github.com/ivankravets/platformio/archive/develop.zip>`_
|
||||
2. Extract ZIP archive
|
||||
3. Then run these commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change directory to example
|
||||
$ cd platformio-develop/examples/timsp430-native-blink/
|
||||
|
||||
# Install TI MSP430 development platform
|
||||
$ platformio install timsp430
|
||||
|
||||
# Process example project
|
||||
$ platformio run
|
||||
|
||||
.. image:: console-result.png
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 175 KiB |
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
[env:launchpad_msp430g2]
|
||||
platform = timsp430
|
||||
board_mcu = msp430g2553
|
||||
board_f_cpu = 16000000L
|
||||
|
||||
upload_protocol = rf2500
|
||||
|
||||
# targets = upload
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
* See LICENSE for details.
|
||||
*/
|
||||
|
||||
#include <msp430g2553.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
WDTCTL = WDTPW + WDTHOLD;
|
||||
|
||||
// make the LED pin an output for P1.0
|
||||
P1DIR |= 0x01;
|
||||
|
||||
volatile int i;
|
||||
|
||||
while (1)
|
||||
{
|
||||
for (i = 0; i < 10000; i++);
|
||||
|
||||
// toggle the LED
|
||||
P1OUT ^= 0x01;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user