-
-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot upload to SAMD21_XPRO with Mbed framework #732
Comments
Hi @deladriere !
Compile a simple blink project project:
Run this command in terminal from the root directory of your project:
|
will this affect my SAM Arduino install : I work also (mainly) with Arduino Zero I don't want to loose this |
@deladriere It's only an uploading tool, it won't affect your Zero board. |
I tried this command but it just gave me a blinking caret prompt |
OK, let's try easier command:
|
terminal response : |
Please use your login name instead of |
same results I needed /User/loginname/ |
Nice, OpenOCD has recognised your board. Let's try this from the project's root:
|
Open On-Chip Debugger 0.9.0-gd4b7679 (2015-06-10-19:16) |
After unplugged it works ! (I guess It was stuck from previous command)
debug_level: 2 Info : at91samd21j18.cpu: hardware has 4 breakpoints, 2 watchpoints |
Is the board blinking as you expected? |
yes ! |
OK, thanks for the testing, we will add OpenOCD as the uploader in next release. |
cool ! |
can we dream of using OpenOCD to debug also ? |
Yes, we are planning to add the debug feature in PlatformIO 3.0 |
Hi @deladriere! I've just committed a fix for your board. Could you please install PlatformIO from dev branch and try to program your board?
Thanks! |
upgraded to 2.11.2 nothing happens Polling target at91samd21j18.cpu failed, trying to reexamine endless loop |
Just in case upload works fine on Arduino IDE with opencd uploads with Users/_/Library/Arduino15/packages/arduino/tools/openocd/0.9.0-arduino/bin/openocd -d2 -s /Users/j_/Library/Arduino15/packages/arduino/tools/openocd/0.9.0-arduino/share/openocd/scripts/ -f /Users/***/Library/Arduino15/packages/atmel-samd21-xpros/hardware/samd/0.2.0/variants/atmel_samd21_xpro_v1/openocd_scripts/variant_atmel_edbg.cfg -c telnet_port disabled; program {{/var/folders/v5/zmn08th96gz7w0g4sb04v4wc0000gn/T/build91ce36a0224b18fec82b5f9926025751.tmp/Blink.ino.bin}} verify reset 0x00002000; shutdown Pio with /Users/_/.platformio/packages/tool-openocd/bin/openocd" -d2 -f atmel_samd21_xplained_pro.cfg -s /Users/_/.platformio/packages/tool-openocd/share/openocd/scripts -s /Users/***/.platformio/packages/tool-openocd/sha |
I think the ; is missing after the reset keyword |
Thanks @deladriere, please switch to development branch in PlatformIO IDE: |
done : Menu: PlatformIO > Settings > PlatformIO IDE > Use development version of PlatformIO I guess you mean Update platform and libraries doesn't look to be updating Ide still 1.4.0 upload still stuck at |
Upgrade.... Not update. |
I did too :
Still same (ps also needs to kill opencd.bin between test to be able to re upload) |
Hm... Please open PlatformIO IDE Terminal and run |
same |
fyi /Users/_/Library/Arduino15/packages/arduino/tools/openocd/0.9.0-arduino/bin/openocd -d2 -s /Users/_/Library/Arduino15/packages/arduino/tools/openocd/0.9.0-arduino/share/openocd/scripts/ -f /Users/***/Library/Arduino15/packages/atmel-samd21-xpros/hardware/samd/0.2.0/variants/atmel_samd21_xpro_v1/openocd_scripts/variant_atmel_edbg.cfg -c telnet_port disabled; program {{/var/folders/v5/zmn08th96gz7w0g4sb04v4wc0000gn/T/build91ce36a0224b18fec82b5f9926025751.tmp/Blink.ino.bin}} verify reset 0x00002000; shutdown Info : at91samd21j18.cpu: hardware has 4 breakpoints, 2 watchpoints |
Hm, this issue occurs only in MacOS for some reason.
|
the command you gave me 3 days ago works /Users/_/.platformio/packages/tool-openocd/bin/openocd -d2 -s /Users/__/.platformio/packages/tool-openocd/share/openocd/scripts -f /Users/_**/.platformio/packages/tool-openocd/share/openocd/scripts/board/atmel_samd21_xplained_pro.cfg -c "program {{.pioenvs/samd21_xpro/firmware.bin}} verify reset; shutdown" the command you just gave me works also if I remove some double quote /Users/_/.platformio/packages/tool-openocd/bin/openocd -f atmel_samd21_xplained_pro.cfg -s /Users/__/.platformio/packages/tool-openocd/share/openocd/scripts -s /Users/_**/.platformio/packages/tool-openocd/share/openocd/scripts/board -c "telnet_port disabled; program {{.pioenvs/samd21_xpro/firmware.bin}} verify reset ; shutdow" |
@deladriere Sorry to bother you again, I've just committed some changes so could you try to flash your board with latest development branch?
|
It works now ! BTW it's cool to be able to code in mbed on Arduino Zero too (^_^) |
@deladriere PlatformIO 3.0 has been merged into http://docs.platformio.org/en/latest/installation.html#development-version |
Tested with IDE 1.4.0 and CLI 3.0.0a6 : it works fine thx ! |
@deladriere Thanks 👍 |
Version bump to 2.11.2 (issues platformio#500, platformio#533, platformio#732, platformio#731, platformio#737, platformio#733, platformio#438, platformio#722, platformio#52, platformio#725)
* develop: Fix incorrect line order when converting from INO to CPP and pointer is used Fix unit test Notify about `version` field when creating library Add support for SparkFun Blynk Board Return valid exit code from ``plaformio test`` command Disable SSL Server-Name-Indication for Python < 2.7.9 Version bump to 3.0.1 (issue #772) Disable temporary SSL for PlatformIO services // Resolve #772 Version bump to 3.0.0 (issues #770, #766, #747, #730, #765, #640, #659, #742, #459, #542, #763, #759, #753, #757, #749, #748, #745, #519, #709, #743, #413, #498, #410, #740, #361, #414, #554, #732, #588, #475, #461, #101, #719, #721, #537, #415, #522, #289, #556, #570, #456, #617, #432, #408, #479, #667, #510) Fix menu height for docs Fix issue with multiple archives when linking firmware Add migration guide for PIO2 to PIO3 Search libraries by headers/includes with ``platformio lib search --header`` option Update pio run command examples Add Unit Testing Demo Update PIO Plus badge title and link Add PlatformIO Plus badge Add links to PlatformIO Plus
I can see the serial port with ( pio serial ports list ) where it's connected
/dev/cu.usbmodem1a122
Hardware ID: USB VID:PID=03EB:2111 SER=ATML2130021800004030 LOCATION=26-1.2
Description: EDBG CMSIS-DAP
if I use try to use a specific port like :
pio run --target upload --upload-port /dev/cu.usbmodem1a122
it reports a success but it's a lie : the code is not uploaded
MacBook-Pro:SAMD21_XPRO ***$ pio run --target upload --upload-port /dev/cu.usbmodem1a122
[Tue Jul 26 14:04:48 2016] Processing samd21_xpro (platform: atmelsam, board: samd21_xpro, framework: mbed)
MethodWrapper(["upload"], [".pioenvs/samd21_xpro/firmware.bin"])
Looking for upload port/disk...
Manually specified: /dev/cu.usbmodem1a122
BeforeUpload(["upload"], [".pioenvs/samd21_xpro/firmware.bin"])
============================================== [SUCCESS] Took 0.89 seconds
even worse : I can specify ANY USB port and it reports a success too !
what am I doing wrong ?
thx
Mac OSX Yosemite
PlatformIO, version 2.11.1
PlatformIO IDE 1.3.6
The text was updated successfully, but these errors were encountered: