platformio / platformio-core Goto Github PK
View Code? Open in Web Editor NEWYour Gateway to Embedded Software Development Excellence :alien:
Home Page: https://platformio.org
License: Apache License 2.0
Your Gateway to Embedded Software Development Excellence :alien:
Home Page: https://platformio.org
License: Apache License 2.0
Hello,
I tried to install the platformIO but I have problem:
with command platform run, this is the resultat on terminal
Traceback (most recent call last):
File "/usr/local/bin/platformio", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests
When i tried “platformio run" i got error:
MacBook-Pro-Andrey-2:timsp430-native-blink ak$ platformio run
Processing launchpad_msp430g2 environment:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/platformio/__main__.py", line 64, in main
cli()
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 572, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 552, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 893, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 744, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 388, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/platformio/commands/run.py", line 57, in cli
result = p.run(variables, envtargets)
File "/usr/local/lib/python2.7/site-packages/platformio/platforms/base.py", line 110, in run
] + variables + targets)
File "/usr/local/lib/python2.7/site-packages/platformio/util.py", line 68, in exec_command
p = Popen(args, stdout=PIPE, stderr=PIPE, shell=use_shell)
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
So i made changes in /usr/local/lib/python2.7/site-packages/platformio/util.py :
- p = Popen(args, stdout=PIPE, stderr=PIPE, shell=use_shell)
+ p = Popen(args, stdout=PIPE, stderr=PIPE, shell=True)
Then i got:
Processing launchpad_msp430g2 environment:
-Q: scons: command not found
So I made pip install --egg scons
Now the error is:
MacBook-Pro-Andrey-2:timsp430-native-blink ak$ platformio run
Processing launchpad_msp430g2 environment:
scons: *** No SConstruct file found.
File "/usr/local/lib/scons-2.3.0/SCons/Script/Main.py", line 905, in _main
But I have no idea where to get this file…
Allow to install PlatformIO via one command:
$ python get-platformio.py
Mac OS 10.9.5
Get the following message:
Command '['/usr/bin/python', '-m', 'pip', 'install', '-U', 'platformio']' returned non-zero exit status 2
[FAILURE]
The installation process has been FAILED!
I have a very simple project, see https://gist.github.com/ariejan/3cd2986afb67e054ba46 for the src/main.cpp
and platformio.ini
. Both are basically a copy of the examples provided by platformio.
I'm on OS X 10.9, with Python 2.7 through home brew:
$ which python
/usr/bin/python
$ python --version
Python 2.7.5
I can install and list frameworks just fine:
$ platformio list
atmelavr with packages: toolchain-atmelavr, tool-avrdude, framework-arduinoavr
$ platformio show atmelavr
atmelavr - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework)
----------
Package: toolchain-atmelavr
Alias: toolchain
Location: /Users/ariejan/.platformio/atmelavr/tools/toolchain
Version: 1
----------
Package: tool-avrdude
Alias: uploader
Location: /Users/ariejan/.platformio/atmelavr/tools/avrdude
Version: 1
----------
Package: framework-arduinoavr
Location: /Users/ariejan/.platformio/atmelavr/frameworks/arduino
Version: 4
However, when I try to run this, I get the following error:
$ platformio run
Processing arduino_mega environment:
ImportError: No module named platformio.util:
File "/usr/local/lib/python2.7/site-packages/platformio/builder/main.py", line 9:
from platformio.util import (get_home_dir, get_pioenvs_dir, get_project_dir,
Since I'm not all that familiar with Python, I've got no clue as to how to resolve this. There is a util.py
file at `` that contains the methods mentioned.
$ ls -alhd /usr/local/lib/python2.7/site-packages/platformio/*
-rw-r--r-- 1 ariejan admin 513B 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/__init__.py
-rw-r--r-- 1 ariejan admin 741B 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/__init__.pyc
-rw-r--r-- 1 ariejan admin 2,1K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/__main__.py
-rw-r--r-- 1 ariejan admin 3,1K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/__main__.pyc
drwxr-xr-x 8 ariejan admin 272B 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/builder
drwxr-xr-x 24 ariejan admin 816B 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/commands
-rw-r--r-- 1 ariejan admin 2,5K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/downloader.py
-rw-r--r-- 1 ariejan admin 3,9K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/downloader.pyc
-rw-r--r-- 1 ariejan admin 2,4K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/exception.py
-rw-r--r-- 1 ariejan admin 5,3K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/exception.pyc
-rw-r--r-- 1 ariejan admin 4,8K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/pkgmanager.py
-rw-r--r-- 1 ariejan admin 6,6K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/pkgmanager.pyc
drwxr-xr-x 12 ariejan admin 408B 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/platforms
-rw-r--r-- 1 ariejan admin 2,5K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/projectconftpl.ini
-rw-r--r-- 1 ariejan admin 2,2K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/unpacker.py
-rw-r--r-- 1 ariejan admin 4,5K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/unpacker.pyc
-rw-r--r-- 1 ariejan admin 2,1K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/util.py
-rw-r--r-- 1 ariejan admin 4,0K 4 aug 16:38 /usr/local/lib/python2.7/site-packages/platformio/util.pyc
What am I missing? What do I need to to fix my environment?
This is my first attempt at submitting a library, so please correct me if I'm doing it wrong. I have a github repo with a number of libraries, and so I figured I'd start by submitting a simple debugging framework from there.
I've placed the library.json file here: https://github.com/AMPWorks/ArduinoLibs/blob/master/Debug/library.json
However my attempts to submit this is failing with an error thats pretty generic:
$ platformio --version
PlatformIO, version 0.9.2
$ platformio lib register https://github.com/AMPWorks/ArduinoLibs/blob/master/Debug/library.json
Invalid library config: https://github.com/AMPWorks/ArduinoLibs/blob/master/Debug/library.json
Any idea whats wrong here? This is basically copied from the github example, except with the 'include' parameter added.
platformio fails to build the following sketch (tested in Arduino IDE)
void parse_string(String word);
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(13, HIGH);
delay(200);
digitalWrite(13, LOW);
delay(200);
parse_string("hello world");
delay(10);
}
void parse_string(String word) {
for (int i = 0; i < word.length(); i++) {
Serial.print(": "); Serial.println(i);
}
}
[env:myenv]
platform = atmelavr
framework = arduino
board = uno
C:\cb\td\win8\shell\work\25664f81-b958-42a6-07e2-d2a7bb60824f>platformio run
Processing myenv environment:
avr-g++ -o .pioenvs\myenv\firmware.elf -Os -Wl,--gc-sections -mmcu=atmega328p .pioenvs\myenv\src\src.o -L.pioenvs\myenv .pioenvs\myenv\libFr
ameworkArduino.a -lm
c:/users/jhalleux/.platformio/packages/toolchain-atmelavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr5\libc.a(cmpsf2.o): In function `_
_lesf2':
(.text.avr-libc.fplib+0x0): multiple definition of `__ltsf2'
c:/users/jhalleux/.platformio/packages/toolchain-atmelavr/bin/../lib/gcc/avr/4.3.3/avr5\libgcc.a(_lt_sf.o):c:\avrdev\gcc\build-avr\avr\avr5\
libgcc/../../.././gcc/fp-bit.c:1287: first defined here
c:/users/jhalleux/.platformio/packages/toolchain-atmelavr/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr5\libc.a(cmpsf2.o): In function `_
_lesf2':
(.text.avr-libc.fplib+0x0): multiple definition of `__lesf2'
c:/users/jhalleux/.platformio/packages/toolchain-atmelavr/bin/../lib/gcc/avr/4.3.3/avr5\libgcc.a(_le_sf.o):c:\avrdev\gcc\build-avr\avr\avr5\
libgcc/../../.././gcc/fp-bit.c:1308: first defined here
scons: *** [.pioenvs\myenv\firmware.elf] Error 1
Windows 7, x32
Platformio 0.10.2
User name is "Dontsov Evgeny"
It's error while calling avrdude.conf:
Processing ←[36mscadadon_env←[0m environment:
←[32m(["upload"], [".pioenvs\scadadon_env\firmware.hex"])
c:/Users/Dontsov Evgeny/.platformio\packages\tool-avrdude\avrdude -q -D -p atmeg
a328p -C c:/Users/Dontsov Evgeny/.platformio\packages\tool-avrdude\avrdude.conf
-c arduino -b 115200 -P COM7 -U flash:w:.pioenvs\scadadon_env\firmware.hex:i←[0m
←[31m'c:/Users/Dontsov' is not recognized as an internal or external command,
operable program or batch file.
scons: *** [upload] Error 1←[0m
Sorry about the continuing issues as I work on converting my stuff from using the Arduino IDE to platformio, but the main reason I'm trying to move it is that it was getting to complex for the IDE and I need some more flexibility (particularly the ability to pass environment variables into compilation), so I probably have a more complicated code structure than folks are usually using with an arduino.
My next issue I think boils down to libraries not being cross linked correctly. For instance if library1 uses code from library2 I'm seeing linker errors. I've made a minimal example demonstrating the problem here:
https://github.com/aphelps/platformio_test/tree/master/test_library_crosslink
With the code as is, the compilation fails:
$ platformio run
Processing arduino_nano environment:
avr-g++ -o .pioenvs/arduino_nano/firmware.elf -Os -Wl,--gc-sections -mmcu=atmega328p .pioenvs/arduino_nano/src/main.o -L.pioenvs/arduino_nano .pioenvs/arduino_nano/libTestLib1.a .pioenvs/arduino_nano/libTestLib2.a .pioenvs/arduino_nano/libFrameworkArduino.a -lm
.pioenvs/arduino_nano/libTestLib2.a(TestLib2.o): In function `TestLib2_Test()':
/Users/amp/Dropbox/Arduino/platformio_tests/test_library_crosslink/.pioenvs/arduino_nano/TestLib2/TestLib2.cpp:6: undefined reference to `TestLib1_Test()'
collect2: error: ld returned 1 exit status
scons: *** [.pioenvs/arduino_nano/firmware.elf] Error 1
This fails because the function TestLib2_Test() is in library TestLib2 which calls TestLib1_Test() in library TestLib1. However if you uncomment a call to TestLib1_Test() in main.ino that function will be compiled and the linker finds it: https://github.com/aphelps/platformio_test/blob/master/test_library_crosslink/src/main.ino#L9
Need to allow PlatformIO to be upgraded via
$ platformio upgrade
Also will be good to add "auto-check" for new version 1 time per week.
All useful information (with latest version) is available here.
Hello, I have problem with libraries. I can't get work the Serial work. The same I get when I try another library.
Code :
void setup(void)
{
// start serial port
Serial.begin(9600);
}
void loop(void)
{
}
pioenvs/arduino_pro5v/src/main.c: In function 'setup':
.pioenvs/arduino_pro5v/src/main.c:6:3: error: 'Serial' undeclared (first use in this function)
Serial.begin(9600);
^
.pioenvs/arduino_pro5v/src/main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
scons: *** [.pioenvs/arduino_pro5v/src/main.o] Error 1
There should always be an option to avoid blocking commands. If we use platformio to automate a build, the worse thing that can happen is a user prompt.
Most Arduino libraries and examples ship with ".ino/.pde" files. Need to add converters to INO->CPP files:
Installed platformio 0.7.0 and 0.8.0 with Python 2.7.8 on Windows 7 64 bit, works fine. Installs perfectly.
Run platformio.exe install atmelavr:
Installing toolchain-atmelavr package:
Downloading [####################################] 100%
cygwin warning:
MS-DOS style path detected: c:\Users\USER/.platformio\atmelavr\tools\toolchai
n\toolchain-atmelavr-windows-1.tar.gz
Preferred POSIX equivalent is: /cygdrive/c/Users/USER/.platformio/atmelavr/to
ols/toolchain/toolchain-atmelavr-windows-1.tar.gz
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Error: The 'sha1' sum '\a9b2f3779bcd64196c499f7a30b221987c15a68' of downloaded f
ile 'toolchain-atmelavr-windows-1.tar.gz' is not equal to remote 'a9b2f3779bcd64
196c499f7a30b221987c15a681'
sha1sum is part of cygwin on my machine, even though the python is windows, not cygwin.
as can be seen, the sha1 sum has a leading '' in front of it and throws off the comparison.
Changed platformio/downloader.py, Line 71:
FROM
dlsha1 = res[:40]
TO
dlsha1 = res[1:41]
to fix in my case.
FYI
C:\Python27-64\Scripts>sha1sum --version
sha1sum (GNU coreutils) 8.15
Packaged by Cygwin (8.15-3)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Ulrich Drepper, Scott Miller, and David Madore.
Perhaps there should be a check for cygwin binaries.
Following the same logic as the auto-detection of port on upload, could the serial monitor have a mode where it simply picks the port that looks like a board?
Make the platform command line easier to use by providing more defaults for 'well-known' boards like the uno. If the user specifies that he is using an Arduino Uno, the platform
and framework
can be inferred.
First, let's just say that this project is awesome. This is some awesome work.
One feature that I missed moving from ion was the automatic detection of upload port. It's a very nifty feature that makes things a tad simpler.
Having a problem with urllib3 and SSL it seems. This is just following the quickstart, empty project, adding arduino micro into platforms and doing run.
$ platformio run
Processing arduino_micro environment:
The platform 'atmelavr' has not been installed yet. Would you like to install it now? [y/N]: y
Installing toolchain-atmelavr package:
/Library/Python/2.7/site-packages/requests/packages/urllib3/connection.py:251: SecurityWarning: Certificate has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
SecurityWarning
Error: [API] Could not connect to PlatformIO Registry Service
I'm on OSX 10.8.5, Python 2.7.2. Reinstalled urllib3 with latest version from pip.
The compiler fails to resolve <Ethernet.h> and there does not seem to be any library containing this feature.
It's frankly cryptic to refer to library 28 rather than Adafruit Neopixel. Why the change? All other package managers (npm, pip, bower, nuget) have human readable identifiers.
Hard to read the new console outputs when they use dark blue in a dark console.
Please add to your main source file this line:
#include <SPI.h>
I'm a bit puzzled, I just installed platformIO, and used it to build some test code which includes RFM69 library (which I installed via platformio lib install 92
) for arduino uno.
Everything works fine but I got an issue with the #include <SPI.h>
line in the RFM69 file:
.pioenvs/autogen_uno/RFM69_ID92/RFM69.cpp:33:17: fatal error: SPI.h: No such file or directory
The strange thing is that if I #include <SPI.h>
in main.ino, it compiles fine, so I suspect there's something wrong.
I'm running linux mint if that's of any help, and followed the get started page to get things running.
Is it a bug, or did I miss something?
An option to dump data as JSON in the console output would be handhandy for commands like list and such. It avoids having to write parsers around the output of clients when automatingoing it.
Is there a way to let platformio use another version of the Arduino framework than the one you install with it?
I've done some extensions to the HardwareSerial part and want to use them in one of my projects.
From pull #29 @bettabacon
This was quite messy though. It installed a ./lib, ./src, and platformio.ini without asking me where. I'll move these directories and setup file elsewhere, and try to get
platformio init
command initialises empty project within the current folder where you are stayed. See details here http://docs.platformio.ikravets.com/en/latest/userguide/cmd_init.html
Do you have any propositions how to improve the behaviour of this command? I have the next propositions:
platformio init -d %path_to_project_dir%
I've been enjoying platformio immensely, thank you for doing so much work in such recent time. I'm curious whether you consider including a serial monitor as a future goal or outside the scope of this project? If you consider it a goal, I could perhaps create something using screen
.
In the project file platformio.ini allow user to setup additional flags for builder. Example:
[env:myenv]
...
build_flags = "-I/opt/include -L/opt/lib -lfoo -DMYDEFINE"
...
Just like in npm, it should be possible to declare all the library dependencies in the platform.io file and let platform.io deal with it (this would also include install the necessary framework/board/etc...).
When trying to open a sketch file in Arduous IDE from the src folder, it insist on moving it to a sketch folder.
Could pio support a file layout that just works with arduous ide? (Or at least as much as possible).
Chocolatey uses powershell to install download their install script on windows. You could do the same...
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
Or you could have users install Chocolatey then be a package of this environment. Keep up the great work!
install fresh platform
run "lib update"
$ platformio lib update
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/platformio-0.7.0-py2.7.egg/platformio/main.py", line 64, in main
cli()
File "/Library/Python/2.7/site-packages/click-3.3-py2.7.egg/click/core.py", line 610, in call
return self.main(_args, *_kwargs)
File "/Library/Python/2.7/site-packages/click-3.3-py2.7.egg/click/core.py", line 590, in main
rv = self.invoke(ctx)
File "/Library/Python/2.7/site-packages/click-3.3-py2.7.egg/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Python/2.7/site-packages/click-3.3-py2.7.egg/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Python/2.7/site-packages/click-3.3-py2.7.egg/click/core.py", line 782, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/Library/Python/2.7/site-packages/click-3.3-py2.7.egg/click/core.py", line 416, in invoke
return callback(_args, **kwargs)
File "/Library/Python/2.7/site-packages/platformio-0.7.0-py2.7.egg/platformio/commands/lib.py", line 143, in lib_update
lib_names = lm.get_installed()
File "/Library/Python/2.7/site-packages/platformio-0.7.0-py2.7.egg/platformio/libmanager.py", line 36, in get_installed
for item in listdir(self.lib_dir):
OSError: [Errno 2] No such file or directory: 'YYYYYYY/.platformio/lib'
Parse include <SomeLibrary>
from sources and find in framework's and project's libraries directory
I'm making strides to converting my code base to build on platformio, but it seems to not be able to use a library that's within a git repo (ie which I've cloned from elsewhere). I took a look in the platformio line that generated this error, but its not clear to me what the root cause is:
$ platformio run
Processing arduino_nano environment:
scons: *** '/Users/amp/Dropbox/Arduino/HMTL.platformio/HMTL_Module/.pioenvs/arduino_nano/FastLED/refs' already has a source directory: '/Users/amp/Dropbox/Arduino/libraries/FastLED/.git/refs'.
File "/Library/Python/2.7/site-packages/platformio/builder/tools/platformio.py", line 142, in VariantDirRecursive
Uses a chip not used in other arduinos currently defined atmega256rfr2
https://github.com/Pinoccio/core-pinoccio/blob/master/avr/boards.txt
https://github.com/Pinoccio/core-pinoccio/blob/master/avr/platform.txt
Tried my hand at adding it to boards but don't think i fully grasp what needs to be done
"pinoccio": {
"build": {
"board": "PINOCCIO",
"core": "arduino",
"f_cpu": "16000000L",
"mcu": "atmega256rfr2",
"pid": "0x6051",
"usb_product": "Pinoccio",
"variant": "pinoccio",
"vid": "0x1d50"
},
"name": "Pinoccio Scout",
"platform": "atmelavr",
"upload": {
"disable_flushing": true,
"maximum_ram_size": 8192,
"maximum_size": 253952,
"protocol": "wiring",
"speed": 115200,
"wait_for_upload_port": true
}
}
I would like to use platformio for a project but we are currently not able to due to legal issues. The specific issue is that this is put at the top of platformio.ini
generated by platformio init
:
# Copyright (C) Ivan Kravets <[email protected]>
# See LICENSE for details.
But no LICENSE file is generated along with the project template. Along with that we are not able to have our config be copyrighted by someone else.
We have excellent package managers like: pip, homebrew, bower, npm... I think it is time to create a libraries manager for different platforms (+ embedded). Each library should have library.json
file, where will be necessary information like:
UPDATED: library.json specification
We have many excellent Arduino and MSP430 libraries on GtHub. It would be excellent to search and manage them with CLI:
$ platformio lib search %QUERY_HERE%
$ platformio lib install %LIBRARY_NAME%
$ platformio lib update
$ platformio lib uninstall
$ platformio lib list # Show a list from installed libraries
$ platformio lib register %GITHUB_REPO_URL% # for developer of library
Then you can include installed libraries in your ".h/c/cpp" files. PlatformIO will parse them and build in auto-mode.
For example:
$ platformio lib search "arduino ir"
# answer ...
# Arduino-IRremote - Infrared remote library for Arduino: send and receive infrared signals with multiple protocols
$ platformio lib install Arduino-IRremote
Now, PlatformIO will install Arduino-IRremote library to special location. Then we can use it in our sketch ("my_ir.cpp"):
#include <IRremote.h>
#include <IRremoteInt.h>
void setup () { /* */ }
void loop () { /* */ }
Any propositions/ides are welcome!
Similarly to your setting to automatically update a platform, there should be an option to automatically install a platform if missing. Basically, it should just work.
When calling a command that lists resources, like platformio list
, I would like to be able to parse and process the data in a predictable way. Console output is easy to parse but things change... It would be easier to have a --json-output
option that would force the console output to be JSON formatted.
Hi Ivan,
How do you usually proceed to add a library in platformio? We would like to be able to target Engduino.
https://code.google.com/p/engduino/wiki/InstallingEngduinoV3
Here is the console output of the upgrade. There is an exception trace at the end. This was run from an administrative command prompt in Windows 8.1.
>platformio upgrade
There is a new version 0.10.1 of PlatformIO available.
Please upgrade it via platformio upgrade command.
Changes: http://docs.platformio.ikravets.com/en/latest/history.html
There are the new updates for platforms (atmelavr)
Please wait while updating platforms ...
Platform atmelavr
--------
Updating toolchain-atmelavr package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-avrdude package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-arduinoavr package:
Versions: Current=8, Latest=9 [Out-of-date]
Uninstalling framework-arduinoavr package: [OK]
Installing framework-arduinoavr package:
Downloading [####################################] 100%
Unpacking [####################################] 100%
Platform timsp430
--------
Updating toolchain-timsp430 package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-mspdebug package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-energiamsp430 package:
Versions: Current=2, Latest=2 [Up-to-date]
Platform titiva
--------
Updating toolchain-gccarmnoneeabi package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-lm4flash package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-energiativa package:
Versions: Current=3, Latest=3 [Up-to-date]
There are the new updates for libraries (Adafruit-NeoPixel)
Please wait while updating libraries ...
Updating [ 28 ] Adafruit-NeoPixel library:
Versions: Current=349b45afc9, Latest=61d5a3ebe9 [Out-of-date]
The library #28 'Adafruit-NeoPixel' has been successfully uninstalled!
Installing library [ 28 ]:
Downloading [####################################] 100%
Unpacking [####################################] 100%
The library #28 'Adafruit-NeoPixel' has been successfully installed!
Downloading/unpacking platformio from https://pypi.python.org/packages/source/p/platformio/platformio-0.10.1.tar.gz#md5=65edff2e8a2c92906a847f7e55e71
8a8
Downloading platformio-0.10.1.tar.gz
Running setup.py (path:c:\users\....\appdata\local\temp\pip_build_jhalleux\platformio\setup.py) egg_info for package platformio
Requirement already up-to-date: click in c:\python27\lib\site-packages (from platformio)
Requirement already up-to-date: pyserial in c:\python27\lib\site-packages (from platformio)
Downloading/unpacking requests from https://pypi.python.org/packages/py2.py3/r/requests/requests-2.5.1-py2.py3-none-any.whl#md5=11dc91bc96c5c5e0b566c
e8f9c9644ab (from platformio)
Requirement already up-to-date: colorama in c:\python27\lib\site-packages (from platformio)
Installing collected packages: platformio, requests
Found existing installation: platformio 0.9.2
Uninstalling platformio:
Successfully uninstalled platformio
Running setup.py install for platformio
Installing platformio-script.py script to C:\Python27\Scripts
Installing platformio.exe script to C:\Python27\Scripts
Cleaning up...
Exception:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip\commands\install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "C:\Python27\lib\site-packages\pip\req.py", line 1443, in install
requirement.commit_uninstall()
File "C:\Python27\lib\site-packages\pip\req.py", line 610, in commit_uninstall
self.uninstalled.commit()
File "C:\Python27\lib\site-packages\pip\req.py", line 1860, in commit
rmtree(self.save_dir)
File "C:\Python27\lib\site-packages\pip\util.py", line 43, in rmtree
onerror=rmtree_errorhandler)
File "C:\Python27\lib\shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Python27\lib\shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Python27\lib\shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "C:\Python27\lib\site-packages\pip\util.py", line 62, in rmtree_errorhandler
func(path)
WindowsError: [Error 5] Access is denied: 'c:\\users\\....\\appdata\\local\\temp\\pip-p5rme5-uninstall\\python27\\scripts\\platformio.exe'
Storing debug log for failure in \pip.log
Hi,
i think it would be really helpful to have some helpers/help-texts for platformio.
For example when i create a platformio.ini file, i would really like to have the ability to call for example
$ platformio boards
to get a list of all valid board name rather than have to serach the online doc.
Maybe this could do a query in the online docs so that i keep s up to date!
I can't seem to find the Arduino Servo library in the registry. I'm not sure if this is related to #23. How should I go about including the Arduino core libraries?
Thanks
Tested on MacOS.
sudo pip install platformio
Downloading/unpacking platformio
Downloading platformio-0.7.1.tar.gz
Running setup.py (path:/private/tmp/pip_build_root/platformio/setup.py) egg_info for package platformio
Requirement already satisfied (use --upgrade to upgrade): click in /Library/Python/2.7/site-packages/click-3.3-py2.7.egg (from platformio)
Requirement already satisfied (use --upgrade to upgrade): pyserial in /Library/Python/2.7/site-packages/pyserial-2.7-py2.7.egg (from platformio)
Requirement already satisfied (use --upgrade to upgrade): requests in /Library/Python/2.7/site-packages (from platformio)
Installing collected packages: platformio
Running setup.py install for platformio
Installing platformio script to /usr/local/bin
Successfully installed platformio
Cleaning up...
$ platformio --version
Traceback (most recent call last):
File "/usr/local/bin/platformio", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests
Having trouble compiling on Windows. Installed python 2.8.3, ran getplatformio.py, then trying to compile project:
C:\arduino>platformio install atmelavr timsp430 titiva
Installing toolchain-atmelavr package:
Already installed
Installing tool-avrdude package:
Already installed
Installing framework-arduinoavr package:
Already installed
The platform 'atmelavr' has been successfully installed!
C:\arduino>platformio run
Processing myuno environment:
avr-g++ /Fo.pioenvs\myuno\src\sketch.obj /c .pioenvs\myuno\src\sketch.cpp -fno-exceptions -g -Os -ffunction-sections -fdata-sections -MMD -mmcu=atme
a328p /DF_CPU=16000000L /DARDUINO=157 /DARDUINO_AVR_UNO /I.pioenvs\myuno\core /I.pioenvs\myuno\variant
.pioenvs\myuno\src\sketch.cpp:1:21: warning: Arduino.h: No such file or directory
sketch.ino: In function 'void setup()':
sketch.ino:5: error: 'Serial' was not declared in this scope
sketch.ino: In function 'void loop()':
sketch.ino:17: error: 'delay' was not declared in this scope
avr-g++: /Fo.pioenvs\myuno\src\sketch.obj: No such file or directory
avr-g++: /c: No such file or directory
avr-g++: /DF_CPU=16000000L: No such file or directory
avr-g++: /DARDUINO=157: No such file or directory
avr-g++: /DARDUINO_AVR_UNO: No such file or directory
avr-g++: /I.pioenvs\myuno\core: No such file or directory
avr-g++: /I.pioenvs\myuno\variant: No such file or directory
scons: *** [.pioenvs\myuno\src\sketch.obj] Error 1
Why not building on top of npm or pip? What is the SLA for the platformio library repository?
It would be great to be able to launch the platformio CLI as a local web server. The obvious scenario would be the ability for a web site to send a sketch to the localhost and upload it to the board. There's quite a bit of online editors that could be used for that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.