platformio / platform-atmelsam

Atmel SAM: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelsam
Apache License 2.0
82 stars 108 forks source link

failing to run remote tests on Adafruit Feather M0 #45

Open scott2b opened 5 years ago

scott2b commented 5 years ago

I am running a remote agent on Ubuntu with an Adafruit Feather M0 attached. I am trying to run tests remotely from a Mac. It seems to connect and to accept the test request. It appears to upload the code, but then variously either freezes or throws an error as shown below.

The sequence I see on the remote agent is: Remote command received: psync Remote command received: test

And the M0 LED seems to indicate the code is being uploaded.

Things I have tried:

The full transcript from my attempted test run:

scott@scotts-mbp-2:~/Projects/knightlab/SensorGrid$ pio remote device list
Agent ThinkPad
==============
/dev/ttyS4
----------
Hardware ID: WACf008
Description: ttyS4

/dev/ttyS0
----------
Hardware ID: PNP0501
Description: ttyS0

/dev/ttyACM0
------------
Hardware ID: USB VID:PID=239A:800B SER=60DB1ED9514D503535202020FF162933 LOCATION=1-6.4:1.0
Description: Adafruit Feather M0

scott@scotts-mbp-2:~/Projects/knightlab/SensorGrid$ pio remote test -v
Building project locally
Verbose mode can be enabled via `-v, --verbose` option
Collected 1 items

========================================== [test/test_common] Building... (1/3) ==========================================
Processing adafruit_feather_m0 (framework: arduino; platform: atmelsam; board: adafruit_feather_m0)
--------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/adafruit_feather_m0.html
PLATFORM: Atmel SAM > Adafruit Feather M0
HARDWARE: SAMD21G18A 48MHz 32KB RAM (256KB Flash)
DEBUG: CURRENT(atmel-ice) EXTERNAL(atmel-ice, blackmagic, jlink)
Converting SensorGridPM.ino
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 78 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <RadioHead> 1.82
|   |-- <RadioHead.1.8.2>
|   |   |-- <SPI> 1.0
|   |-- <SPI> 1.0
|-- <RTCZero> 1.5.2
|-- <RTClib> 1.2.1
|   |-- <Wire> 1.0
|-- <SdFat> 1.0.5
|   |-- <SPI> 1.0
|-- <ArduinoJson> 5.13.1
|-- <Adafruit SSD1306> 1.1.2
|   |-- <Wire> 1.0
|   |-- <Adafruit GFX Library> 1.2.3
|   |   |-- <SPI> 1.0
|   |-- <SPI> 1.0
|-- <Adafruit GFX Library> 1.2.3
|   |-- <SPI> 1.0
|-- <Adafruit Feather OLED> 1
|   |-- <Wire> 1.0
|   |-- <Adafruit GFX Library> 1.2.3
|   |   |-- <SPI> 1.0
|   |-- <Adafruit SSD1306> 1.1.2
|   |   |-- <Wire> 1.0
|   |   |-- <Adafruit GFX Library> 1.2.3
|   |   |   |-- <SPI> 1.0
|   |   |-- <SPI> 1.0
|-- <Adafruit Si7021 Library> 1.1.0
|   |-- <Wire> 1.0
|-- <TaskScheduler> 2.6.1
|   |-- <RTClib> 1.2.1
|   |   |-- <Wire> 1.0
|   |-- <SdFat> 1.0.5
|   |   |-- <SPI> 1.0
|   |-- <RTCZero> 1.5.2
|-- <KnightLab_SDConfig> 1.0
|   |-- <SdFat> 1.0.5
|   |   |-- <SPI> 1.0
|   |-- <SPI> 1.0
|-- <KnightLab_GPS> 1.0
|   |-- <Adafruit GPS Library> 1.0.2
|-- <KnightLab_Sensors> 1.0
|   |-- <ArduinoJson> 5.13.1
|   |-- <KnightLab_ArduinoUtils> 1.0
|   |   |-- <RTCZero> 1.5.2
|   |-- <Adafruit Si7021 Library> 1.1.0
|   |   |-- <Wire> 1.0
|-- <KnightLab_LoRaUtils> 1.0
|   |-- <KnightLab_ArduinoUtils> 1.0
|   |   |-- <RTCZero> 1.5.2
|   |-- <RadioHead.1.8.2>
|   |   |-- <SPI> 1.0
|-- <KnightLab_FeatherUtils> 1.0
|-- <test>
|   |-- <KnightLab_ArduinoUtils> 1.0
|   |   |-- <RTCZero> 1.5.2
|   |-- <KnightLab_LoRaUtils> 1.0
|   |   |-- <KnightLab_ArduinoUtils> 1.0
|   |   |   |-- <RTCZero> 1.5.2
|   |   |-- <RadioHead.1.8.2>
|   |   |   |-- <SPI> 1.0
|-- <KnightLab_ArduinoUtils> 1.0
|   |-- <RTCZero> 1.5.2
Compiling .pioenvs/adafruit_feather_m0/src/SensorGridPM.ino.cpp.o
Checking size .pioenvs/adafruit_feather_m0/firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [==        ]  23.6% (used 7736 bytes from 32768 bytes)
PROGRAM: [==        ]  19.4% (used 50896 bytes from 262144 bytes)
Testing project remotely
Verbose mode can be enabled via `-v, --verbose` option
Collected 1 items

==================== [test/test_common] Uploading... (2/3) ====================
Processing adafruit_feather_m0 (framework: arduino; platform: atmelsam; board: adafruit_feather_m0)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Configuring upload protocol...
AVAILABLE: atmel-ice, blackmagic, jlink, sam-ba
CURRENT: upload_protocol = sam-ba
Looking for upload port...
Auto-detected: /dev/ttyACM0
Forcing reset using 1200bps open/close on port /dev/ttyACM0
Waiting for the new upload port...
Uploading .pioenvs/adafruit_feather_m0/firmware.bin
Erase flash

Done in 0.818 seconds
Write 50896 bytes to flash (796 pages)
[==============================] 100% (796/796 pages)
Done in 0.319 seconds
Verify 50896 bytes of flash
[==============================] 100% (796/796 pages)
Verify successful
Done in 0.623 seconds

===================== [test/test_common] Testing... (3/3) =====================
If you don't see any output for the first 10 secs, please reset board (press reset button)

Error: Traceback (most recent call last):
  File "<string>", line 70, in main
  File "/home/scott/tmp/pio/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/home/scott/tmp/pio/local/lib/python2.7/site-packages/click/core.py", line 680, in main
    rv = self.invoke(ctx)
  File "/home/scott/tmp/pio/local/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/scott/tmp/pio/local/lib/python2.7/site-packages/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/scott/tmp/pio/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/home/scott/tmp/pio/local/lib/python2.7/site-packages/click/decorators.py", line 16, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "<string>", line 61, in cli
  File "<string>", line 175, in process
  File "<string>", line 184, in run
  File "/home/scott/tmp/pio/local/lib/python2.7/site-packages/serial/serialposix.py", line 286, in open
    self._update_dtr_state()
  File "/home/scott/tmp/pio/local/lib/python2.7/site-packages/serial/serialposix.py", line 636, in _update_dtr_state
    fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_DTR_str)
IOError: [Errno 32] Broken pipe

============================================================
An unexpected error occurred. Further steps:
* Verify that you have the latest version of PlatformIO using
  `pip install -U platformio` command
* Try to find answer in FAQ Troubleshooting section
  http://docs.platformio.org/page/faq.html
* Report this problem to support@pioplus.com
============================================================