Skip to content

Commit 36d08b9

Browse files
author
Cesarbautista10
committed
chore: edit Docs restructure name and complement documentation pyocd
1 parent 6788074 commit 36d08b9

File tree

10 files changed

+177
-15
lines changed

10 files changed

+177
-15
lines changed

software/sphinx/src/source/1_2_0_about.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
General Information
22
===================
33

4-
The **CH552 Multi-Protocol Programmer** is a compact and versatile development tool designed for high-precision embedded system applications. It supports a broad range of protocols and device architectures, including **AVR**, **ARM (CMSIS-DAP)**, and **CPLD (MAX II)**. Its USB connectivity enables direct interfacing with standard development environments, enabling:
4+
The **Multi-Protocol Programmer** is a compact and versatile development tool designed for high-precision embedded system applications. It supports a broad range of protocols and device architectures, including **AVR**, **ARM (CMSIS-DAP)**, and **CPLD (MAX II)**. Its USB connectivity enables direct interfacing with standard development environments, enabling:
55

66
- In-system programming (ISP)
77
- Step-through debugging

software/sphinx/src/source/2_1_0_avr_firmware.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Firmware Update Procedure
2929
Ensure that **Docker Desktop** is running before executing the build commands, as they rely on Docker containers for compilation.
3030

3131

32-
To commence the utilization of the **CH552 USB Multi-Protocol Programmer** in PICO ASP mode, execute the following procedures:
32+
To commence the utilization of the **Multi-Protocol Programmer** in PICO ASP mode, execute the following procedures:
3333

3434
1. Navigate to the SDK Root Directory
3535

software/sphinx/src/source/2_2_0_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Upload Command
133133
Explanation:
134134

135135
* ``-p m328p`` specifies the target device (ATmega328P).
136-
* ``-c usbasp`` sets the programmer to the CH552 USB Multi-Protocol Programmer.
136+
* ``-c usbasp`` sets the programmer to the Multi-Protocol Programmer.
137137
* ``-U flash:w:blink.hex`` uploads the hex file to flash memory.
138138

139139
Replace ``m328p`` with the appropriate identifier for your specific AVR device (e.g., ``t88`` for ATtiny88). A full list of supported devices is available in the `AVRDUDE user manual <http://www.nongnu.org/avrdude/user-manual/avrdude.html#Device-Options>`_.

software/sphinx/src/source/2_3_0_ide.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ This guide explains how to flash the Arduino-compatible bootloader onto an **ATM
99
Required Materials
1010
------------------
1111

12-
1. **UNIT Multi-Protocol Programmer**
12+
1. **Multi-Protocol Programmer**
1313

1414
.. raw:: html
1515

1616
<div style="text-align: center;">
1717
<img src="./_static/programmer.png" alt="Multi-Protocol Programmer" style="width: 50%;">
18-
<p>UNIT Multi-Protocol Programmer</p>
18+
<p>Multi-Protocol Programmer</p>
1919
</div>
2020

2121
2. **ATMEGA328P Microcontroller**

software/sphinx/src/source/3_1_0_openocd.rst

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,168 @@ Each microcontroller requires a specific configuration file. This file is a scri
5151
PyOCD
5252
=====
5353

54+
PyOCD is a command-line tool for interacting with ARM Cortex-M microcontrollers. It supports flashing, erasing, debugging, and low-level memory access using CMSIS-DAP, DAPLink, ST-Link, and other probes.
55+
56+
Basic Syntax
57+
------------
58+
59+
.. code-block:: bash
60+
61+
pyocd <command> [OPTIONS]
62+
63+
You can specify the target using ``-t <target>`` or through a configuration file using ``--config <file.yaml>``.
64+
65+
Configuration File
66+
------------------
67+
68+
Use a YAML configuration file to define global options:
69+
70+
.. code-block:: yaml
71+
72+
# Misc/pyocd.yaml
73+
target_override: py32f003x6
74+
frequency: 1000000
75+
log_level: info
76+
77+
To load this config:
78+
79+
.. code-block:: bash
80+
81+
pyocd erase --config ./Misc/pyocd.yaml
82+
83+
Commands
84+
--------
85+
86+
erase
87+
^^^^^
88+
89+
Erase flash memory of the target device.
90+
91+
.. code-block:: bash
92+
93+
pyocd erase -t py32f003x6 [OPTIONS]
94+
95+
Options:
96+
97+
- ``--chip``: Erase the entire flash memory.
98+
- ``--sector <ADDR>``: Erase a single sector by address.
99+
- ``--config <file.yaml>``: Load configuration from YAML file.
100+
101+
Example:
102+
54103
.. code-block:: bash
55104
56105
pyocd erase -t py32f003x6 --chip --config ./Misc/pyocd.yaml
106+
107+
flash
108+
^^^^^
109+
110+
Flash a binary, hex, or ELF file to the target.
111+
112+
.. code-block:: bash
113+
114+
pyocd flash <file> -t py32f003x6 [OPTIONS]
115+
116+
Options:
117+
118+
- ``--base-address <addr>``: Override the base address (for .bin files).
119+
- ``--verify``: Verify flash contents after writing.
120+
- ``--erase=chip|sector|auto``: Select erase mode.
121+
- ``--format bin|hex|elf``: Force file format.
122+
- ``--config <file.yaml>``: Load YAML config.
123+
124+
Example:
125+
126+
.. code-block:: bash
127+
128+
pyocd flash firmware.hex -t py32f003x6 --erase=chip --verify
129+
130+
gdbserver
131+
^^^^^^^^^
132+
133+
Start a GDB server for remote debugging.
134+
135+
.. code-block:: bash
136+
137+
pyocd gdbserver -t py32f003x6 [OPTIONS]
138+
139+
Options:
140+
141+
- ``--port <number>``: GDB server port.
142+
- ``--telnet-port <number>``: Telnet monitor port.
143+
- ``--persist``: Keep the server alive after GDB disconnects.
144+
- ``--config <file.yaml>``: Load YAML config.
145+
146+
reset
147+
^^^^^
148+
149+
Reset the target microcontroller.
150+
151+
.. code-block:: bash
152+
153+
pyocd reset -t py32f003x6 [OPTIONS]
154+
155+
Options:
156+
157+
- ``--halt``: Halt the CPU after reset.
158+
- ``--config <file.yaml>``: Load YAML config.
159+
160+
list
161+
^^^^
162+
163+
List connected debug probes and supported targets.
164+
165+
.. code-block:: bash
166+
167+
pyocd list
168+
169+
read / write
170+
^^^^^^^^^^^^
171+
172+
Read and write memory directly.
173+
174+
.. code-block:: bash
175+
176+
pyocd read32 0x08000000 4
177+
pyocd write32 0x20000000 0x12345678
178+
179+
CMSIS-Pack Targets
180+
------------------
181+
182+
To add custom target support (e.g., ``py32f003x6``), use:
183+
184+
.. code-block:: bash
185+
186+
pyocd pack install py32f003x6
187+
188+
Or add a local `.pdsc` file:
189+
190+
.. code-block:: bash
191+
192+
pyocd pack add ./path/to/PY32F003.pdsc
193+
194+
Example Workflow
195+
----------------
196+
197+
.. code-block:: bash
198+
199+
pyocd list
200+
pyocd erase -t py32f003x6 --chip
201+
pyocd flash build/main.hex -t py32f003x6 --verify
202+
pyocd gdbserver -t py32f003x6
203+
pyocd reset -t py32f003x6 --halt
204+
205+
References
206+
----------
207+
208+
- `https://pyocd.io/ <https://pyocd.io/>`_
209+
- `https://github.com/pyocd/pyocd <https://github.com/pyocd/pyocd>`_
210+
211+
Command Help
212+
------------
213+
214+
.. code-block:: bash
215+
216+
pyocd --help
217+
pyocd flash --help
218+
pyocd erase --help

software/sphinx/src/source/4_0_0_rp2040.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ The RP2040 is an efficient and cost-effective microcontroller developed by Raspb
1313

1414
This guide provides a comprehensive introduction to working with RP2040 microcontrollers. It covers setting up the development environment, installing the required software, and writing code for RP2040-based projects.
1515

16-
CH552 Multi-Protocol Programmer for RP2040
16+
Multi-Protocol Programmer for RP2040
1717
-----------------------------------------
1818

19-
The CH552 Multi-Protocol Programmer is a versatile tool for programming and debugging RP2040 microcontrollers. It enables straightforward and reliable programming using the SWD (Serial Wire Debug) interface.
19+
The Multi-Protocol Programmer is a versatile tool for programming and debugging RP2040 microcontrollers. It enables straightforward and reliable programming using the SWD (Serial Wire Debug) interface.
2020

2121
.. raw:: html
2222

@@ -26,10 +26,10 @@ The CH552 Multi-Protocol Programmer is a versatile tool for programming and debu
2626
</div>
2727

2828

29-
Programming RP2040 with the CH552 Multi-Protocol Programmer
29+
Programming RP2040 with the Multi-Protocol Programmer
3030
-----------------------------------------------------------
3131

32-
The CH552 Multi-Protocol Programmer supports programming of RP2040 microcontrollers via the SWD interface. This interface allows direct access to the target microcontroller's flash memory and supports debugging functionality. The programmer is compatible with RP2040f10x and RP2040f4xx series.
32+
The Multi-Protocol Programmer supports programming of RP2040 microcontrollers via the SWD interface. This interface allows direct access to the target microcontroller's flash memory and supports debugging functionality. The programmer is compatible with RP2040f10x and RP2040f4xx series.
3333

3434
.. only:: html
3535

@@ -48,12 +48,12 @@ The CH552 Multi-Protocol Programmer supports programming of RP2040 microcontroll
4848
Pinout diagram for RP2040
4949

5050

51-
DualMCU RP2040 Programming with CH552 Multi-Protocol Programmer
51+
DualMCU RP2040 Programming with Multi-Protocol Programmer
5252
----------------------------------------------------------------
5353

5454
The Multi-Protocol Programmer uses the SWD interface to program RP2040 microcontrollers. Follow these steps to program your RP2040 device:
5555

56-
1. **Connect the CH552 Multi-Protocol Programmer** to your computer via USB.
56+
1. **Connect the Multi-Protocol Programmer** to your computer via USB.
5757
2. **Open Visual Studio Code** or another editor of your preference.
5858
3. **Install the required extensions** for RP2040 development, such as "C/C++" and "CMake Tools".
5959
4. **Create a new project** or open an existing one.

software/sphinx/src/source/4_1_0_rp_firmware.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Firmware update
99
Always remember to keep Docker Desktop open in your computer; otherwise, the commands will not work properly.
1010
1111
12-
To start using your **CH552 USB Multi-Protocol Programmer** as a PICO DAP, follow these steps:
12+
To start using your **Multi-Protocol Programmer** as a PICO DAP, follow these steps:
1313

1414
.. code-block:: bash
1515

software/sphinx/src/source/5_1_0_stm32_firmware.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Firmware update
99
Always remember to keep Docker Desktop open in your computer; otherwise, the commands will not work properly.
1010
1111
12-
To start using your **CH552 USB Multi-Protocol Programmer** as a PICO DAP, follow these steps:
12+
To start using your **Multi-Protocol Programmer** as a PICO DAP, follow these steps:
1313

1414
.. code-block:: bash
1515

software/sphinx/src/source/7_1_0_cpld_firmware.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Firmware update
1717
Always remember to keep Docker Desktop open in your computer; otherwise, the commands will not work properly.
1818
1919
20-
To start using your **CH552 USB Multi-Protocol Programmer** as a CPLD/FPGA programmer, follow these steps:
20+
To start using your **Multi-Protocol Programmer** as a CPLD/FPGA programmer, follow these steps:
2121

2222
.. code-block:: bash
2323

software/sphinx/src/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Multi-Protocol Programmer
1212

1313
**Multi-Protocol Programmer**
1414

15-
The ** USB Multi-Protocol Programmer** is a compact and cost-effective device designed for embedded systems development, testing, and debugging. It supports multiple hardware architectures including **AVR**, **ARM Cortex-M (CMSIS-DAP)**, and **CPLD (MAX II)**, making it ideal for a wide range of applications such as firmware development, educational labs, and low-volume production environments.
15+
The **USB Multi-Protocol Programmer** is a compact and cost-effective device designed for embedded systems development, testing, and debugging. It supports multiple hardware architectures including **AVR**, **ARM Cortex-M (CMSIS-DAP)**, and **CPLD (MAX II)**, making it ideal for a wide range of applications such as firmware development, educational labs, and low-volume production environments.
1616

1717
This programmer is built around the **CH552 microcontroller**, which is based on the enhanced **8051 architecture**. It offers native USB support and a range of digital interfaces (GPIO, SPI, I2C, UART), enabling seamless communication between the host system and the target hardware.
1818

0 commit comments

Comments
 (0)