Skip to content
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

Problem uploading sketch #27

Open
obdevel opened this issue Feb 11, 2019 · 1 comment
Open

Problem uploading sketch #27

obdevel opened this issue Feb 11, 2019 · 1 comment

Comments

@obdevel
Copy link

obdevel commented Feb 11, 2019

I have an own-design board based on the ATSAMC21G18A Xeno mini but with CAN bus and other devices. I have a J-link programmer and can successfully compile, run and debug using AS7.

I have also programmed the sam_ba_Generic_x21G_SAMC21G18A.bin bootloader onto the board using this environment.

Using Arduino (1.8.8 on macOS) I can compile sketches but I can't upload to the board using a USB/serial adaptor on the RX1 and TX1 pins. Error is:

Uploading using selected port: /dev/cu.SLAB_USBtoUART
/Users/xyz/Library/Arduino15/packages/MattairTech_Arduino/tools/bossac/1.7.0-mattairtech-3/bossac -i -d --port=cu.SLAB_USBtoUART -U true -i -e -w -v /var/folders/03/s3pv8qk91w78m4_st_nbxl5m0000gn/T/arduino_build_445384/ATSAMC21G18A_test_v1.ino.bin -R 
No device found on cu.SLAB_USBtoUART
Set binary mode
Send auto-baud
Set binary mode
An error occurred while uploading the sketch

I'm using the latest board version 1.6.18-beta-b1.

I've tried exporting the compiled binary (.bin) for a simple blink sketch and programming it using AS7; this appears to work but there is no output (LEDs, serial, etc) so I doubt that it is running.

What do you suggest I try next ?

fwiw, another board, based on ATSAMD11D14A, works just fine with this core and bootloader.

Thanks.

@obdevel
Copy link
Author

obdevel commented Mar 3, 2019

An update on progress, such as it is. I can now run sketches by exporting the compiled binary and programming externally using OpenOCD 0.10.0. Serial1-3, Wire and CAN work as expected.

Here's a screen grab of my config:

screen shot 2019-03-03 at 20 55 32

My openocd.cfg : (cobbled together from various sources)

source [find interface/jlink.cfg]
transport select swd

set CHIPNAME at91samc21g18
source [find target/at91samdXX.cfg]

reset_config  srst_nogate
adapter_nsrst_delay 100
adapter_nsrst_assert_width 100

init
targets
reset halt
at91samd bootloader 0
program ATSAMC21_CAN_v1.ino.Xeno_Mini.bin verify
reset
shutdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant