To install the Arduino Core, add the following URL to `Additional Boards Manager URLs`:
To install the Arduino Core, add the following URL to `Additional Boards Manager URLs`:
...
@@ -24,7 +24,7 @@ Then select the right microcontroller in the next menu:
...
@@ -24,7 +24,7 @@ Then select the right microcontroller in the next menu:
<imgsrc=img/microcontroller.pngwidth=50%>
<imgsrc=img/microcontroller.pngwidth=50%>
## With bootloader
## 1. With bootloader
Because the SAMD family has native USB support, they can easily talk to the host computer using a CDC serial class. A neat trick is to use this serial port not only to communicate, but also upload your binary when needed.
Because the SAMD family has native USB support, they can easily talk to the host computer using a CDC serial class. A neat trick is to use this serial port not only to communicate, but also upload your binary when needed.
...
@@ -32,7 +32,7 @@ This can be achieved with a bootloader, that first needs to be installed on the
...
@@ -32,7 +32,7 @@ This can be achieved with a bootloader, that first needs to be installed on the
<imgsrc=img/with_bootloader.pngwidth=50%>
<imgsrc=img/with_bootloader.pngwidth=50%>
### Burn bootloader
### 1.1 Burn bootloader
Connect a CMSIS-DAP adapter (Atmel ICE is also fine) to your board and make sure both are powered. Here are examples with a D11 and a D21, with various programmer/connector styles:
Connect a CMSIS-DAP adapter (Atmel ICE is also fine) to your board and make sure both are powered. Here are examples with a D11 and a D21, with various programmer/connector styles:
...
@@ -44,13 +44,13 @@ Select the right board and microcontroller, then `CMSIS-DAP` as the programmer,
...
@@ -44,13 +44,13 @@ Select the right board and microcontroller, then `CMSIS-DAP` as the programmer,
If all goes well, your board will now be detected as a serial port and you can start uploading to it through the bootloader.
If all goes well, your board will now be detected as a serial port and you can start uploading to it through the bootloader.
### Upload
### 1.2 Upload sketch
To upload a sketch, simply use the `upload` command or the arrow icon. Make sure the bootloader size is not set to `NO_BOOTLOADER`, otherwise the bootloader won't be used.
To upload a sketch, simply use the `upload` command or the arrow icon. Make sure the bootloader size is not set to `NO_BOOTLOADER`, otherwise the bootloader won't be used.
This is a special scenario where you have a bootloader but still want to upload using a programmer. Reasons might be:
This is a special scenario where you have a bootloader but still want to upload using a programmer. Reasons might be:
...
@@ -61,7 +61,7 @@ In those cases, connect a programmer and explicitly pick `Upload Using Programme
...
@@ -61,7 +61,7 @@ In those cases, connect a programmer and explicitly pick `Upload Using Programme
<imgsrc=img/upload_programmer.pngwidth=50%>
<imgsrc=img/upload_programmer.pngwidth=50%>
## Without bootloader
## 2. Without bootloader
As expained previously, bootloaders use some of the flash. With the SAMD11, we only have 16kb of total flash, and the bootloader would use 4kb of that. If you want to recover this extra space, you can use your chip without a bootloader altogether. You'll need a programmer connected every time you upload a sketch.
As expained previously, bootloaders use some of the flash. With the SAMD11, we only have 16kb of total flash, and the bootloader would use 4kb of that. If you want to recover this extra space, you can use your chip without a bootloader altogether. You'll need a programmer connected every time you upload a sketch.
...
@@ -69,7 +69,7 @@ To enable this behavior, simply select `NO_BOOTLOADER` in bootloader size:
...
@@ -69,7 +69,7 @@ To enable this behavior, simply select `NO_BOOTLOADER` in bootloader size:
<imgsrc=img/without_bootloader.pngwidth=50%>
<imgsrc=img/without_bootloader.pngwidth=50%>
### Upload
### 2.1 Upload
To upload without a bootloader, connect a programmer and either pick `Upload` or `Upload Using Programmer`:
To upload without a bootloader, connect a programmer and either pick `Upload` or `Upload Using Programmer`: