Arduino DUE: Code uploaded but does not start

Hello,
i’m trying to upload my code to arduino DUE. After successful upload i don’t see anything printed on serial console.
Program simple as this:

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  Serial.println("testing");
}

On arduino platform this works perfectly.
Tried to reinstall atom a few times. Does not fix the problem.

This worked before the last update.

Any ideas ?
Thank you!

Hi @axwell!
Thanks for the report!
Could you please try to build and run your project with previous framework version? Just replace old one in the PlatformIO home directory:
/home/user/.platformio/packages/framework-arduinosam (Unix)
C:\Users\user\.platformio\packages\framework-arduinosam (Windows)

Hello, same issue :frowning:

Hi, I have the same issue,

When I use IDE to build the code to a DUE, nothings shows up after upload; however, if I use a terminal and just type in `platoformio run -t upload" it works fine.

So just to recap:
Is this issue related to a corrupted firmware generated by PlatformIO or related to the broken terminal in IDE?
@axwell @Hex Could you please upload sketch mentioned in the first post and run command
pio serialports monitor --baud 9600 directly in IDE terminal? Does it work properly?

Hi, @valeros

I don’t think the terminal is bad, The test is I upload the code from a regular terminal and let the DUE run for a second, then I open a Serial monitor from the IDE and It will read the correct values.

Ty

Hi All,

I have the exact same issue here on Linux Mint 1.8 and Arduino DUE board.

I have platformio 2.11.0 with platforms:
toolchain-gccarmnoneeabi: version 3
framework-arduinosam: version 16
tool-bossac: version 3
tool-openocd: version 1
tool ldscripts: version 23

I have the udev rules installed too.

I did these steps:

  1. I opened the Blinky example in Arduino IDE 1.6.9 and uploaded the sketch to my Arduino DUE. It worked as expected, the led was blinking.
  2. I issued the command “pio init --ide eclipse --board due” in a new folder. The command completed successfully.
  3. In Eclipse I imported the newly created project and created a source file with name main.cpp.
  4. I copy pasted the code from Arduino IDE to main.cpp and added #include “Arduino.h” at the top of the file
  5. Double clicked build target and the source got compiled ([SUCCESS] Took 1.95 seconds) creating .pioenvs/due/firmware.elf file.
  6. Double clicked upload target and a lot of similar messages appeared along with the DUE’s TX/RX led blinking rapidly:
    go(addr=0x20001020)
    read(addr=0x20002000,size=0x100)
    writeWord(addr=0x20001028,value=0x20002000)
    writeWord(addr=0x2000102c,value=0x82500)
    readWord(addr=0x400e0a08)=0x1
    then the command finished with success message
  7. Then however nothing happened in the sense that the Arduino DUE’s led stopped blinking the way it did when I uploaded the code with Arduino IDE.

I tried different sources too, with Serial, but nothing happened, no communication at all. It appears to me as if the binaries created were not good for due and while it can be uploaded it could not be run but I’m not quite sure.

I tried replacing framework-arduinosam with the content I downloaded by clicking the link above (version 15) but it made no difference.

Hi @csgyuri! Could you please try latest development version of PlatformIO?

# uninstall existing version
pip uninstall platformio

# install the latest development version of PlatformIO
pip install -U https://github.com/platformio/platformio/archive/develop.zip
1 Like

Hi Valeros,

After reinstalling PlatformIO from latest development version, things started to work like charm. Many thanks!

Unfortunately even after uninstall + install latest development platformIO there is no response from the DUE.
from Arduino IDE same code is working.

IDE 1.3.0
CLI 2.11.0
./platformio/package/framwork-arduinosam/version 10607

How do you install development version? The version should be 2.11.1b2 (beta 2).

Menu: PlatformIO > Settings > PlatformIO IDE and check both

  • Use built-in PlatformIO
  • Use development version of PlatformIO.

P.S: We are going to release 2.11.1 tomorrow. Please sorry for the inconveniences.

PlatformIO IDE 1.3.1 and PlatformIO CLI 2.11.1 are released! Please upgrade!

Thank you for the answers. I reinstall the New version 1.3.1 and it works fine on the blink example now.

Hello I am having the same problem, upload successful but then nothing in the serial terminal. I have verified that the serial monitor works by uploading a sketch via arduino IDE and then viewing the output in the platformio serial monitor. I believe the issue may lie in the fact that the code uploaded is not being run at boot.

I am using platformio-ide version 2.0.0-beta.7 & platformio-ide-terminal version 2.5.3.
I tried using the framework arduinosam 15 but due to the changes in the package management system it didn’t detect that version and re downloaded the latest version.

Could you provide platformio.ini and test sketch to reproduce the issue?

Looks like i am experiencing this exact issue. Upgraded to 3.5.2b1, but that did not help. Running on a Teensy 3.2. Everything was working just fine, until all of a sudden it wasn’t. By all indications the code is nor running on the uC. Example code runs just fine from the arduino IDE

[platformio]
env_default = teensy31

[env:teensy31]
platform = teensy
board = teensy31
;build_flags = -DSERIAL_RX_BUFFER_SIZE=256
framework = arduino
;board_f_cpu = 96000000
lib_deps =
file://./platformio_libs/nanopb.z1.zip
file://./platformio_libs/HX711.z1.zip
file://./platformio_libs/VescUartControl.z1.zip

[env:bt_only]
platform = teensy
board = teensy31
framework = arduino
;build_flags = -D BT_ONLY -DSERIAL_RX_BUFFER_SIZE=256
lib_deps =
file://./platformio_libs/nanopb.z1.zip
file://./platformio_libs/HX711.z1.zip
file://./platformio_libs/VescUartControl.z1.zip

Could you provide a simple project to reproduce this issue?

Just confirmed that my colleague did not have this issue with version 3.4.1,
but then also had the issue after upgrading to 3.5.2b1

Could you provide a simple project to reproduce this issue?

Sure, hang on

IDE not connecting, which apparently it needs to do to make or import a new project. Will give it a few minutes.

Meanwhile, is there a way I can revert back to 3.4.1? on osx if thats relevant