File tree Expand file tree Collapse file tree 9 files changed +177
-9
lines changed Expand file tree Collapse file tree 9 files changed +177
-9
lines changed Original file line number Diff line number Diff line change 176
176
ASFLAGS = env .get ("CCFLAGS" , [])[:]
177
177
)
178
178
179
- if isfile (
180
- join (
181
- platform .get_package_dir ("tool-teensy" ) or "" ,
182
- "teensy_loader_cli" )):
179
+ if any ([
180
+ isfile (
181
+ join (
182
+ platform .get_package_dir ("tool-teensy" ) or "" ,
183
+ "teensy_loader_cli%s" % b )) for b in ("" , ".exe" )
184
+ ]):
183
185
env .Append (
184
186
UPLOADER = "teensy_loader_cli" ,
185
187
UPLOADERFLAGS = [
194
196
REBOOTER = "teensy_reboot" ,
195
197
UPLOADER = "teensy_post_compile" ,
196
198
UPLOADERFLAGS = [
197
- "-file=firmware" , '-path=" $BUILD_DIR" ' ,
198
- '-tools="%s" ' % (platform .get_package_dir ("tool-teensy" ) or "" )
199
+ "-file=firmware" , '-path=$BUILD_DIR' ,
200
+ '-tools=%s ' % (platform .get_package_dir ("tool-teensy" ) or "" )
199
201
],
200
202
UPLOADHEXCMD = '$UPLOADER $UPLOADERFLAGS' )
201
203
Original file line number Diff line number Diff line change
1
+ .pioenvs
2
+ .clang_complete
3
+ .gcc-flags.json
Original file line number Diff line number Diff line change
1
+ # Continuous Integration (CI) is the practice, in software
2
+ # engineering, of merging all developer working copies with a shared mainline
3
+ # several times a day < http://docs.platformio.org/en/stable/ci/index.html >
4
+ #
5
+ # Documentation:
6
+ #
7
+ # * Travis CI Embedded Builds with PlatformIO
8
+ # < https://docs.travis-ci.com/user/integration/platformio/ >
9
+ #
10
+ # * PlatformIO integration with Travis CI
11
+ # < http://docs.platformio.org/en/stable/ci/travis.html >
12
+ #
13
+ # * User Guide for `platformio ci` command
14
+ # < http://docs.platformio.org/en/stable/userguide/cmd_ci.html >
15
+ #
16
+ #
17
+ # Please choose one of the following templates (proposed below) and uncomment
18
+ # it (remove "# " before each line) or use own configuration according to the
19
+ # Travis CI documentation (see above).
20
+ #
21
+
22
+
23
+ #
24
+ # Template #1: General project. Test it using existing `platformio.ini`.
25
+ #
26
+
27
+ # language: python
28
+ # python:
29
+ # - "2.7"
30
+ #
31
+ # sudo: false
32
+ # cache:
33
+ # directories:
34
+ # - "~/.platformio"
35
+ #
36
+ # install:
37
+ # - pip install -U platformio
38
+ #
39
+ # script:
40
+ # - platformio run
41
+
42
+
43
+ #
44
+ # Template #2: The project is intended to by used as a library with examples
45
+ #
46
+
47
+ # language: python
48
+ # python:
49
+ # - "2.7"
50
+ #
51
+ # sudo: false
52
+ # cache:
53
+ # directories:
54
+ # - "~/.platformio"
55
+ #
56
+ # env:
57
+ # - PLATFORMIO_CI_SRC=path/to/test/file.c
58
+ # - PLATFORMIO_CI_SRC=examples/file.ino
59
+ # - PLATFORMIO_CI_SRC=path/to/test/directory
60
+ #
61
+ # install:
62
+ # - pip install -U platformio
63
+ #
64
+ # script:
65
+ # - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N
Original file line number Diff line number Diff line change
1
+ .. Copyright 2014-present PlatformIO <[email protected] >
2
+ Licensed under the Apache License, Version 2.0 (the "License");
3
+ you may not use this file except in compliance with the License.
4
+ You may obtain a copy of the License at
5
+ http://www.apache.org/licenses/LICENSE-2.0
6
+ Unless required by applicable law or agreed to in writing, software
7
+ distributed under the License is distributed on an "AS IS" BASIS,
8
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ See the License for the specific language governing permissions and
10
+ limitations under the License.
11
+
12
+ How to build PlatformIO based project
13
+ =====================================
14
+
15
+ 1. `Install PlatformIO <http://docs.platformio.org/en/stable/installation.html >`_
16
+ 2. Download `development platform with examples <https://github.com/platformio/platform-teensy/archive/develop.zip >`_
17
+ 3. Extract ZIP archive
18
+ 4. Run these commands:
19
+
20
+ .. code-block :: bash
21
+
22
+ # Change directory to example
23
+ > cd platform-teensy/examples/mbed-events
24
+
25
+ # Build project
26
+ > platformio run
27
+
28
+ # Upload firmware
29
+ > platformio run --target upload
30
+
31
+ # Clean build files
32
+ > platformio run --target clean
Original file line number Diff line number Diff line change
1
+
2
+ This directory is intended for the project specific (private) libraries.
3
+ PlatformIO will compile them to static libraries and link to executable file.
4
+
5
+ The source code of each library should be placed in separate directory, like
6
+ "lib/private_lib/[here are source files]".
7
+
8
+ For example, see how can be organized `Foo` and `Bar` libraries:
9
+
10
+ |--lib
11
+ | |--Bar
12
+ | | |--docs
13
+ | | |--examples
14
+ | | |--src
15
+ | | |- Bar.c
16
+ | | |- Bar.h
17
+ | |--Foo
18
+ | | |- Foo.c
19
+ | | |- Foo.h
20
+ | |- readme.txt --> THIS FILE
21
+ |- platformio.ini
22
+ |--src
23
+ |- main.c
24
+
25
+ Then in `src/main.c` you should use:
26
+
27
+ #include <Foo.h>
28
+ #include <Bar.h>
29
+
30
+ // rest H/C/CPP code
31
+
32
+ PlatformIO will find your libraries automatically, configure preprocessor's
33
+ include paths and build them.
34
+
35
+ See additional options for PlatformIO Library Dependency Finder `lib_*`:
36
+
37
+ http://docs.platformio.org/en/stable/projectconf.html#lib-install
38
+
Original file line number Diff line number Diff line change
1
+ ; PlatformIO Project Configuration File
2
+ ;
3
+ ; Build options: build flags, source filter, extra scripting
4
+ ; Upload options: custom port, speed and extra flags
5
+ ; Library options: dependencies, extra library storages
6
+ ;
7
+ ; Please visit documentation for the other options and examples
8
+ ; http://docs.platformio.org/en/stable/projectconf.html
9
+
10
+ [env:teensy31]
11
+ platform = teensy
12
+ framework = mbed
13
+ board = teensy31
Original file line number Diff line number Diff line change
1
+ #include " mbed_events.h"
2
+ #include < stdio.h>
3
+
4
+ int main () {
5
+ // creates a queue with the default size
6
+ EventQueue queue;
7
+
8
+ // events are simple callbacks
9
+ queue.call (printf, " called immediately\n " );
10
+ queue.call_in (2000 , printf, " called in 2 seconds\n " );
11
+ queue.call_every (1000 , printf, " called every 1 seconds\n " );
12
+
13
+ // events are executed by the dispatch method
14
+ queue.dispatch ();
15
+ }
Original file line number Diff line number Diff line change 12
12
"type" : " git" ,
13
13
"url" : " https://github.com/platformio/platform-teensy.git"
14
14
},
15
- "version" : " 1.5 .0" ,
15
+ "version" : " 1.6 .0" ,
16
16
"packageRepositories" : [
17
17
" https://dl.bintray.com/platformio/dl-packages/manifest.json" ,
18
18
" https://sourceforge.net/projects/platformio-storage/files/packages/manifest.json/download" ,
42
42
"framework-arduinoteensy" : {
43
43
"type" : " framework" ,
44
44
"optional" : true ,
45
- "version" : " ~1.131 .0"
45
+ "version" : " ~1.135 .0"
46
46
},
47
47
"framework-mbed" : {
48
48
"type" : " framework" ,
You can’t perform that action at this time.
0 commit comments