My first presumption is that mbed OS plays nice with SAM-BA / BOSSAC USB bootloader.
My second presumption is that though this is not the official mbed OS supported SAMD Xplained target board (http://www.atmel.com/tools/ATSAMD21-XPRO.aspx) that it’s close enough to not be a problem.
The LED is on digital pin 13 aka PA17. However, my modified blink code is unresponsive:
I just managed to get my Adafruit Feather M0 Basic Proto blinking with mbed OS.
With the first attempts I had the same issue that my board was unresponsive after the upload.
To actually make it blink I had to change the linker script (yotta_targets/atmel-samd21g18a-gcc/ld/samd21g18a.ld) that comes with the atmel-samd21g18a-gcc target since the bootloader on the Adafruit Feather M0 and probably also on your Sparkfun SAMD mini board also needs some space.
So I change Memory Spaces Definitions in the linker script from
Wow @bittailor - nice! I will try this ASAP
I was resolved to having to use ATMEL-ICE or similar… (and still will for some scenarios). Have you used one? I am curious if you or anyone has had success doing a "yotta debug" with it.
When I start down that path, this happens:
error: Target atmel-samd21g18a-gcc 1.0.1 at /mnt/c/Projects/playground.mbed/src/OS/blinky/yotta_targets/atmel-samd21g18a-gcc does not specify debug commands
Why is it necessary o offset for the Arduino bootloader?
Shouldn’t the new .bin start at 0x0 and you just wouldn’t be able to use the Arduino IDE for programming any longer, you would have to use whatever interface you are using to write the binary; i.e. Segger or something else.
I am having a similar problem and haven’t tried your solution, however I don’t understand the reason ‘necessity’ to save the Arduino bootloader.
I uploaded my code via the Arduino Bootloader since I have no Segger or another programmer. Therefore I needed the bootlaoder and the offset of the bootloader. If you upload your code via a programmer and override the bootloader there is no need for an offset, as Malachi mentioned in his response.
I experienced the same. Then I checked the boards list and checked the mbed OS 5 filter. With this the Atmel ATSAMD21-XPRO disappears from the list, so it looks like the SAMD21 target is not or not yet supported for mbed OS 5. I then I stopped trying further,
Would be really nice to know if it is planned to add support of Atmel ATSAMD21-XPRO for mbed OS 5 and if yes if there is already a rough date for it.
@malachi@bittailor@sergoserg, the main problem seems to be in RTX not supported on this chipset. Here I posted a trick to remove RTX from your mbed OS 5 application, which should allow you to build for this target again…
After that you can use mbed-events (similar to MINAR in mbed OS 3) or roll your own state machine.
Hi @janjongboom. Thanks for the tips and link.
I reckon if RTOS features are disabled, the networking stacks, such as 6lowpan and Thread, won’t work. Is it possible to get them working without RTOS?
Specifically, semihosting doesn’t seem to be present but if I can push things out over regular Serial that would be enough for me. However, host PC doesn’t see this USB device at all when it’s running mbed-programmed firmware.