Skip to content
Snippets Groups Projects
Commit f0b3c690 authored by Quentin Bolsee's avatar Quentin Bolsee
Browse files

section titles

parent db4cbbb3
No related branches found
No related tags found
No related merge requests found
# Arduino SAM Tutorial # Arduino SAM Tutorial
## Installing ## 0. Installing
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:
<img src=img/microcontroller.png width=50%> <img src=img/microcontroller.png width=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
<img src=img/with_bootloader.png width=50%> <img src=img/with_bootloader.png width=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.
<img src=img/upload.png width=50%><img src=img/upload_alt.png width=50%> <img src=img/upload.png width=50%><img src=img/upload_alt.png width=50%>
### Upload with programmer ### 1.3 Upload with programmer (optional)
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
<img src=img/upload_programmer.png width=50%> <img src=img/upload_programmer.png width=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:
<img src=img/without_bootloader.png width=50%> <img src=img/without_bootloader.png width=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`:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment