Closed sampscl closed 6 years ago
An update: this command worked from the terminal:
/home/user/.platformio/packages/tool-openocd/bin/openocd -s /home/user/.platformio/packages/tool-openocd/scripts -f board/atmel_samd21_xplained_pro.cfg -c "telnet_port disabled ; program .pioenvs/samd21_xpro/firmware.bin verify reset ; shutdown"
Open On-Chip Debugger 0.9.0-g932ec70 (2017-02-15-11:32)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
adapter speed: 500 kHz
adapter_nsrst_delay: 100
cortex_m reset_config sysresetreq
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 01.1A.00FB
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 500 kHz
Info : SWD IDCODE 0x0bc11477
Info : at91samd21j18.cpu: hardware has 4 breakpoints, 2 watchpoints
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x000016a8 msp: 0x20002168
** Programming Started **
auto erase enabled
Info : SAMD: partitioning the first flash page into 8 subpages
Info : SAMD MCU: SAMD21J18A (256KB Flash, 32KB RAM)
wrote 2048 bytes from file .pioenvs/samd21_xpro/firmware.bin in 0.243147s (8.225 KiB/s)
** Programming Finished **
** Verify Started **
verified 1048 bytes in 0.122116s (8.381 KiB/s)
** Verified OK **
** Resetting Target **
shutdown command invoked
Please re-test with the latest upstream (GIT) version http://docs.platformio.org/en/latest/platforms/atmelsam.html#stable-and-upstream-versions
Yes, that has fixed my problem.
platform = https://github.com/platformio/platform-atmelsam.git
I am unable to program my Atmel SAM D21 Xplained Pro. I have run
pip install -U platformio
andpip install -U https://github.com/platformio/platformio-core/archive/develop.zip
on Ubuntu 16.04 and had the same results (ignoring the "Obsolete PIO Core warning...):It seems that openocd is being told to look for
atmel_samd21_xplained_pro.cfg
in the wrong place. That config file is in/home/user/.platformio/packages/tool-openocd/scripts/board/atmel_samd21_xplained_pro.cfg
, not/home/user/.platformio/packages/tool-openocd/scripts
.