File tree 10 files changed +62
-43
lines changed
10 files changed +62
-43
lines changed Original file line number Diff line number Diff line change 1
1
Release History
2
2
===============
3
3
4
- 0.3.0 (? )
4
+ 0.3.0 (2014-06-21 )
5
5
---------
6
6
7
7
* Allowed to pass multiple "SomePlatform" to install/uninstall commands
8
8
* Added "IDE Integration" section to README with Eclipse project examples
9
+ * Created auto installer script for *PlatformIO * (`issue #3 <https://github.com/ivankravets/platformio/issues/3 >`_)
10
+ * Added "Super-Quick" way to Installation section (README)
11
+ * Implemented "build_flags" option for environments (`issue #4 <https://github.com/ivankravets/platformio/issues/4 >`_)
9
12
10
13
11
14
0.2.0 (2014-06-15)
Original file line number Diff line number Diff line change @@ -16,3 +16,4 @@ board = lpmsp430g2553
16
16
platform = titiva
17
17
framework = energia
18
18
board = lplm4f120h5qr
19
+ build_flags = " -DLED_PIN=GREEN_LED"
Original file line number Diff line number Diff line change 8
8
with intervals of 1 second (1000 milliseconds)
9
9
*/
10
10
11
- #ifdef ENERGIA
12
-
13
- #include "Energia.h"
14
- #define WLED RED_LED
15
-
16
- #else
17
-
18
11
#include "Arduino.h"
19
- #define WLED 13 // Most Arduino boards already have an LED attached to pin 13 on the board itself
20
12
13
+ #ifndef LED_PIN
14
+ #define LED_PIN 13 // Most Arduino boards already have an LED attached to pin 13 on the board itself
21
15
#endif
22
16
17
+
23
18
void setup ()
24
19
{
25
- pinMode (WLED , OUTPUT ); // set pin as output
20
+ pinMode (LED_PIN , OUTPUT ); // set pin as output
26
21
}
27
22
28
23
void loop ()
29
24
{
30
- digitalWrite (WLED , HIGH ); // set the LED on
31
- delay (1000 ); // wait for a second
32
- digitalWrite (WLED , LOW ); // set the LED off
33
- delay (1000 ); // wait for a second
25
+ digitalWrite (LED_PIN , HIGH ); // set the LED on
26
+ delay (1000 ); // wait for a second
27
+ digitalWrite (LED_PIN , LOW ); // set the LED off
28
+ delay (1000 ); // wait for a second
34
29
}
Original file line number Diff line number Diff line change 16
16
("PIOENV" ,),
17
17
("PLATFORM" ,),
18
18
("FRAMEWORK" ,),
19
+ ("BUILD_FLAGS" ,),
19
20
20
21
# board options
21
22
("BOARD" ,),
Original file line number Diff line number Diff line change 26
26
ASFLAGS = [
27
27
"-g" , # include debugging info (so errors include line numbers)
28
28
"-x" , "assembler-with-cpp" ,
29
- "-mmcu=$BOARD_MCU" ,
30
- "-DF_CPU=$BOARD_F_CPU"
29
+ "-mmcu=$BOARD_MCU"
31
30
],
31
+
32
32
CCFLAGS = [
33
33
"-g" , # include debugging info (so errors include line numbers)
34
34
"-Os" , # optimize for size
35
35
"-Wall" , # show warnings
36
36
"-ffunction-sections" , # place each function in its own section
37
37
"-fdata-sections" ,
38
38
"-MMD" , # output dependancy info
39
- "-mmcu=$BOARD_MCU" ,
40
- "-DF_CPU=$BOARD_F_CPU"
39
+ "-mmcu=$BOARD_MCU"
41
40
],
41
+
42
42
CXXFLAGS = ["-fno-exceptions" ],
43
43
44
+ CPPDEFINES = [
45
+ "F_CPU=$BOARD_F_CPU"
46
+ ],
47
+
44
48
LINKFLAGS = [
45
49
"-Os" ,
46
50
"-Wl,--gc-sections" ,
62
66
UPLOADEEPCMD = "$UPLOADER $UPLOADERFLAGS -U eeprom:w:$SOURCES:i"
63
67
)
64
68
69
+ if "BUILD_FLAGS" in env :
70
+ env .MergeFlags (env ['BUILD_FLAGS' ])
71
+
65
72
env .Append (
66
73
BUILDERS = dict (
67
74
ElfToEep = Builder (
Original file line number Diff line number Diff line change 19
19
ARDUINO_VERSION = int (
20
20
open (join (env .subst ("$PLATFORMFW_DIR" ),
21
21
"version.txt" )).read ().replace ("." , "" ).strip ())
22
- ARDUINO_FLAGS = [
23
- "-DARDUINO=%d" % ARDUINO_VERSION ,
24
- "-DARDUINO_%s" % BOARD_OPTIONS ['build.board' ]
25
- ]
26
22
27
23
# usb flags
24
+ ARDUINO_USBDEFINES = []
28
25
if "build.usb_product" in BOARD_OPTIONS :
29
- ARDUINO_FLAGS += [
30
- "-DUSB_VID=%s" % BOARD_OPTIONS ['build.vid' ],
31
- "-DUSB_PID=%s" % BOARD_OPTIONS ['build.pid' ],
32
- "-DUSB_PRODUCT=%s" % BOARD_OPTIONS ['build.usb_product' ].replace (
33
- '"' , "" )
26
+ ARDUINO_USBDEFINES = [
27
+ "USB_VID=%s" % BOARD_OPTIONS ['build.vid' ],
28
+ "USB_PID=%s" % BOARD_OPTIONS ['build.pid' ],
29
+ "USB_PRODUCT=%s" % BOARD_OPTIONS ['build.usb_product' ].replace ('"' , "" )
34
30
]
35
31
36
32
# include board variant
40
36
)
41
37
42
38
env .Append (
43
- ASFLAGS = ARDUINO_FLAGS ,
44
- CCFLAGS = ARDUINO_FLAGS ,
39
+ CPPDEFINES = [
40
+ "ARDUINO=%d" % ARDUINO_VERSION ,
41
+ "ARDUINO_%s" % BOARD_OPTIONS ['build.board' ]
42
+ ] + ARDUINO_USBDEFINES ,
45
43
CPPPATH = [
46
44
join ("$BUILD_DIR" , "core" ),
47
45
join ("$BUILD_DIR" , "variant" )
Original file line number Diff line number Diff line change 19
19
ENERGIA_VERSION = int (
20
20
open (join (env .subst ("$PLATFORMFW_DIR" ),
21
21
"version.txt" )).read ().replace ("." , "" ).strip ())
22
- ENERGIA_FLAGS = [
23
- "-DARDUINO=101" ,
24
- "-DENERGIA=%d" % ENERGIA_VERSION
25
- ]
26
22
27
23
# include board variant
28
24
env .VariantDir (
31
27
)
32
28
33
29
env .Append (
34
- ASFLAGS = ENERGIA_FLAGS ,
35
- CCFLAGS = ENERGIA_FLAGS ,
30
+ CPPDEFINES = [
31
+ "ARDUINO=101" ,
32
+ "ENERGIA=%d" % ENERGIA_VERSION
33
+ ],
36
34
CPPPATH = [
37
35
join ("$BUILD_DIR" , "core" ),
38
36
join ("$BUILD_DIR" , "variant" )
Original file line number Diff line number Diff line change 28
28
ASFLAGS = [
29
29
"-g" , # include debugging info (so errors include line numbers)
30
30
"-x" , "-assembler-with-cpp" ,
31
- "-mmcu=$BOARD_MCU" ,
32
- "-DF_CPU=$BOARD_F_CPU"
31
+ "-mmcu=$BOARD_MCU"
33
32
],
33
+
34
34
CCFLAGS = [
35
35
"-g" , # include debugging info (so errors include line numbers)
36
36
"-Os" , # optimize for size
37
37
"-Wall" , # show warnings
38
38
"-ffunction-sections" , # place each function in its own section
39
39
"-fdata-sections" ,
40
40
"-MMD" , # output dependancy info
41
- "-mmcu=$BOARD_MCU" ,
42
- "-DF_CPU=$BOARD_F_CPU"
41
+ "-mmcu=$BOARD_MCU"
42
+ ],
43
+
44
+ CPPDEFINES = [
45
+ "F_CPU=$BOARD_F_CPU"
43
46
],
44
47
45
48
LINK = "$CC" ,
57
60
UPLOADCMD = '$UPLOADER $UPLOADERFLAGS "prog $SOURCES"'
58
61
)
59
62
63
+ if "BUILD_FLAGS" in env :
64
+ env .MergeFlags (env ['BUILD_FLAGS' ])
65
+
60
66
env .Append (
61
67
BUILDERS = dict (
62
68
ElfToHex = Builder (
Original file line number Diff line number Diff line change 31
31
"-mcpu=cortex-m4" ,
32
32
"-mfloat-abi=hard" ,
33
33
"-mfpu=fpv4-sp-d16" ,
34
- "-fsingle-precision-constant" ,
35
- "-DF_CPU=$BOARD_F_CPU"
34
+ "-fsingle-precision-constant"
36
35
],
37
36
38
37
CCFLAGS = [
47
46
"-mfloat-abi=hard" ,
48
47
"-mfpu=fpv4-sp-d16" ,
49
48
"-fsingle-precision-constant" ,
50
- "-MMD" , # output dependancy info
51
- "-DF_CPU=$BOARD_F_CPU"
49
+ "-MMD" # output dependancy info
52
50
],
53
51
54
52
CXXFLAGS = [
55
53
"-fno-rtti" ,
56
54
"-fno-exceptions"
57
55
],
58
56
57
+ CPPDEFINES = [
58
+ "F_CPU=$BOARD_F_CPU"
59
+ ],
60
+
59
61
LINKFLAGS = [
60
62
"-Os" ,
61
63
"-nostartfiles" ,
73
75
UPLOADCMD = "$UPLOADER $SOURCES"
74
76
)
75
77
78
+ if "BUILD_FLAGS" in env :
79
+ env .MergeFlags (env ['BUILD_FLAGS' ])
80
+
76
81
env .Append (
77
82
BUILDERS = dict (
78
83
ElfToBin = Builder (
Original file line number Diff line number Diff line change 11
11
# [env:mybaseenv]
12
12
# platform = %INSTALLED_PLATFORM_NAME_HERE%
13
13
14
+ # Environment with specific build flags
15
+ # [env:specbuildflags]
16
+ # platform = %INSTALLED_PLATFORM_NAME_HERE%
17
+ # build_flags = "-I/opt/include -L/opt/lib -lfoo -DMYDEFINE=13"
18
+
14
19
#
15
20
# Atmel AVR based board
16
21
#
You can’t perform that action at this time.
0 commit comments