#try a really simple program, like blink
1 messages · Page 1 of 1 (latest)
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
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
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
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.?
THeir software is here: https://github.com/Teknic-Inc.
Here's their fork of the UF2 bootloader: https://github.com/Teknic-Inc/ClearCore-bootloader.
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).
This replaces the current sleep() with the operating system's flush() call to write out the buffer.
Okay, the invocations are identical, as are the outputs up until the read/verify stage. The macOS version also has an additional output line for each progress update. The output for the same source code compiled on each platform: macOS output: Sketch uses 135840 bytes (26%) of program storage space. Maximum is 507904 bytes. Global variables u...
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.
Since the bootloader is a UF2 bootloader, UF2 uploading could be an alternative to using boassc. That could be added as an alternate upload method. There's already support in board support packages for Arduino for UF2 uploads. RP2040 boards are an example
or you could do the uploads by hand on Mac or write a convenience script.