Skip to content
Snippets Groups Projects
Commit 2868432a authored by Krisjanis Rijnieks's avatar Krisjanis Rijnieks :lion_face:
Browse files

Fix code blocks

parent 8b3546db
No related branches found
No related tags found
No related merge requests found
......@@ -13,21 +13,21 @@ Terminal should be used to run it. Open Terminal and navigate to the Download lo
One way to run it is from the current directory with the "./edbg..." syntax. If you want to use it from whatever location on the system, which is the case when you have multiple projects that reside in different directories, you have to move the "edbg..." file to "/usr/local/bin" folder on Linux and Mac systems. To do that, in Terminal, make sure that you are in the directory where the "edbg..." file resides. Use the following command.
´´´
```
sudo mv edbg-linux-r61 /usr/local/bin/edbg
´´´
```
The above example is for Linux, but on Mac it should be the same, except the linux is going to be "mac". What will happen is that Terminal will ask for the admin password (which you will happily provide) and it will move and rename the file "edbg-linux-r61" to "/usr/local/bin" folder with the name "edbg".
To verify that you can use it, type ´edbg --help´ and hit enter. You should see something like the following.
´´´
```
CMSIS-DAP SWD programmer. Built Feb 13 2024 00:42:17.
Usage: edbg [options]
Options:
...
´´´
```
The above will confirm that the software is installed successfuly.
......@@ -37,16 +37,16 @@ For the programmer to become a funcional SWD programmer, it needs firmware. This
Then, in Terminal, navigate to directory where the above-metioned file is. Next, make sure that the existing and working programmer is connected and ´edbg´ can see it. To verify that, type the following.
´´´
```
edbg --list
´´´
```
You should see an output like the one below.
´´´
```
Attached debuggers:
0: 4344C80D - Alex Taradov Generic CMSIS-DAP Adapter (1)
´´´
```
If you do not see it, double check the connections (computer - USB - programmer).
......@@ -56,19 +56,19 @@ Make sure that the other board is also connected to a USB port. It needs voltage
To flash the firmware, use the following command. Make sure that the ´free_dap_d11c_mini.bin´ file is in the directory where you are currently.
´´´
```
edbg -ebpv -t samd11 -f free_dap_d11c_mini.bin
´´´
```
Hint: if you see multiple programmers attached, you can use ´--serial´ flag to specify the serial number of a specific programmer that you want to use. Like below.
´´´
```
edbg -ebpv -t samd11 -f free_dap_d11c_mini.bin --serial 4344C80D
´´´
```
Anyhow, in the case of success, you should see the following output.
´´´
```
Debugger: Alex Taradov Generic CMSIS-DAP Adapter 4344C80D v0.1 (S, 1)
Using CMSIS-DAP v1
Clock frequency: 16.0 MHz
......@@ -76,7 +76,7 @@ Target: SAM D11C14A (Rev B)
Erasing... done.
Programming... done.
Verification... done.
´´´
```
## Using the Programmer
......@@ -90,15 +90,15 @@ To flash the bootloader, you need to look for the file named ´sam_ba_SAMD11C14A
Next, in Terminal, you should navigate to the file location. Then, make sure your programmer and hello board are connected correctly. The programmer should be plugged in via USB connection to the computer. An SWD cable should be connected to the connector on the edge of the programmer and to the 2x2 connector closer to the chip on the Hello board. The boards hould be aligned so that USB connectors face the same direction. Then, use the following command to flash the bootloader.
´´´
```
edbg -ebpv -t samd11 -f sam_ba_SAMD11C14A.bin
´´´
```
Again, if you have multiple programmers attached, you may use the ´--serial´ specifier.
You should see the following output on success.
´´´
```
Debugger: Alex Taradov Generic CMSIS-DAP Adapter 4344C80D v0.1 (S, 1)
Using CMSIS-DAP v1
Clock frequency: 16.0 MHz
......@@ -106,7 +106,7 @@ Target: SAM D11C14A (Rev B)
Erasing... done.
Programming.... done.
Verification.... done.
´´´
```
Now, you can program the hello board using Arduino. You can disconnect the programmer now if you want.
......@@ -119,7 +119,7 @@ As a result you should see the ´Fab SAM core for Arduino´ listed under "Tools
Now, try the example code below or whatever code you would like to upload.
´´´
```
void setup() {
pinMode(5, OUTPUT);
}
......@@ -130,11 +130,11 @@ void loop() {
digitalWrite(5, LOW);
delay(1000);
}
´´´
```
Go to "Sketch > Upload" to compile and upload your sketch. You should see the board LED blinking on success as well as the following output in the Arduino console.
´´´
```
Write 10116 bytes to flash (159 pages)
[==============================] 100% (159/159 pages)
done in 2.038 seconds
......@@ -144,7 +144,7 @@ Verify 10116 bytes of flash
Verify successful
done in 0.075 seconds
CPU reset.
´´´
```
## Conclusions
......
......@@ -21,13 +21,13 @@ Then, connect the 2x2 SWD programmer cable from the edge connector of the progra
At this point, use the following command to flash the bootloader.
´´´
```
edbg -ebpv -t samd11 -f sam_ba_SAMD11C14A.bin
´´´
```
You should see the following output on success.
´´´
```
Debugger: Alex Taradov Generic CMSIS-DAP Adapter 4344C80D v0.1 (S, 1)
Using CMSIS-DAP v1
Clock frequency: 16.0 MHz
......@@ -35,7 +35,7 @@ Target: SAM D11C14A (Rev B)
Erasing... done.
Programming.... done.
Verification.... done.
´´´
```
Next, open Arduino, and under "Tools > Port" you should see an available serial device "/dev/ttyACM0". Select that and in order for the board to become an UPDI programmer, you need to upload an Arduino sketch [available here](https://github.com/qbolsee/SAMD11C_serial/blob/main/SAMD11C_serial/SAMD11C_serial.ino) (and [in this repository](SAMD11C_serial/SAMD11C_serial.bin)).
......@@ -47,7 +47,7 @@ Before uploading, select the "Tools > Board > Fab SAM Core for Arduino > Generic
Then, make sure that "Tools > Port > /dev/ttyACM0" or equvivalent is selected and do "Sketch > Upload". You should see the following output on success.
´´´
```
Write 10492 bytes to flash (164 pages)
[==============================] 100% (164/164 pages)
done in 2.107 seconds
......@@ -57,7 +57,7 @@ Verify 10492 bytes of flash
Verify successful
done in 0.075 seconds
CPU reset.
´´´
```
## Usage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment