Lower memory SAMD21 variant

Thanks for the great support.
as i have very minimus firmware/software knowledge i have some basic doubts can you please clarify ?

  1. SAMD21G18A or SAMD21E17A bootloaders like Tau will work with SAMD21E17D?
  2. while uploading time arduino is checking board ic to conform the code dump?

i was able to load the code successfully and in windows 10 is is able to detect the com also but when i am trying to dump a blink code using arduino with tau board selected it is giving an error like no device detected in identified Com port?

@MartinL to use this bootloader which board i need to use in arduino?
using tau source code how can i compile a specific 17D bootloader in windows?

@nijupp24 Have you loaded and installed the ArduinoCore-samd package from the Boards Manager?

Tools->Board->Boards Manager... Then type "Arduino Zero" in the search bar. It should display "Arduino SAMD Boards". The current version is 1.8.11.

yes i already installedimage

your bootloader installed and got detected ( arduino zero (native USB port) ) but uploading time no deice found error still coming

@nijupp24 Ok, have you tried uploading with the board set to "Arduino Zero (Native USB Port)"?

@nijupp24 ...and you've selected the port? Arduino IDE menu: Tools->Port->COMx.

What happens if you double tap the reset button two times in quick sucession? This should get the board to change COM port as it enters bootloader mode. Try selecting the bootloader COM port and upload.

yes i did that and com selected what it appear and pressed upload button but still no device found in com53 erroer is comingimage

normally when i connect the board to arduino i am getting com 54. but if am double tap the reset button also am getting 54 only no port difference

@nijupp24 I'm beginning to suspect it has something to do with BOSSA, the program used to upload the code. It might be that the version used by Arduino doesn't support the SAMD21E17D or SAMD21E17B.

Looking at an issue raised Github, it looks like the most recent updates now support your SAMD21E17D microcontroller: https://github.com/shumatech/BOSSA/issues/114 and https://github.com/shumatech/BOSSA/pull/124.

do you have any idea what i should do now?

Back to my posts from last summer, I don't think the issue is BOSSA, since like I said I can upload sketches to the device and they are written to NAND. They just crash when you try to load them.

I think there is some issue with the bootloader. In addition to the linker scripts, there are various other places in the source where the memory size is hard coded (e.g. gcc_arm.ld). I dug through the .map files (for both bootloader and sketches) pretty carefully, but that doesn't mean I am not missing something where memory size is assumed, a stack is allocated too large, etc.

I eventually gave up and went back to the larger memory variants, but it would be neat to know what the problem was.

@mgiacomelli2 This behaviour suggests that you're using a crystalless board and bootloader, but using Arduino core code that requires a board with an external crystal, which the Tau does. In this instance the bootloader works just fine, successfully uploading the sketch, but the sketch fails to run, since without the crystal the microcontroller stalls.

The way to compile the Arduino core code for crystalless operation, is to edit the "boards.txt" file and change the compiler flags for your board to include -DCRYSTALLESS. For example, here's the entry for the Adafruit Trinket M0:

adafruit_trinket_m0.build.extra_flags=-DCRYSTALLESS -DADAFRUIT_TRINKET_M0 -D__SAMD21E18A__ -DARM_MATH_CM0PLUS {build.usb_flags}

To get everything to work you'll need a cyrstalless bootloader set for 16KB RAM and the Arduino core code compiler flag set for crystalless operation.

@nijupp24 I'll look into it.

Hi @nijupp24

Yes, it's to do with BOSSA. The current version used by Arduino doesn't support the SAMD21E17D.

The current situation regarding BOSSA looks a bit of a mess, the lastest release from the Shumatech master repository was a while ago, back in August 2018. However, the demand for new chip variants has continued with others forking the main repository to create their own custom copies, in order to support their own particular microcontroller of interest.

The thing is, I couldn't find anyone who had built AND released a repository that supported the SAMD21E17D. This repo supports the SAMD21E17D, but hasn't built and released it: https://github.com/LumitoLuma/BOSSA.

To build your own copy for Windows, I believe requires the use of MSYS2 plus the installation of the gcc toolchain plus mingw-w64-i686-wxWidgets. Unfortunately, I couldn't find any step-by-step instructions on how to do this.

@MartinL thanks for the ultimate support . if you can do it for me, whenever your free it will be a great support

Hi @nijupp24

I managed to track down a fork of BOSSA on Github that had a precompiled release, containing a bossac.exe file that should be compatible with the SAMD21E17D. The repository release is located here: https://github.com/ElectronicCats/BOSSA/releases/tag/v1.1.1.

I've tested it on my custom SAMD21G18A board and it worked with that, so hopefully it might work on your SAMD21E17D target.

First of all, I'm presuming you're using a Windows OS.

  1. Download the bossac-v1.1.1-win32.zip file and extract it. This folder will contain a bossac.exe file.

  2. Navigate to the directory (on my machine at least): C:\Users\Computer\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3\

  3. Move the current bossac.exe file to somewhere safe in another directory and replace it with the newly extracted one.

  4. Now try selecting the board "Arduino Zero (Native USB Port)" in the Arduino IDE after selecting the board's COM port and try to compile and upload a simple sketch.

Please let me know if it's successful (or not)? Fingers crossed.

sorry for the late reply . thank you so much it is now working and am able to load the code in Arduino directly but still am facing some problem.

  1. after programming some times comport not detecting in windows.
  2. to create the bootloader (GitHub - wagiminator/SAMD-Development-Boards: Collection of SAMD Development Boards, Programmers, Tools and Firmware ) am not able to find any make file on it (SAMD-Development-Boards/SAMD21E_DevBoard at main · wagiminator/SAMD-Development-Boards · GitHub)
  3. i tried to use ready made bootloader how can i change pin varient and led pin on that

Hi @nijupp24

Glad to hear that you can now upload code.

This depends on what you're uploading. If your sketch crashes for whatever reason, it's possible to lose the COM port. Does this happen when you upload a simple sketch, such as "Blink"?

Does your bootloader's COM port appear if you double tap the reset button?

There are various ways to do this. If you're using Windows, it's possible to use Microchip/Atmel Studio 7, without having build using a makefile.

Navigate to the Arduino Zero's bootloader directory:


Make a copy of the "zero" directory and call it say "zero2".

Launch Atmel Studio and open the booloader Solution/Project "samd21_samba.atsln" in the "zero2" directory.

In Atmel Studio open the bootloader file "board_definitions_arduino_zero.h". Here you'll find the configuration definitions for the bootloader itself and can edit the LED status pins, as well as the auxiliary UART that can be used in addition to the native USB port to upload code.

Does this happen when you upload a simple sketch, such as "Blink"? no it is not

Does your bootloader's COM port appear if you double tap the reset button? yes

Navigate to the Arduino Zero's bootloader directory: on that when iam changing the board to ATSAMD21E17D it is giving so many errors.