Skip to content

Update AmebaD documentation #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 170 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
build*

source/_tags/
source/ameba_d/amb21/API_Documents/
source/ameba_d/amb23/API_Documents/
source/ameba_d/amb25/API_Documents/
source/ameba_d/amb26/API_Documents/
source/ameba_d/aw-cu488/API_Documents/
source/ameba_d/bw16-typeb/API_Documents/
source/ameba_d/bw16-typec/API_Documents/

source/ameba_d/amb21/Example_Guides/BLE/
source/ameba_d/amb23/Example_Guides/BLE/
source/ameba_d/amb25/Example_Guides/BLE/
source/ameba_d/amb26/Example_Guides/BLE/
source/ameba_d/aw-cu488/Example_Guides/BLE/
source/ameba_d/bw16-typeb/Example_Guides/BLE/
source/ameba_d/bw16-typec/Example_Guides/BLE/

source/ameba_d/amb21/Example_Guides/Flash Memory/
source/ameba_d/amb23/Example_Guides/Flash Memory/
source/ameba_d/amb25/Example_Guides/Flash Memory/
source/ameba_d/amb26/Example_Guides/Flash Memory/
source/ameba_d/aw-cu488/Example_Guides/Flash Memory/
source/ameba_d/bw16-typeb/Example_Guides/Flash Memory/
source/ameba_d/bw16-typec/Example_Guides/Flash Memory/

source/ameba_d/amb21/Example_Guides/GPIO/
source/ameba_d/amb23/Example_Guides/GPIO/
source/ameba_d/amb25/Example_Guides/GPIO/
source/ameba_d/amb26/Example_Guides/GPIO/
source/ameba_d/aw-cu488/Example_Guides/GPIO/
source/ameba_d/bw16-typeb/Example_Guides/GPIO/
source/ameba_d/bw16-typec/Example_Guides/GPIO/

source/ameba_d/amb21/Example_Guides/GTimer/
source/ameba_d/amb23/Example_Guides/GTimer/
source/ameba_d/amb25/Example_Guides/GTimer/
source/ameba_d/amb26/Example_Guides/GTimer/
source/ameba_d/aw-cu488/Example_Guides/GTimer/
source/ameba_d/bw16-typeb/Example_Guides/GTimer/
source/ameba_d/bw16-typec/Example_Guides/GTimer/

source/ameba_d/amb21/Example_Guides/HTTP/
source/ameba_d/amb23/Example_Guides/HTTP/
source/ameba_d/amb25/Example_Guides/HTTP/
source/ameba_d/amb26/Example_Guides/HTTP/
source/ameba_d/aw-cu488/Example_Guides/HTTP/
source/ameba_d/bw16-typeb/Example_Guides/HTTP/
source/ameba_d/bw16-typec/Example_Guides/HTTP/

source/ameba_d/amb21/Example_Guides/I2C/
source/ameba_d/amb23/Example_Guides/I2C/
source/ameba_d/amb25/Example_Guides/I2C/
source/ameba_d/amb26/Example_Guides/I2C/
source/ameba_d/aw-cu488/Example_Guides/I2C/
source/ameba_d/bw16-typeb/Example_Guides/I2C/
source/ameba_d/bw16-typec/Example_Guides/I2C/

source/ameba_d/amb21/Example_Guides/IPv6/
source/ameba_d/amb23/Example_Guides/IPv6/
source/ameba_d/amb25/Example_Guides/IPv6/
source/ameba_d/amb26/Example_Guides/IPv6/
source/ameba_d/aw-cu488/Example_Guides/IPv6/
source/ameba_d/bw16-typeb/Example_Guides/IPv6/
source/ameba_d/bw16-typec/Example_Guides/IPv6/

source/ameba_d/amb21/Example_Guides/MDNS/
source/ameba_d/amb23/Example_Guides/MDNS/
source/ameba_d/amb25/Example_Guides/MDNS/
source/ameba_d/amb26/Example_Guides/MDNS/
source/ameba_d/aw-cu488/Example_Guides/MDNS/
source/ameba_d/bw16-typeb/Example_Guides/MDNS/
source/ameba_d/bw16-typec/Example_Guides/MDNS/

source/ameba_d/amb21/Example_Guides/MQTT/
source/ameba_d/amb23/Example_Guides/MQTT/
source/ameba_d/amb25/Example_Guides/MQTT/
source/ameba_d/amb26/Example_Guides/MQTT/
source/ameba_d/aw-cu488/Example_Guides/MQTT/
source/ameba_d/bw16-typeb/Example_Guides/MQTT/
source/ameba_d/bw16-typec/Example_Guides/MQTT/

source/ameba_d/amb21/Example_Guides/NTP/
source/ameba_d/amb23/Example_Guides/NTP/
source/ameba_d/amb25/Example_Guides/NTP/
source/ameba_d/amb26/Example_Guides/NTP/
source/ameba_d/aw-cu488/Example_Guides/NTP/
source/ameba_d/bw16-typeb/Example_Guides/NTP/
source/ameba_d/bw16-typec/Example_Guides/NTP/

source/ameba_d/amb21/Example_Guides/OTA/
source/ameba_d/amb23/Example_Guides/OTA/
source/ameba_d/amb25/Example_Guides/OTA/
source/ameba_d/amb26/Example_Guides/OTA/
source/ameba_d/aw-cu488/Example_Guides/OTA/
source/ameba_d/bw16-typeb/Example_Guides/OTA/
source/ameba_d/bw16-typec/Example_Guides/OTA/

source/ameba_d/amb21/Example_Guides/Power Save/
source/ameba_d/amb23/Example_Guides/Power Save/
source/ameba_d/amb25/Example_Guides/Power Save/
source/ameba_d/amb26/Example_Guides/Power Save/
source/ameba_d/aw-cu488/Example_Guides/Power Save/
source/ameba_d/bw16-typeb/Example_Guides/Power Save/
source/ameba_d/bw16-typec/Example_Guides/Power Save/

source/ameba_d/amb21/Example_Guides/PWM/
source/ameba_d/amb23/Example_Guides/PWM/
source/ameba_d/amb25/Example_Guides/PWM/
source/ameba_d/amb26/Example_Guides/PWM/
source/ameba_d/aw-cu488/Example_Guides/PWM/
source/ameba_d/bw16-typeb/Example_Guides/PWM/
source/ameba_d/bw16-typec/Example_Guides/PWM/

source/ameba_d/amb21/Example_Guides/RTC/
source/ameba_d/amb23/Example_Guides/RTC/
source/ameba_d/amb25/Example_Guides/RTC/
source/ameba_d/amb26/Example_Guides/RTC/
source/ameba_d/aw-cu488/Example_Guides/RTC/
source/ameba_d/bw16-typeb/Example_Guides/RTC/
source/ameba_d/bw16-typec/Example_Guides/RTC/

source/ameba_d/amb21/Example_Guides/SPI/
source/ameba_d/amb23/Example_Guides/SPI/
source/ameba_d/amb25/Example_Guides/SPI/
source/ameba_d/amb26/Example_Guides/SPI/
source/ameba_d/aw-cu488/Example_Guides/SPI/
source/ameba_d/bw16-typeb/Example_Guides/SPI/
source/ameba_d/bw16-typec/Example_Guides/SPI/

source/ameba_d/amb21/Example_Guides/SYS/
source/ameba_d/amb23/Example_Guides/SYS/
source/ameba_d/amb25/Example_Guides/SYS/
source/ameba_d/amb26/Example_Guides/SYS/
source/ameba_d/aw-cu488/Example_Guides/SYS/
source/ameba_d/bw16-typeb/Example_Guides/SYS/
source/ameba_d/bw16-typec/Example_Guides/SYS/

source/ameba_d/amb21/Example_Guides/UART/
source/ameba_d/amb23/Example_Guides/UART/
source/ameba_d/amb25/Example_Guides/UART/
source/ameba_d/amb26/Example_Guides/UART/
source/ameba_d/aw-cu488/Example_Guides/UART/
source/ameba_d/bw16-typeb/Example_Guides/UART/
source/ameba_d/bw16-typec/Example_Guides/UART/

source/ameba_d/amb21/Example_Guides/WDT/
source/ameba_d/amb23/Example_Guides/WDT/
source/ameba_d/amb25/Example_Guides/WDT/
source/ameba_d/amb26/Example_Guides/WDT/
source/ameba_d/aw-cu488/Example_Guides/WDT/
source/ameba_d/bw16-typeb/Example_Guides/WDT/
source/ameba_d/bw16-typec/Example_Guides/WDT/

source/ameba_d/amb21/Example_Guides/WiFi/
source/ameba_d/amb23/Example_Guides/WiFi/
source/ameba_d/amb25/Example_Guides/WiFi/
source/ameba_d/amb26/Example_Guides/WiFi/
source/ameba_d/aw-cu488/Example_Guides/WiFi/
source/ameba_d/bw16-typeb/Example_Guides/WiFi/
source/ameba_d/bw16-typec/Example_Guides/WiFi/

source/ameba_d/amb21/Example_Guides/WS2812B/
source/ameba_d/amb23/Example_Guides/WS2812B/
source/ameba_d/amb25/Example_Guides/WS2812B/
source/ameba_d/amb26/Example_Guides/WS2812B/
source/ameba_d/aw-cu488/Example_Guides/WS2812B/
source/ameba_d/bw16-typeb/Example_Guides/WS2812B/
source/ameba_d/bw16-typec/Example_Guides/WS2812B/
Original file line number Diff line number Diff line change
@@ -1,105 +1,105 @@
Debugging - Using the Debug Interface
=====================================
.. contents::
:local:
:depth: 2
Materials
---------
- AmebaD [AMB21 / AMB22 / AMB23 / AMB25 / AMB26 / BW16 / AW-CU488 Thing Plus] x 1
- SEGGER debug probe x 1
Example
-------
Using the debugging feature available in the Arduino 2.0 IDE to debug your board. In this example, we will use SEGGER's debug probe with Arduino IDE's debug interface. Begin by installing the SEGGER debugging software. This can be found on SEGGER's official website: https://www.segger.com/downloads/jlink/
Before debugging, ensure that the code is optimized for debugging. Enable it by navigating to Sketch -> Optimize for Debugging.
|image01|
Open the Debug example, “File” -> “Examples” -> “Debugging” -> “ExampleDebug”
|image02|
Two files will open in the IDE; ExampleDebug.ino and debug_custom.json. Click on debug_custom.json. Under “serverArgs”, insert the directory path to Arduino15 folder, as well as the current version number of the tools folder.
|image03|
Connect the JLink Debug Probe and AmebaD board to the computer. Refer to the table below for the wiring connection between JLink Debug Probe and AmebaD board. For more information, please refer to: https://www.segger.com/products/debug-probes/j-link/technology/interface-description/
+---------------------------+-----------------------+
| **JLink Debug Probe** | **AmebaD Boards** |
+===========================+=======================+
| VTref | 3.3V |
+---------------------------+-----------------------+
| GND | GND |
+---------------------------+-----------------------+
| SWDIO | SWDIO |
+---------------------------+-----------------------+
| SWCLK | SWCLK |
+---------------------------+-----------------------+
|image04|
|image05|
AmebaD boards only have 2 hardware breakpoints. Setting more than that will cause debugging to fail. Hardware breakpoints can be set at the left of the code and are indicated by a red dot shown in line 42. You will need to stop debugging and reset if this happens.
If 2 hardware breakpoint is not enough, software breakpoint can be used. Either of the instructions ``(__BKPT() or __asm__("BKPT"))`` can be used to add a software breakpoint in the program execution.
|image06|
Upload the code and press the reset button on Ameba once the upload is finished.
Once uploading is completed, reset the board. Start debugging by selecting the Debug button. This is located to the right of the upload button. Arduino will proceed with opening a gdb-server tab in the same window as the output window if all connections were connected correctly between JLink and board. This can sometimes take up to 10 seconds to set up.
|image07|
The line highlighted in yellow indicates which line of code the program is currently halted at. Debug console will appear to show the debugging information.
|image08|
To continue running the code after the breakpoint, use any of the single-stepping functions highlighted in the red box above (continue, step over, step into, step out, restart, stop)
.. note :: For AmebaD boards, using any of the single-stepping functionality requires both hardware breakpoint resources to be free. You should remove or disable all existing breakpoints before using them.
|image09|
.. |image01| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image01.png
:width: 1265 px
:height: 542 px
:scale: 70%
.. |image02| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image02.png
:width: 1266 px
:height: 1040 px
:scale: 70%
.. |image03| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image03.png
:width: 1813 px
:height: 457 px
:scale: 40%
.. |image04| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image04.png
:width: 500 px
:height: 500 px
.. |image05| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image05.png
:width: 3264 px
:height: 2448 px
:scale: 20%
.. |image06| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image06.png
:width: 1266 px
:height: 831 px
:scale: 70%
.. |image07| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image07.png
:width: 1256 px
:height: 711 px
:scale: 70%
.. |image08| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image08.png
:width: 1365 px
:height: 728 px
:scale: 70%
.. |image09| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image09.png
:width: 618 px
:height: 459 px
Debugging - Using the Debug Interface
=====================================

.. contents::
:local:
:depth: 2

Materials
---------

- AmebaD [AMB21 / AMB22 / AMB23 / AMB25 / AMB26 / BW16 / AW-CU488 Thing Plus] x 1

- SEGGER debug probe x 1

Example
-------

Using the debugging feature available in the Arduino 2.0 IDE to debug your board. In this example, we will use SEGGER's debug probe with Arduino IDE's debug interface. Begin by installing the SEGGER debugging software. This can be found on SEGGER's official website: https://www.segger.com/downloads/jlink/

Before debugging, ensure that the code is optimized for debugging. Enable it by navigating to Sketch -> Optimize for Debugging.

|image01|

Open the Debug example, “File” -> “Examples” -> “Debugging” -> “ExampleDebug”

|image02|

Two files will open in the IDE; ExampleDebug.ino and debug_custom.json. Click on debug_custom.json. Under “serverArgs”, insert the directory path to Arduino15 folder, as well as the current version number of the tools folder.

|image03|

Connect the JLink Debug Probe and AmebaD board to the computer. Refer to the table below for the wiring connection between JLink Debug Probe and AmebaD board. For more information, please refer to: https://www.segger.com/products/debug-probes/j-link/technology/interface-description/

+---------------------------+-----------------------+
| **JLink Debug Probe** | **AmebaD Boards** |
+===========================+=======================+
| VTref | 3.3V |
+---------------------------+-----------------------+
| GND | GND |
+---------------------------+-----------------------+
| SWDIO | SWDIO |
+---------------------------+-----------------------+
| SWCLK | SWCLK |
+---------------------------+-----------------------+

|image04|

|image05|

AmebaD boards only have 2 hardware breakpoints. Setting more than that will cause debugging to fail. Hardware breakpoints can be set at the left of the code and are indicated by a red dot shown in line 42. You will need to stop debugging and reset if this happens.

If 2 hardware breakpoint is not enough, software breakpoint can be used. Either of the instructions ``(__BKPT() or __asm__("BKPT"))`` can be used to add a software breakpoint in the program execution.

|image06|

Upload the code and press the reset button on Ameba once the upload is finished.

Once uploading is completed, reset the board. Start debugging by selecting the Debug button. This is located to the right of the upload button. Arduino will proceed with opening a gdb-server tab in the same window as the output window if all connections were connected correctly between JLink and board. This can sometimes take up to 10 seconds to set up.

|image07|

The line highlighted in yellow indicates which line of code the program is currently halted at. Debug console will appear to show the debugging information.

|image08|

To continue running the code after the breakpoint, use any of the single-stepping functions highlighted in the red box above (continue, step over, step into, step out, restart, stop)

.. note :: For AmebaD boards, using any of the single-stepping functionality requires both hardware breakpoint resources to be free. You should remove or disable all existing breakpoints before using them.

|image09|

.. |image01| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image01.png
:width: 1265 px
:height: 542 px
:scale: 70%
.. |image02| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image02.png
:width: 1266 px
:height: 1040 px
:scale: 70%
.. |image03| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image03.png
:width: 1813 px
:height: 457 px
:scale: 40%
.. |image04| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image04.png
:width: 500 px
:height: 500 px
.. |image05| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image05.png
:width: 3264 px
:height: 2448 px
:scale: 20%
.. |image06| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image06.png
:width: 1266 px
:height: 831 px
:scale: 70%
.. |image07| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image07.png
:width: 1256 px
:height: 711 px
:scale: 70%
.. |image08| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image08.png
:width: 1365 px
:height: 728 px
:scale: 70%
.. |image09| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image09.png
:width: 618 px
:height: 459 px
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Debugging
=========
.. toctree::
:maxdepth: 1
Debugging - Using the Debug Interface
Debugging
=========

.. toctree::
:maxdepth: 1

Debugging - Using the Debug Interface
Loading