Platformio-core: Unable to run a simple blink led on Arduino Due (build upload but doesn't run on target)

Created on 2 Jul 2016  Â·  10Comments  Â·  Source: platformio/platformio-core

I successfully ran lots of project on Arduino Due using PlatformIO.
Since the last update, I'm unable to run any app on this board. Build and upload seems to works fine, but nothing happen after board reset. The same app (simple blink led) works fine with Arduino IDE.
I tried the USB Native port, it doesn't work also.
In the other hand, everything works fine with PlatformIO on Arduino Leonardo board.
I can't figure out what's happening.

Any help appreciated.

Regards


Configuration

Ubuntu 16.04:

PlatformIO, version 2.11.0

BOSSA CLI version: 1.10601.0

Description of problem

Steps to Reproduce

  1. Build & upload any simple project on Arduino due

    Actual Results

Nothing happen after board reset

Expected Results

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:due]
platform = atmelsam
framework = arduino
board = due

Source file to reproduce issue:

#include <Arduino.h>

void setup() 
{  
  pinMode(13, OUTPUT);
}

void loop() {
  while(1)
  {
    digitalWrite(13,LOW);
    delay(1000);
    digitalWrite(13,HIGH);
    delay(1000);
  }

}

Additional info

bug

All 10 comments

Ok, working around this problem, my understanding is :

  • The .bin file generated by the building toolchain works fine.
  • The command for bossac seems to be incorrect, the --boot option should be enable to boot from FLASh (instead of ROM)
    So basically, if I upload the firmware.bin file generated by platformIO build chain with :
    bossac --info --port "ttyACM0" -e -w -v -b -U false .pioenvs/due/firmware.bin -R
    it works !!
    The command generated by plaformIO-IDE is :
    bossac --info --port "ttyACM0" --erase --write --verify --reset --debug -U false .pioenvs/due/firmware.bin
    As you can see the only difference is the -b parameter (--boot option)
    I'll finally try to find where this command is generated inside the platformIO-IDE to hack this.

Regards

I finally make it work by adding the --boot option in platformio/builder/scripts/atmelsam.py at line 169.
Not sure that it will work for all Atmel SAM processor, but I think there is a mistake in this file.
Could you please check this for the future releases ?

Regards

The complete path of the file for linux user is :
~/.atom/packages/platformio-ide/penv/local/lib/python2.7/site-packages/platformio/builder/scripts

Regards

Hi Ivan,
I don't think so because its on Arduino Due platform. The file to be changed is the following : /platformio/builder/scripts/atmelsam.py
On my computer --boot option is not set. On the repository, the file has this lines:
if "sam3x8e" in BOARD_OPTIONS.get("build", {}).get("mcu", ""): env.Append(UPLOADERFLAGS=["--boot"])
It has been corrected by #710 issue
https://github.com/platformio/platformio/commit/241ad8174fd767dd17fb86a3e8b86cd121685095

Thanks for help anyway

Regards

@akira215 this is a bug. Thanks a lot that reported it. We will release a new version as soon as possible.

Please test the latest development version where this issue is fixed http://docs.platformio.org/en/latest/installation.html#development-version

Hi Ivan,

Ok, I will try it by the end of this week. Regards
Le 4 juil. 2016 19:25, "Ivan Kravets" [email protected] a écrit :

@akira215 https://github.com/akira215 this is a bug. Thanks a lot that
reported it. We will release a new version as soon as possible.

Please test the latest development version where this issue is fixed
http://docs.platformio.org/en/latest/installation.html#development-version

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/platformio/platformio/issues/710#issuecomment-230331073,
or mute the thread
https://github.com/notifications/unsubscribe/ALKWPA3mV2gAdZmI0ImCuWob922V5w8Jks5qSUIHgaJpZM4JDp2r
.

Hi Ivan,

I installed the lastest development version (version 2.11.1.dev2) : The
bug has been fixed, everything works fine.
I ll continue to developp using pio for SAMx µC, so I will be a good
tester !

Thanks.

Regards

Le 04/07/2016 21:25, Ivan Kravets a écrit :

@akira215 https://github.com/akira215 this is a bug. Thanks a lot
that reported it. We will release a new version as soon as possible.

Please test the latest development version where this issue is fixed
http://docs.platformio.org/en/latest/installation.html#development-version

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/platformio/platformio/issues/710#issuecomment-230331073,
or mute the thread
https://github.com/notifications/unsubscribe/ALKWPA3mV2gAdZmI0ImCuWob922V5w8Jks5qSUIHgaJpZM4JDp2r.

Happy Coding with PlatformIO! 😄

Thanks.

I may add an extra filter in the Serial Port Monitor, I can't fine my
happiness in the 6 existings !

Regards

Le 10/07/2016 12:10, Ivan Kravets a écrit :

Happy Coding with PlatformIO! 😄

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/platformio/platformio/issues/710#issuecomment-231576654,
or mute the thread
https://github.com/notifications/unsubscribe/ALKWPAFOcCTLc0t-UtKz8iEIhTQzAATgks5qUKj9gaJpZM4JDp2r.

Was this page helpful?
0 / 5 - 0 ratings