Arduino DUE: Code uploaded but does not start

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

Need to investigate this issue and fix. Do you use PlatformIO IDE for CLI?

To revert back, please use pip install "platformio=<3.5".

Does it work with 3.4.1?

P.S: It seems that problem is linked with dev/platform, not PIO Core. Try using the latest PIO Core but the previous Teensy dev/platform

[env:teensy31]
platform = teensy@2.9.1
board = teensy31

Ah sorry i missed this. Will keep a better eye on this going fwd

Yes it works with 3.4.1, I [painfully] found a way to uninstall everything and force brew to install an old version. It has worked stably for about the last month, but now has the issue again… even with 3.4.1

Ah no, looks like PIO quietly upgraded itself in the background :rage: and is now at 3.5.2

That must have broken it again

Any update on what is going on with this?

I can upload , but i must do it from terminal with pio run -t upload. I cannot load from the ide

@ivankravets Same problem with 5.1.1. Is there any update or, should I go with 3.4.1?

Don’t revive 3 year old topics please, open a new one with all the information of your project (platformio.ini, code, expected behaviour, observed behavior) so we can help you properly.

1 Like