#try a really simple program, like blink

1 messages · Page 1 of 1 (latest)

eager cobalt
#

yeah I'm actually trying their equivalent which just blinks some LEDs using standard Arduino APIs. Works fine from Windows, but won't write correctly from macOS

severe crypt
#

can you use other arduino boards on macOS?

#

especially try a SAMD51 board like some adafruit board if you have one

#

i have a mac running sequoia and could try tomw

eager cobalt
#

I have successfully in the past, let me try one now

#

Yeah, it works ona SAMD51 (M4 Shim)

#

Hmm it's actually a SAME53N, but it should still work

#

(the ClearCore)

#

There's a JTAG header with a TagConnect that I miiight have a cable for, I guess I could try the AVRICE

#

Not sure how to do that from macOS

severe crypt
#

I see they have a ClearCore_Arduino_Wrapper_Installer.zip which expands into a .exe. Are you using that on Windows? Does it install a different version of bossac, etc.?

severe crypt
eager cobalt
#

Thanks for finding their bootloader. I found an unmerged PR for flushing writes on macOS and referring to some bugs showing issues writing flash, so I thought I'd try that. The first attempt to program the board stalled partway through and bricked it. Not sure if I need to use JTAG to recover it now (I thought there was a ROM bootloader that bossac could use, but I couldn't figure out how). So I kinda gave up. I ordered their "special" TAG-Connect cable for my Atmel ICE just in case (that cost me $100).

AFAICT both versions of the stock tools are the same (see my post showing output here: https://forum.arduino.cc/t/can-program-samd5x-on-windows-but-not-macos/1332918/3?u=jetforme).

GitHub

This replaces the current sleep() with the operating system's flush() call to write out the buffer.

eager cobalt
#

Okay that PR seems to fix the issue. I added tcflush to the flush routine on the main branch (and left the delay in), and it now seems to program reliably. It’s not clear to me why it fails so miserably (instead of just failing to write the last few bytes), but it seems to work.

Unfortunately, that PR has been sitting there for nearly four years (and the last commit to main was four years ago), so I don't know if BOSSA is getting any more maintenance.

severe crypt
#

or you could do the uploads by hand on Mac or write a convenience script.