-
Notifications
You must be signed in to change notification settings - Fork 111
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
Upload Error on sodaq_autonomo : SAM-BA operation failed #10
Comments
Same for the SODAQ ONE @loicguillaume, a Sketch looking as follows: void setup() {
pinMode(ENABLE_PIN_IO, OUTPUT);
digitalWrite(ENABLE_PIN_IO, HIGH);
SerialUSB.begin(115200);
SerialUSB.println("Hello");
}
void loop() {
SerialUSB.println("World");
} compiles and uploads fine with the Arduino tool:
whereas in platformio:
with: [env:sodaq_one]
platform = atmelsam
board = sodaq_one
framework = arduino I can get it to upload with a custom board: https://github.com/joscha/platform-sodaqsamd/blob/platformio/boards/sodaq_oneUSB.json definition which is slightly different to https://github.com/platformio/platform-atmelsam/blob/master/boards/sodaq_one.json (maybe @ivankravets can comment as to the differences?) References platformio/platformio-core#796 @Roman3349 you had any luck uploading a sketch via @aethaniel, do you have any idea as you created most of https://github.com/SodaqMoja/SodaqCore-samd - any help would be appreciated! |
It could potentially also be the size of the bootloader: develop...joscha:platformio#diff-2f0a21be6a8aa1aab6e8e332799f2f95R28 - I just updated the framework to 1.6.12 and I am still able to upload with my fork: platformio platform install https://github.com/joscha/platform-sodaqsamd.git [env:sodaq_oneUSB]
platform = sodaqsamd
framework = arduino
board = sodaq_oneUSB |
Hi,
I contributed to Arduino samd which is certainly the source of Sodaq.
Anyway, platform may be switched to atmelsamd instead of atmelsam.
I don't have much knowledge of both platformio or sodaq...
[env:sodaq_one]
-->platform = atmelsam
board = sodaq_one
framework = arduino
…On 5 March 2017 04:25:00 CET, Joscha Feth ***@***.***> wrote:
Same for the SODAQ ONE @loicguillaume, a Sketch looking as follows:
```c
void setup() {
pinMode(ENABLE_PIN_IO, OUTPUT);
digitalWrite(ENABLE_PIN_IO, HIGH);
SerialUSB.begin(115200);
SerialUSB.println("Hello");
}
void loop() {
SerialUSB.println("World");
}
```
compiles and uploads fine with the Arduino tool:
```
Sketch uses 8456 bytes (3%) of program storage space. Maximum is 262144
bytes.
Atmel SMART device 0x10010005 found
Device : ATSAMD21G18A
Chip ID : 10010005
Version : v2.0 [Arduino:XYZ] May 9 2016 16:06:46
Address : 8192
Pages : 3968
Page Size : 64 bytes
Total Size : 248KB
Planes : 1
Lock Regions : 16
Locked : none
Security : false
Boot Flash : true
BOD : true
BOR : true
Arduino : FAST_CHIP_ERASE
Arduino : FAST_MULTI_PAGE_WRITE
Arduino : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
done in 0.664 seconds
Write 8608 bytes to flash (135 pages)
[============== ] 47% (64/135 pages)
[============================ ] 94% (128/135 pages)
[==============================] 100% (135/135 pages)
done in 0.071 seconds
Verify 8608 bytes of flash with checksum.
Verify successful
done in 0.007 seconds
CPU reset.
```
whereas in platformio:
```
SAM-BA operation failed
Send auto-baud
Set binary mode
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
version()=v2.0 [Arduino:XYZ] May 9 2016 16:06:46
chipId=0x10010005
Connected at 115200 baud
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Atmel SMART device 0x10010005 found
write(addr=0x20004000,size=0x34)
*** [upload] Error 1
========================== [ERROR] Took 16.14 seconds
==========================
```
with:
```ini
[env:sodaq_one]
platform = atmelsam
board = sodaq_one
framework = arduino
```
I can get it to upload with a custom board:
https://github.com/joscha/platform-sodaqsamd/blob/platformio/boards/sodaq_oneUSB.json
definition which is slightly different to
https://github.com/platformio/platform-atmelsam/blob/master/boards/sodaq_one.json
(maybe @ivankravets can comment as to the differences?)
I had created https://github.com/joscha/framework-sodaqsamd and
https://github.com/joscha/platform-sodaqsamd before the SODAQ boards
were integrated into pio as a first-class citizen and would love to
retire those forks.
References platformio/platformio-core#796
@Roman3349 you had any luck uploading a sketch via `pio` to any of the
boards? Could you share the config?
@aethaniel, do you have any idea as you created most of
https://github.com/SodaqMoja/SodaqCore-samd - any help would be
appreciated!
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#10 (comment)
--
Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.
|
See source of https://github.com/platformio/platformio-pkg-framework-arduinosam
Our |
@ivankravets any idea why my fork works and the |
@joscha I'll have a look at it after PlatformIO IDE 2.0 release. Please sorry. P.S: Don't forget to ping me here after PIO IDE release. |
@ivankravets ping and congratulations to the 3.3.0 release! |
@joscha could you try in your
|
Please re-test current development branch (2.0.0-alpha.1):
|
New to PlatformIo and having exactly the same problem uploading to a Sodaq Explorer board. Tried the current development branch without success: BeforeUpload(["upload"], [".pioenvs\sodaq_explorer\firmware.bin"]) SAM-BA operation failedSet binary mode readWord(addr=0)=0x20007ffc version()=v2.0 [Arduino:XYZ] May 9 2016 16:06:46 |
We will compare both outputs and check what is wrong. Thanks! |
Sorry for the delay - been away for a couple of days. Both outputs are here: |
The bossac command from the Arduino IDE has "-U true" while the PlatformIo bossac command has "-U false". Running bossac directly from the command line with "-U true" will upload fine. Running with "-U false" fails every time. |
Please re-test current development branch (2.0.0-alpha.1):
|
Working fine now with Sodaq Explorer board thank you. |
\o/ seems to work for me as well, except for a few glitches with the 2.0.0 beta (see platformio/platformio-atom-ide#356) Thanks a lot @ivankravets! |
Hi, I'm trying to upload a program to my sodaq_autonomo but unfortunatly it fails.
The build is fine, but when i'm trying to upload the program:
I saw a similar error have been reported here: https://community.platformio.org/t/unable-to-load-to-mkrzero/1502
For the record, here is the output with the Arduino IDE (I need to press the reset button to start the upload):
Regards.
The text was updated successfully, but these errors were encountered: