2018年2月20日 星期二

[Arduino] PlatformIO

看起來不錯,要一統江湖了嗎?

安裝
pip install -U platformio
http://docs.platformio.org/en/latest/installation.html

文件
https://readthedocs.org/projects/platformio/downloads/pdf/latest/

執行上傳程式以後,會先安裝 toolchain
pio run -t upload && pio device monitor
********************************************************************************
Obsolete PIO Core v3.5.1 is used (previous was 3.5.2b5)
Please remove multiple PIO Cores from a system:
http://docs.platformio.org/page/faq.html#multiple-pio-cores-in-a-system
********************************************************************************
[Tue Feb 20 16:40:30 2018] Processing uno (platform: atmelavr; board: uno; framework: arduino)
--------------------------------------------------------------------------------
PlatformManager: Installing atmelavr
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
atmelavr @ 1.8.1 has been successfully installed!
The platform 'atmelavr' has been successfully installed!
The rest of packages will be installed automatically depending on your build environment.
PackageManager: Installing toolchain-atmelavr @ ~1.40902.0
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%          
PackageManager: Installing framework-arduinoavr @ ~1.10620.2
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%
PackageManager: Installing tool-avrdude @ ~1.60300.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
CorePackageManager: Installing tool-scons @ ~3.20501.2
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
tool-scons @ 3.20501.2 has been successfully installed!
Verbose mode can be enabled via `-v, --verbose` option
Collected 24 compatible libraries
Scanning dependencies...
Library Dependency Graph ( http://bit.ly/configure-pio-ldf )
|--  v1.0
|--  v1.0
Compiling .pioenvs/uno/src/Seeed_BME280.o
Compiling .pioenvs/uno/src/aes/ideetron/AES-128_V10.o
Compiling .pioenvs/uno/src/aes/lmic.o
Compiling .pioenvs/uno/src/aes/other.o
src/aes/ideetron/AES-128_V10.cpp:81:13: warning: 'Send_State()' declared 'static' but never defined [-Wunused-function]
static void Send_State();
^
Compiling .pioenvs/uno/src/hal/hal.o
Compiling .pioenvs/uno/src/lmic/lmic.o
Compiling .pioenvs/uno/src/lmic/oslmic.o
Compiling .pioenvs/uno/src/lmic/radio.o
src/lmic/lmic.c: In function 'decodeFrame':
src/lmic/lmic.c:1040:17: warning: unused variable 'window' [-Wunused-variable]
const char *window = (LMIC.txrxFlags & TXRX_DNW1) ? "RX1" : ((LMIC.txrxFlags & TXRX_DNW2) ? "RX2" : "Other");
^
src/lmic/lmic.c: In function 'processJoinAccept':
src/lmic/lmic.c:1467:10: warning: unused variable 'mic' [-Wunused-variable]
u4_t mic  = os_rlsbf4(&LMIC.frame[dlen-4]); // safe before modified by encrypt!
^
src/lmic/oslmic.c: In function 'os_clearCallback':
src/lmic/oslmic.c:44:10: warning: unused variable 'res' [-Wunused-variable]
u1_t res = unlinkjob(&OS.scheduledjobs, job) || unlinkjob(&OS.runnablejobs, job);
^
Compiling .pioenvs/uno/src/main.o
Archiving .pioenvs/uno/libFrameworkArduinoVariant.a
Indexing .pioenvs/uno/libFrameworkArduinoVariant.a
Compiling .pioenvs/uno/FrameworkArduino/CDC.o
Compiling .pioenvs/uno/FrameworkArduino/HardwareSerial.o
Compiling .pioenvs/uno/FrameworkArduino/HardwareSerial0.o
Compiling .pioenvs/uno/FrameworkArduino/HardwareSerial1.o
Compiling .pioenvs/uno/FrameworkArduino/HardwareSerial2.o
Compiling .pioenvs/uno/FrameworkArduino/HardwareSerial3.o
Compiling .pioenvs/uno/FrameworkArduino/IPAddress.o
Compiling .pioenvs/uno/FrameworkArduino/PluggableUSB.o
Compiling .pioenvs/uno/FrameworkArduino/Print.o
Compiling .pioenvs/uno/FrameworkArduino/Stream.o
Compiling .pioenvs/uno/FrameworkArduino/Tone.o
Compiling .pioenvs/uno/FrameworkArduino/USBCore.o
Compiling .pioenvs/uno/FrameworkArduino/WInterrupts.o
Compiling .pioenvs/uno/FrameworkArduino/WMath.o
Compiling .pioenvs/uno/FrameworkArduino/WString.o
Compiling .pioenvs/uno/FrameworkArduino/_wiring_pulse.o
Compiling .pioenvs/uno/FrameworkArduino/abi.o
Compiling .pioenvs/uno/FrameworkArduino/hooks.o
Compiling .pioenvs/uno/FrameworkArduino/main.o
Compiling .pioenvs/uno/FrameworkArduino/new.o
Compiling .pioenvs/uno/FrameworkArduino/wiring.o
Compiling .pioenvs/uno/FrameworkArduino/wiring_analog.o
Compiling .pioenvs/uno/FrameworkArduino/wiring_digital.o
Compiling .pioenvs/uno/FrameworkArduino/wiring_pulse.o
Compiling .pioenvs/uno/FrameworkArduino/wiring_shift.o
Compiling .pioenvs/uno/lib3f3/SPI/SPI.o
Compiling .pioenvs/uno/libfa9/Wire/Wire.o
Compiling .pioenvs/uno/libfa9/Wire/utility/twi.o
Archiving .pioenvs/uno/libFrameworkArduino.a
Indexing .pioenvs/uno/libFrameworkArduino.a
Archiving .pioenvs/uno/lib3f3/libSPI.a
Indexing .pioenvs/uno/lib3f3/libSPI.a
Archiving .pioenvs/uno/libfa9/libWire.a
Indexing .pioenvs/uno/libfa9/libWire.a
Linking .pioenvs/uno/firmware.elf
Checking program size
text    data     bss     dec     hex filename
25628     138     898   26664    6828 .pioenvs/uno/firmware.elf
Building .pioenvs/uno/firmware.hex
Looking for upload port...

Warning! Please install `99-platformio-udev.rules` and check that your board's PID and VID are listed in the rules.
https://raw.githubusercontent.com/platformio/platformio/develop/scripts/99-platformio-udev.rules
Auto-detected: /dev/ttyACM0
Uploading .pioenvs/uno/firmware.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file ".pioenvs/uno/firmware.hex"
avrdude: writing flash (25766 bytes):

Writing | ################################################## | 100% 4.14s

avrdude: 25766 bytes of flash written
avrdude: verifying flash memory against .pioenvs/uno/firmware.hex:
avrdude: load data flash data from input file .pioenvs/uno/firmware.hex:
avrdude: input file .pioenvs/uno/firmware.hex contains 25766 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 3.31s

avrdude: verifying ...
avrdude: 25766 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.

===================================================================== [SUCCESS] Took 40.60 seconds =====================================================================
************************************************************************************************************************************************************************
Obsolete PIO Core v3.5.1 is used (previous was 3.5.2b5)
Please remove multiple PIO Cores from a system:
http://docs.platformio.org/page/faq.html#multiple-pio-cores-in-a-system
************************************************************************************************************************************************************************
--- Miniterm on /dev/ttyACM0  9600,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

沒有留言: