Giter Club home page Giter Club logo

Comments (22)

pelikhan avatar pelikhan commented on May 21, 2024 1

We are interrested!

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

Thanks a lot for report!

Did you define an Arduino Framework in platformio.ini? Like, framework = arduino.

Can you post here your project's platformio.ini ?

from platformio-core.

pelikhan avatar pelikhan commented on May 21, 2024

Yes I did. The issue looks a problem on how the arguments are passed to the compiler. It seems that it treats each argument as new command (thus ignoring the library includes).

[env:uno]
platform = atmelavr
framework = arduino
board = uno
upload_port = COM3
targets = upload

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

Nice. Also, please give me a result of this command platformio show atmelavr

from platformio-core.

pelikhan avatar pelikhan commented on May 21, 2024
C:\arduino>platformio show atmelavr
atmelavr    - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework)
----------
Package: toolchain-atmelavr
Alias: toolchain
Location: C:\Users\jhalleux/.platformio\atmelavr\tools\toolchain
Version: 1
----------
Package: tool-avrdude
Alias: uploader
Location: C:\Users\jhalleux/.platformio\atmelavr\tools\avrdude
Version: 1
----------
Package: framework-arduinoavr
Location: C:\Users\jhalleux/.platformio\atmelavr\frameworks\arduino
Version: 4

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

Thanks. I will test it under virtual W8.1 and post my experience here. Because I didn't think that Windows users will be interested in PlatformIO 😄

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

I've just installed PlatformIO on Windows 8.1. and successfully compiled the example https://github.com/ivankravets/platformio/tree/develop/examples/arduino-internal-library

Can you send to [email protected] your sketch.ino file? I will retest it with my OS.

Thanks.

from platformio-core.

pelikhan avatar pelikhan commented on May 21, 2024

That's great news! Just sent the zipped folder. It also contains my tiny flask web server that allows a web site to flash the board.

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

I don't have any problems with your example. See dump below.

  • I've pushed today new version of get-platformio.py script. Can you re-run it again? It should install new version of SCons, like 2.3.4. Check it:
$ scons --version
  • Please run command $ paltformio run directly from cmd, not via your WebScript.

P.S: Can your rewrite your server.py to native WSGI application without any dependencies, like Flask or etc? If yes, then I can include your codet to main repository in to scripts directory. And... Maybe you should rename it to cloud-builder.py or web-builder.py?

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\User>platformio
Usage: platformio-script.py [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  init         Initialize new PlatformIO based project
  install      Install new platforms
  lib          Library Manager
  list         List installed platforms
  run          Process project environments
  search       Search for development platforms
  serialports  List or Monitor Serial ports
  show         Show details about installed platforms
  uninstall    Uninstall platforms
  update       Update installed platforms
  upgrade      Upgrade PlatformIO to the latest version

C:\Users\User>platformio install atmelavr
Installing toolchain-atmelavr package:
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Installing tool-avrdude package:
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Installing framework-arduinoavr package:
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
The platform 'atmelavr' has been successfully installed!

C:\Users\User>E:

E:\>cd "repro.zip Folder"

E:\repro.zip Folder>platformio run
Processing uno environment:
avr-g++ -o .pioenvs\uno\src\sketch.o -c -fno-exceptions -g -Os -ffunction-sectio
ns -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUI
NO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\src\sketch.cp
p
avr-gcc -o .pioenvs\uno\core\WInterrupts.o -c -g -Os -ffunction-sections -fdata-
sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO
 -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\WInterrupts.c
avr-gcc -o .pioenvs\uno\core\hooks.o -c -g -Os -ffunction-sections -fdata-sectio
ns -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -I.pi
oenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\hooks.c
avr-gcc -o .pioenvs\uno\core\wiring.o -c -g -Os -ffunction-sections -fdata-secti
ons -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -I.p
ioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\wiring.c
avr-gcc -o .pioenvs\uno\core\wiring_analog.o -c -g -Os -ffunction-sections -fdat
a-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_U
NO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\wiring_analog.c
avr-gcc -o .pioenvs\uno\core\wiring_digital.o -c -g -Os -ffunction-sections -fda
ta-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_
UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\wiring_digital.
c
avr-gcc -o .pioenvs\uno\core\wiring_pulse.o -c -g -Os -ffunction-sections -fdata
-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UN
O -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\wiring_pulse.c
avr-gcc -o .pioenvs\uno\core\wiring_shift.o -c -g -Os -ffunction-sections -fdata
-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UN
O -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\wiring_shift.c
avr-g++ -o .pioenvs\uno\core\CDC.o -c -fno-exceptions -g -Os -ffunction-sections
 -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO
_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\CDC.cpp
avr-g++ -o .pioenvs\uno\core\HID.o -c -fno-exceptions -g -Os -ffunction-sections
 -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO
_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\HID.cpp
avr-g++ -o .pioenvs\uno\core\HardwareSerial.o -c -fno-exceptions -g -Os -ffuncti
on-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=15
7 -DARDUINO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core
\HardwareSerial.cpp
avr-g++ -o .pioenvs\uno\core\HardwareSerial0.o -c -fno-exceptions -g -Os -ffunct
ion-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=1
57 -DARDUINO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\cor
e\HardwareSerial0.cpp
avr-g++ -o .pioenvs\uno\core\HardwareSerial1.o -c -fno-exceptions -g -Os -ffunct
ion-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=1
57 -DARDUINO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\cor
e\HardwareSerial1.cpp
avr-g++ -o .pioenvs\uno\core\HardwareSerial2.o -c -fno-exceptions -g -Os -ffunct
ion-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=1
57 -DARDUINO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\cor
e\HardwareSerial2.cpp
avr-g++ -o .pioenvs\uno\core\HardwareSerial3.o -c -fno-exceptions -g -Os -ffunct
ion-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=1
57 -DARDUINO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\cor
e\HardwareSerial3.cpp
avr-g++ -o .pioenvs\uno\core\IPAddress.o -c -fno-exceptions -g -Os -ffunction-se
ctions -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DA
RDUINO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\IPAd
dress.cpp
avr-g++ -o .pioenvs\uno\core\Print.o -c -fno-exceptions -g -Os -ffunction-sectio
ns -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUI
NO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\Print.cp
p
avr-g++ -o .pioenvs\uno\core\Stream.o -c -fno-exceptions -g -Os -ffunction-secti
ons -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDU
INO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\Stream.
cpp
avr-g++ -o .pioenvs\uno\core\Tone.o -c -fno-exceptions -g -Os -ffunction-section
s -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUIN
O_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\Tone.cpp
avr-g++ -o .pioenvs\uno\core\USBCore.o -c -fno-exceptions -g -Os -ffunction-sect
ions -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARD
UINO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\USBCor
e.cpp
avr-g++ -o .pioenvs\uno\core\WMath.o -c -fno-exceptions -g -Os -ffunction-sectio
ns -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUI
NO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\WMath.cp
p
avr-g++ -o .pioenvs\uno\core\WString.o -c -fno-exceptions -g -Os -ffunction-sect
ions -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARD
UINO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\WStrin
g.cpp
avr-g++ -o .pioenvs\uno\core\main.o -c -fno-exceptions -g -Os -ffunction-section
s -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUIN
O_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\main.cpp
avr-g++ -o .pioenvs\uno\core\new.o -c -fno-exceptions -g -Os -ffunction-sections
 -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO
_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\core\new.cpp
avr-ar rcs .pioenvs\uno\libcore.a .pioenvs\uno\core\WInterrupts.o .pioenvs\uno\c
ore\hooks.o .pioenvs\uno\core\wiring.o .pioenvs\uno\core\wiring_analog.o .pioenv
s\uno\core\wiring_digital.o .pioenvs\uno\core\wiring_pulse.o .pioenvs\uno\core\w
iring_shift.o .pioenvs\uno\core\CDC.o .pioenvs\uno\core\HID.o .pioenvs\uno\core\
HardwareSerial.o .pioenvs\uno\core\HardwareSerial0.o .pioenvs\uno\core\HardwareS
erial1.o .pioenvs\uno\core\HardwareSerial2.o .pioenvs\uno\core\HardwareSerial3.o
 .pioenvs\uno\core\IPAddress.o .pioenvs\uno\core\Print.o .pioenvs\uno\core\Strea
m.o .pioenvs\uno\core\Tone.o .pioenvs\uno\core\USBCore.o .pioenvs\uno\core\WMath
.o .pioenvs\uno\core\WString.o .pioenvs\uno\core\main.o .pioenvs\uno\core\new.o
avr-g++ -o .pioenvs\uno\firmware.elf -Os -Wl,--gc-sections -mmcu=atmega328p .pio
envs\uno\src\sketch.o -L.pioenvs\uno .pioenvs\uno\libcore.a -lm
avr-objcopy -O ihex -R .eeprom .pioenvs\uno\firmware.elf .pioenvs\uno\firmware.h
ex
.pioenvs\uno\core\Stream.cpp: In member function 'bool Stream::find(char*)':
.pioenvs\uno\core\Stream.cpp:78: warning: deprecated conversion from string cons
tant to 'char*'
.pioenvs\uno\core\Tone.cpp:119: warning: only initialized variables can be place
d into program memory area

E:\repro.zip Folder>

from platformio-core.

pelikhan avatar pelikhan commented on May 21, 2024

new to python, will take a look at the wsgi.

no luck with the new instructions still failing. Is there a verbose logging mode that I can turn on?

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

new to python, will take a look at the wsgi.
I'm too new to Python 😄

Did you resolve this issue?

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

Please reopen this issue if you have a problem.

from platformio-core.

pelikhan avatar pelikhan commented on May 21, 2024

This issue is still active. Tried on another computer same problem. Is there a logging mode to diagnose this.

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

I retested PlatformIO under Win XP/7/8.1. It works perfectly. I see in a log that a few developers use Win Server. I've installed into VM latest Win Server 2012. See the result:

PlatformIO Windows Server 2012

from platformio-core.

johannesg avatar johannesg commented on May 21, 2024

I have the same problem, and I think know why it fails. Look carefully at both your console output and you'll see that they differ

@pelikhan:

avr-g++ /Fo.pioenvs\myuno\src\sketch.obj /c .pioenvs\myuno\src\sketch.cpp -fno-exceptions -g -Os -ffunction-sections -fdata-sections -MMD -mmcu=atmea328p /DF_CPU=16000000L /DARDUINO=157 /DARDUINO_AVR_UNO /I.pioenvs\myuno\core /I.pioenvs\myuno\variant

@ivankravets:

avr-g++ -o .pioenvs\uno\src\sketch.o -c -fno-exceptions -g -Os -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -I.pioenvs\uno\core -I.pioenvs\uno\variant .pioenvs\uno\src\sketch.cpp

The compiler switches of @pelikhan:s (and mine) cmd mixes forward slashes and dashes, while for @ivankravets it only uses dashes. Forward slashes seems to be ignored by the compiler which results in errors.

A wild guess is that this has something to do with regional settings on the windows machine. @pelikhan what regional settings and keyboard layout do you have on your machine? I have swedish settings.

from platformio-core.

johannesg avatar johannesg commented on May 21, 2024

I just tried to change regional settings to US with no effect unfortunately...

from platformio-core.

johannesg avatar johannesg commented on May 21, 2024

I found this answer on SO: http://stackoverflow.com/a/15597849.

I do have Visual Studio 2013 installed. Could it be that Scons somehow mixes the MSVC build environment and the avr-gcc cross compile environment?

Accoring to the answer I should try to set the build environment using:

env = Environment(tools = ['gcc'])

from platformio-core.

johannesg avatar johannesg commented on May 21, 2024

I got it working by changing this line: https://github.com/ivankravets/platformio/blob/release/v0.9.1/platformio/builder/main.py#L53

from this:

tools=["default", "platformio"],

to this:

tools=["default", "gcc", "g++", "ar", "gnulink", "platformio"],

It feels very brute force though so I'm sure there is a better way, but hopefully this might help you find a real solution.

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

@johannesg thanks a lot for you research!!! 👍 I've just installed MSVC and reproduced this bug! 😄

  1. I'm going to re-test your temporary solution (as for me, it looks strange 😄 ). I will contact with SCons developers how we can fix it.
  2. I want to release 0.9.2 today, which will include your solution! 👍

from platformio-core.

johannesg avatar johannesg commented on May 21, 2024

Great! Thanks!

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

@pelikhan, @johannesg try to upgrade via > platformio upgrade. 0.9.2 should fix it. Thanks! 👍

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

@pelikhan @johannesg - thanks a lot for help! 👍

Finally, fixed in 9e4618c

from platformio-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.