mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-10-11 09:12:32 +02:00
Wi-Fi Devboard documentation rework (#3944)
* New step-by-step documentation structure for Wi-Fi Devboard * Added a description of working under Windows * Added a description of switching Devboard operation mode (Black Magic, DAPLink) * The images for the documentation are uploaded to the CDN * The text in the sidebar, near the dolphin logo, changed from blue to black/white Co-authored-by: knrn64 <25254561+knrn64@users.noreply.github.com> Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
88
documentation/devboard/Debugging via the Devboard.md
Normal file
88
documentation/devboard/Debugging via the Devboard.md
Normal file
@@ -0,0 +1,88 @@
|
||||
# Debugging via the Devboard {#dev_board_debugging_guide}
|
||||
|
||||
On this page, you'll learn about how debugging via the Wi-Fi Developer Board works. To illustrate this process, we'll start a debug session for Flipper Zero's firmware in VS Code using the native Flipper Build Tool.
|
||||
|
||||
***
|
||||
|
||||
## Overview
|
||||
|
||||
The Developer Board acts as the debug probe, which provides a bridge between the IDE (integrated development environment) with a debugger running on a host computer and the target microcontroller (in your Flipper Zero). The user controls the debugging process on the computer connected to the Developer Board via [Wi-Fi](#dev_board_wifi_connection) or [USB cable](#dev_board_usb_connection).
|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_WiFi_hardware_CDN.jpg width=700
|
||||
|
||||
Data exchange between the Wi-Fi Developer Board and your Flipper Zero is conducted via the Serial Wire Debug interface. The following GPIO pins serve this purpose:
|
||||
|
||||
- **Pin 10:** Serial Wire Clock (SWCLK)
|
||||
|
||||
- **Pin 12:** Serial Wire Debug Data I/O (SWDIO)
|
||||
|
||||
To learn more about Flipper Zero pinout, visit [GPIO & modules in Flipper Docs](https://docs.flipper.net/gpio-and-modules).
|
||||
|
||||
***
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Step 1. Installing Git
|
||||
|
||||
You'll need Git installed on your computer to clone the firmware repository. If you don't have Git, install it following the [official installation guide](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
|
||||
|
||||
### Step 2. Building the firmware
|
||||
|
||||
Before starting debugging, you need to clone and build Flipper Zero firmware:
|
||||
|
||||
1. Open the **Terminal** (on Linux & macOS) or **PowerShell** (on Windows) in the directory where you want to store the firmware source code.
|
||||
|
||||
2. Clone the firmware repository:
|
||||
|
||||
```
|
||||
git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git
|
||||
cd flipperzero-firmware
|
||||
```
|
||||
|
||||
3. Run the **Flipper Build Tool (FBT)** to build the firmware:
|
||||
|
||||
```
|
||||
./fbt
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
## Debugging the firmware
|
||||
|
||||
From the **flipperzero-firmware** directory that you cloned earlier, run the following command:
|
||||
|
||||
```
|
||||
./fbt flash
|
||||
```
|
||||
|
||||
This will upload the firmware you've just built to your Flipper Zero via the Developer Board. After that, you can start debugging the firmware. We recommend using **VS Code** with the recommended extensions (as described below), and we have pre-made configurations for it.
|
||||
|
||||
To debug in **VS Code**, do the following:
|
||||
|
||||
1. In VS Code, open the **flipperzero-firmware** directory.
|
||||
|
||||
2. You should see a notification about recommended extensions. Install them.
|
||||
|
||||
If there were no notifications, open the **Extensions** tab, enter `@recommended` in the search bar, and install the workspace recommendations.
|
||||
|
||||
3. Run the `./fbt vscode_dist` command. This will generate the VS Code configuration files needed for debugging.
|
||||
|
||||
4. In VS Code, open the **Run and Debug** tab and select a debugger from the dropdown menu:
|
||||
|
||||
- **Attach FW (blackmagic):** Can be used via **Wi-Fi** or **USB**
|
||||
- **Attach FW (DAP):** Can be used via **USB** only
|
||||
|
||||
Note that when debugging via USB, you need to make sure the selected debugger matches the debug mode on your Devboard. To check the debug mode on your Devboard, access the Devboard's web interface as described [here](#dev_board_wifi_connection) and check the **USB mode** field. If you want to use a different debug mode, enable this mode by following the steps in [Devboard debug modes](#dev_board_debug_modes).
|
||||
|
||||
5. If needed, flash your Flipper Zero with the `./fbt flash` command, then click the ▷ **Start Debugging** button in the debug sidebar to start the debugging session.
|
||||
|
||||
6. Note that starting a debug session halts the execution of the firmware, so you'll need to click the I▷ **Continue** button on the toolbar at the top of your VS Code window to continue execution.
|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_Wi-Fi_devboard_VS_Code.jpg width=900
|
||||
|
||||
> [!note]
|
||||
> If you want to use a different debug mode on your Developer Board, visit [Devboard debug modes](#dev_board_debug_modes).
|
||||
>
|
||||
> If you want to read logs via the Developer Board, see [Reading logs via the Devboard](#dev_board_reading_logs).
|
||||
>
|
||||
> To learn about debugging in VS Code, see [VS Code official guide](https://code.visualstudio.com/docs/editor/debugging).
|
33
documentation/devboard/Devboard debug modes.md
Normal file
33
documentation/devboard/Devboard debug modes.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Devboard debug modes {#dev_board_debug_modes}
|
||||
|
||||
The Wi-Fi Devboard for Flipper Zero supports **Black Magic** and **DAPLink** debug modes, and you can switch between them depending on your needs. Note that available modes depend on connection:
|
||||
|
||||
- **Wi-Fi:** Only **Black Magic** mode is available.
|
||||
- **USB:** Switch between **Black Magic** (default) and **DAPLink**. Learn more about switching debug modes for USB connection below.
|
||||
|
||||
> [!note]
|
||||
> Black Magic mode doesn't support RTOS threads, but you can still perform other debugging operations.
|
||||
|
||||
***
|
||||
|
||||
## Switching debug modes for USB connection
|
||||
|
||||
Switching debug modes for working via USB has to be done wirelessly (yes, you read that correctly). Additionally, depending on how the Devboard wireless connection is configured, you may need to follow different steps for **Wi-Fi access point mode** or **Wi-Fi client mode**:
|
||||
|
||||
1. If the Devboard isn't connected to your Flipper Zero, turn off your Flipper Zero and connect the Developer Board, then turn the device back on.
|
||||
|
||||
2. Access the Devboard's web interface:
|
||||
|
||||
- [Wi-Fi access point mode](#wifi-access-point)
|
||||
|
||||
- [Wi-Fi client mode](#wifi-client-mode)
|
||||
|
||||
3. In the **WiFi** tab, click the **USB mode** option and select **BlackMagicProbe** or **DapLink**.
|
||||
|
||||
4. Click **SAVE**, then click **REBOOT** to apply the changes.
|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_WiFi_devboard_switching_modes_CDN.jpg width=700
|
||||
|
||||
> [!note]
|
||||
> After switching debug modes on your Devboard, remember to select the same debugger in **VS Code** in the **Run and Debug** tab, and click the ▷ **Start Debugging** button.
|
||||
|
@@ -1,122 +1,112 @@
|
||||
# Firmware update on Developer Board {#dev_board_fw_update}
|
||||
|
||||
It's important to regularly update your Developer Board to ensure that you have access to the latest features and bug fixes. This tutorial will guide you through the necessary steps to update the firmware of your Developer Board.
|
||||
It's important to regularly update your Developer Board to ensure that you have access to the latest features and bug fixes. This page will guide you through the necessary steps to update the firmware of your Developer Board.
|
||||
|
||||
This tutorial assumes that you're familiar with the basics of the command line. If you’re not, please refer to the [Windows](https://www.digitalcitizen.life/command-prompt-how-use-basic-commands/) or [MacOS/Linux](https://ubuntu.com/tutorials/command-line-for-beginners#1-overview) command line tutorials.
|
||||
> [!note]
|
||||
> This guide assumes that you're familiar with the basics of the command line. If you're new to it, we recommend checking out these [Windows](https://learn.microsoft.com/en-us/powershell/scripting/learn/ps101/01-getting-started?view=powershell-7.4) or [macOS/Linux](https://ubuntu.com/tutorials/command-line-for-beginners#1-overview) command line tutorials.
|
||||
|
||||
***
|
||||
|
||||
## Installing the micro Flipper Build Tool
|
||||
## Step 1. Install the micro Flipper Build Tool
|
||||
|
||||
Micro Flipper Build Tool (uFBT) is a cross-platform tool that enables basic development tasks for Flipper Zero, such as building and debugging applications, flashing firmware, and creating VS Code development configurations.
|
||||
is a cross-platform tool developed and supported by our team that enables basic development tasks for Flipper Zero, such as building and debugging applications, flashing firmware, creating VS Code development configurations, and flashing firmware to the Wi-Fi Developer Board.
|
||||
|
||||
Install uFBT on your computer by running the following command in the Terminal:
|
||||
**On Linux & macOS:**
|
||||
|
||||
**For Linux & macOS:**
|
||||
Run the following command in the Terminal:
|
||||
|
||||
```text
|
||||
```
|
||||
python3 -m pip install --upgrade ufbt
|
||||
```
|
||||
|
||||
**For Windows:**
|
||||
**On Windows:**
|
||||
|
||||
```text
|
||||
py -m pip install --upgrade ufbt
|
||||
```
|
||||
1. Download the latest version of Python on
|
||||
2. Run the following command in the PowerShell
|
||||
|
||||
If you want to learn more about uFBT, visit [the project's page](https://pypi.org/project/ufbt/).
|
||||
```
|
||||
py -m pip install --upgrade ufbt
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
## Connecting the Developer Board to your computer
|
||||
## Step 2. Connect the Devboard to PC
|
||||
|
||||
To update the firmware, you need to switch your Developer Board to Bootloader mode, connect to a PC via a USB cable, and make sure that the PC detects the Developer Board:
|
||||
|
||||
1. List all of the serial devices on your computer.
|
||||
|
||||
**Windows**
|
||||
- **macOS:** Run the `ls /dev/cu.*` command in the Terminal.
|
||||
|
||||
On Windows, go to Device Manager and expand the Ports (COM & LPT) section.
|
||||
- **Linux:** Run the `ls /dev/tty*` command in the Terminal.
|
||||
|
||||
**macOS**
|
||||
|
||||
On macOS, you can run the following command in the Terminal:
|
||||
|
||||
```text
|
||||
ls /dev/cu.*
|
||||
```
|
||||
|
||||
**Linux**
|
||||
|
||||
On Linux, you can run the following command in the Terminal:
|
||||
|
||||
```text
|
||||
ls /dev/tty*
|
||||
```
|
||||
|
||||
View the devices in the list.
|
||||
- **Windows:** Go to **Device Manager** and expand the **Ports (COM & LPT)** section.
|
||||
|
||||
2. Connect the Developer Board to your computer using a USB-C cable.
|
||||

|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_Wi-Fi_devboard_update_wired_connection.jpg width=700
|
||||
|
||||
3. Switch your Developer Board to Bootloader mode:
|
||||
|
||||
3.1. Press and hold the **BOOT** button.
|
||||
1. Press and hold the **BOOT** button.
|
||||
2. Press the **RESET** button while holding the **BOOT** button.
|
||||
3. Release the **BOOT** button.
|
||||
|
||||
3.2. Press the **RESET** button while holding the **BOOT** button.
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_Wi-Fi_devboard_reboot_to_bootloader.png width=700
|
||||
|
||||
3.3. Release the **BOOT** button.\
|
||||

|
||||
|
||||
4. Repeat Step 1 and view the name of your Developer Board that appeared in the list.
|
||||
|
||||
For example, on macOS:
|
||||
|
||||
```text
|
||||
/dev/cu.usbmodem01
|
||||
```
|
||||
4. Repeat **Step 1** and view the name of your Developer Board that appeared in the list.
|
||||
|
||||
***
|
||||
|
||||
## Flashing the firmware
|
||||
## Step 3. Flash the firmware
|
||||
|
||||
To flash the firmware onto your Developer Board, run the following command in the terminal:
|
||||
**On Linux & macOS:**
|
||||
|
||||
```text
|
||||
```
|
||||
python3 -m ufbt devboard_flash
|
||||
```
|
||||
|
||||
**On Windows:** Run the following command in the PowerShell:
|
||||
|
||||
```
|
||||
py -m ufbt devboard_flash
|
||||
```
|
||||
|
||||
You should see the following message: `WiFi board flashed successfully`.
|
||||
|
||||
## If flashing failed
|
||||
### If flashing failed
|
||||
|
||||
If you get an error message during the flashing process, such as this:
|
||||
Occasionally, you might get an error message during the flashing process, such as:
|
||||
|
||||
```text
|
||||
```
|
||||
A fatal error occurred: Serial data stream stopped: Possible serial noise or corruption.
|
||||
```
|
||||
|
||||
Or this:
|
||||
*or*
|
||||
|
||||
```text
|
||||
```
|
||||
FileNotFoundError: [Errno 2] No such file or directory: '/dev/cu.usbmodem01'
|
||||
```
|
||||
|
||||
Try doing the following:
|
||||
To fix it, try doing the following:
|
||||
|
||||
* Disconnect the Developer Board from your computer, then reconnect it.
|
||||
- Disconnect the Developer Board from your computer, then reconnect it. After that, switch your Developer Board to Bootloader mode once again, as described in
|
||||
|
||||
* Use a different USB port on your computer.
|
||||
- Use a different USB port on your computer.
|
||||
|
||||
* Use a different USB-C cable.
|
||||
- Use a different USB-C cable.
|
||||
|
||||
***
|
||||
|
||||
## Finishing the installation
|
||||
|
||||
After flashing the firmware:
|
||||
## Step 4. Finish the installation
|
||||
|
||||
1. Reboot the Developer Board by pressing the **RESET** button.
|
||||

|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_Wi-Fi_devboard_reboot_after_flashing.jpg width=700
|
||||
|
||||
2. Disconnect and reconnect the USB-C cable.
|
||||
|
||||
The Developer Board should appear as a serial device on your computer. Now, you can use it with the Black Magic Debug client of your choice.
|
||||
You've successfully updated the firmware of your Developer Board!
|
||||
|
||||
If you followed the **Get started with the Devboard** guide, you're ready for the next step: [Step 3. Plug the Devboard into Flipper Zero](#dev_board_get_started_step-3).
|
||||
|
||||
|
@@ -1,178 +1,80 @@
|
||||
# Get started with the Dev Board {#dev_board_get_started}
|
||||
|
||||
The Wi-Fi Developer Board serves as a tool to debug the Flipper Zero firmware. To debug the firmware, the initial step involves compiling the firmware from its source code. This process enables the debugging functionality within the firmware and generates all the necessary files required for debugging purposes.
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_WiFi_developer_board_box_CDN.jpg width=700
|
||||
|
||||
> **NOTE:** Building and debugging the Flipper Zero firmware is fully supported on MacOS and Linux. Support for Windows is in beta test.
|
||||
Before you start using your Devboard, you need to prepare your Flipper Zero and Devboard for debugging. In this guide, we'll walk you through all the necessary steps and provide links to explore the Devboard's capabilities further.
|
||||
|
||||
***
|
||||
|
||||
## Updating the firmware of your Developer Board
|
||||
## Step 1. Enable Debug Mode on your Flipper Zero
|
||||
|
||||
Update the firmware of your Developer Board before using it. For more information, visit [Firmware update on Developer Board](https://docs.flipperzero.one/development/hardware/wifi-debugger-module/update).
|
||||
Since the main purpose of the Developer board is to debug applications on Flipper Zero, you first need to enable Debug Mode. To do so, go to **Settings → System** and set **Debug** to **ON**.
|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_enamble_debug_CDN.jpg width=700
|
||||
|
||||
> [!note]
|
||||
> Debug Mode needs to be re-enabled after each update of Flipper Zero's firmware.
|
||||
|
||||
Debug Mode allows you to debug your apps for Flipper Zero, as well as access debugging options in apps via the user interface and CLI. To learn more about Flipper Zero CLI, visit [Command-line interface in Flipper Docs](https://docs.flipper.net/development/cli).
|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_Command_Line_Interface_CDN.jpg width=700
|
||||
|
||||
***
|
||||
|
||||
## Installing Git
|
||||
## Step 2. Update firmware on the Developer Board
|
||||
|
||||
You'll need Git installed on your computer to clone the firmware repository. If you don't have Git, install it by doing the following:
|
||||
|
||||
* **MacOS**
|
||||
|
||||
On MacOS, install the **Xcode Command Line Tools** package, which includes Git as one of the pre-installed command-line utilities, by running in the Terminal the following command:
|
||||
|
||||
```text
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
* **Linux**
|
||||
|
||||
On Linux, you can install Git using your package manager. For example, on Ubuntu, run in the Terminal the following command:
|
||||
|
||||
```text
|
||||
sudo apt install git
|
||||
```
|
||||
|
||||
For other distributions, refer to your package manager documentation.
|
||||
The Developer Board comes with stock firmware that may not include all the latest features and bug fixes. To ensure optimal performance, please update your board's firmware using the instructions in [Firmware update on Devboard](#dev_board_fw_update).
|
||||
|
||||
***
|
||||
|
||||
## Building the firmware
|
||||
## Step 3. Plug the Devboard into Flipper Zero {#dev_board_get_started_step-3}
|
||||
|
||||
First, clone the firmware repository:
|
||||
Once your Developer Board firmware is up to date, you can proceed to plug it into your Flipper Zero. Two important things to keep in mind:
|
||||
|
||||
```text
|
||||
git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git
|
||||
cd flipperzero-firmware
|
||||
```
|
||||
1. **Power off your Flipper Zero before plugging in the Developer Board.**
|
||||
|
||||
Then, run the **Flipper Build Tool** (FBT) to build the firmware:
|
||||
If you skip this step, you may corrupt the data stored on the microSD card. Connecting external modules with a large capacitive load may affect the microSD card's power supply since both the microSD card and external module are powered from the same 3.3 V power source inside Flipper Zero.
|
||||
|
||||
```text
|
||||
./fbt
|
||||
```
|
||||
2. **Make sure the Developer Board is inserted all the way in.**
|
||||
|
||||
If your Flipper Zero isn't in a silicone case, insert the module all the way in so there is no gap between your Flipper Zero and the Devboard. You may need to apply more force to insert it completely. After that, press and hold the **BACK** button to power on your Flipper Zero.
|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_external_module_without_case_CDN.jpg width=700
|
||||
|
||||
If your Flipper Zero is in a silicone case, insert the module all the way in so there is no gap in the middle between the silicone case and the module. After that, press and hold the **BACK** button to power on your Flipper Zero.
|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_external_module_with_case_CDN.jpg width=700
|
||||
|
||||
***
|
||||
|
||||
## Connecting the Developer Board
|
||||
## Step 4. Connect to a computer
|
||||
|
||||
The Developer Board can work in the **Wired** mode and two **Wireless** modes: **Wi-Fi access point (AP)** mode and **Wi-Fi client (STA)** mode. The Wired mode is the simplest to set up, but requires a USB Type-C cable. The Wireless modes are more complex to set up, but they allow you to debug your Flipper Zero wirelessly.
|
||||
Now, you can connect the Developer Board to your computer via USB or Wi-Fi, depending on your needs. We described both methods in separate documents:
|
||||
|
||||
> **NOTE:** Use the following credentials when connecting to the Developer Board in **Wi-Fi access point** mode:\n
|
||||
Name: **blackmagic**\n
|
||||
Password: **iamwitcher**
|
||||
|
||||
## Wired
|
||||
|
||||

|
||||
|
||||
To connect the Developer Board in **Wired** mode, do the following:
|
||||
|
||||
1. Cold-plug the Developer Board by turning off your Flipper Zero and connecting the Developer Board, and then turning it back on.
|
||||
|
||||
2. On your computer, open the **Terminal** and run the following:
|
||||
|
||||
* **MacOS**
|
||||
|
||||
```text
|
||||
ls /dev/cu.*
|
||||
```
|
||||
|
||||
* **Linux**
|
||||
|
||||
```text
|
||||
ls /dev/tty*
|
||||
```
|
||||
|
||||
Note the list of devices.
|
||||
|
||||
3. Connect the Developer Board to your computer via a USB-C cable.
|
||||
|
||||
4. Rerun the command. Two new devices have to appear: this is the Developer Board.
|
||||
|
||||
> **NOTE:** If the Developer Board doesn't appear in the list of devices, try using a different cable, USB port, or computer.
|
||||
>
|
||||
> **NOTE:** Flipper Zero logs can only be viewed when the Developer Board is connected via USB. The option to view logs over Wi-Fi will be added in future updates. For more information, visit [Reading logs via the Dev Board](https://docs.flipperzero.one/development/hardware/wifi-debugger-module/reading-logs).
|
||||
|
||||
## Wireless
|
||||
|
||||
### Wi-Fi access point (AP) mode
|
||||
|
||||

|
||||
|
||||
Out of the box, the Developer Board is configured to work as a **Wi-Fi access point**. This means it'll create its own Wi-Fi network to which you can connect. If your Developer Board doesn't create a Wi-Fi network, it is probably configured to work in **Wi-Fi client** mode. To reset your Developer Board back to **Wi-Fi access point** mode, press and hold the **BOOT** button for 10 seconds, then wait for the module to reboot.
|
||||
|
||||

|
||||
|
||||
To connect the Developer Board in **Wi-Fi access point** mode, do the following:
|
||||
|
||||
1. Cold-plug the Developer Board by turning off your Flipper Zero and connecting the Developer Board, and then turning it back on.
|
||||
|
||||
2. Open Wi-Fi settings on your client device (phone, laptop, or other).
|
||||
|
||||
3. Connect to the network:
|
||||
|
||||
* Name: **blackmagic**
|
||||
|
||||
* Password: **iamwitcher**
|
||||
|
||||
4. To configure the Developer Board, open a browser and go to `http://192.168.4.1`.
|
||||
|
||||
### Wi-Fi client (STA) mode
|
||||
|
||||

|
||||
|
||||
To connect the Developer Board in **Wi-Fi client** mode, you need to configure it to connect to your Wi-Fi network by doing the following:
|
||||
|
||||
1. Cold-plug the Developer Board by turning off your Flipper Zero and connecting the Developer Board, and then turning it back on.
|
||||
|
||||
2. Connect to the Developer Board in **Wi-Fi access point** mode.
|
||||
|
||||
3. In a browser, go to the configuration page on `http://192.168.4.1`.
|
||||
|
||||
4. Select the **STA** mode and enter your network's **SSID** (name) and **password**. For convenience, you can click the **+** button to see the list of nearby networks.
|
||||
|
||||
5. Save the configuration and reboot the Developer Board.
|
||||
|
||||

|
||||
|
||||
After rebooting, the Developer Board connects to your Wi-Fi network. You can connect to the device using the mDNS name **blackmagic.local** or the IP address it got from your router (you'll have to figure this out yourself, every router is different).
|
||||
|
||||
After connecting to your debugger via <http://blackmagic.local>, you can find its IP address in the **SYS** tab. You can also change the debugger's mode to **AP** or **STA** there.
|
||||
|
||||

|
||||
- **[Via USB cable](#dev_board_usb_connection)** for debugging in DAP Link or Black Magic mode, and reading logs.
|
||||
- [Via Wi-Fi](#dev_board_wifi_connection) for debugging in Black Magic mode.
|
||||
|
||||
***
|
||||
|
||||
## Debugging the firmware
|
||||
## Next steps
|
||||
|
||||
Open the **Terminal** in the **flipperzero-firmware** directory that you cloned earlier and run the following command:
|
||||
You are ready to debug now! To further explore what you can do with the Devboard, check out these pages:
|
||||
|
||||
```text
|
||||
./fbt flash
|
||||
```
|
||||
- [Debugging via the Devboard](#dev_board_debugging_guide)
|
||||
- [Devboard debug modes](#dev_board_debug_modes)
|
||||
- [Reading logs via the Devboard](#dev_board_reading_logs)
|
||||
|
||||
These guides should help you get started with your Devboard. If you have any questions or you want to share your experience, don't hesitate to join our community on [Reddit](https://www.reddit.com/r/flipperzero/) and [Discord](https://discord.com/invite/flipper), where we have a dedicated #wifi-devboard channel.
|
||||
|
||||
This will upload the firmware you've just built to your Flipper Zero via the Developer Board. After that, you can start debugging the firmware using the [GDB](https://www.gnu.org/software/gdb/) debugger. We recommend using **VSCode** with the recommended extensions, and we have pre-made configurations for it.
|
||||
|
||||
To debug in **VSCode**, do the following:
|
||||
|
||||
1. In VSCode, open the **flipperzero-firmware** directory.
|
||||
|
||||
2. You should see a notification about recommended extensions. Install them.
|
||||
|
||||
If there were no notifications, open the **Extensions** tab, enter `@recommended` in the search bar, and install the workspace recommendations.
|
||||
|
||||
3. In the **Terminal**, run the `./fbt vscode_dist` command. This will generate the VSCode configuration files needed for debugging.
|
||||
|
||||
4. In VSCode, open the **Run and Debug** tab and select **Attach FW (blackmagic)** from the dropdown menu.
|
||||
|
||||
5. If needed, flash your Flipper Zero with the `./fbt flash` command, then click the **Play** button in the debug sidebar to start the debugging session.
|
||||
|
||||
6. Note that starting a debug session halts the execution of the firmware, so you'll need to click the **Continue** button on the toolbar at the top of your VSCode window to continue execution.
|
||||
|
||||

|
||||
|
||||
To learn about debugging, visit the following pages:
|
||||
|
||||
* [Debugging with GDB](https://sourceware.org/gdb/current/onlinedocs/gdb.pdf)
|
||||
|
||||
* [Debugging in VS Code](https://code.visualstudio.com/docs/editor/debugging)
|
||||
|
@@ -8,9 +8,9 @@ The Developer Board allows you to read Flipper Zero logs via UART. Unlike readin
|
||||
|
||||
## Setting the log level
|
||||
|
||||
Depending on your needs, you can set the log level by going to **Main Menu → Settings → Log Level**. To learn more about logging levels, visit [Settings](https://docs.flipperzero.one/basics/settings#d5TAt).
|
||||
Depending on your needs, you can set the log level by going to **Main Menu → Settings → Log Level**. To learn more about logging levels, visit [Settings](https://docs.flipper.net/basics/settings#d5TAt).
|
||||
|
||||

|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_log_level.jpg "You can manually set the preferred log level" width=700
|
||||
|
||||
***
|
||||
|
||||
@@ -18,9 +18,9 @@ Depending on your needs, you can set the log level by going to **Main Menu → S
|
||||
|
||||
Depending on your operating system, you need to install an additional application on your computer to read logs via the Developer Board:
|
||||
|
||||
### MacOS
|
||||
### macOS
|
||||
|
||||
On MacOS, you need to install the **minicom** communication program by doing the following:
|
||||
On macOS, you need to install the **minicom** communication program by doing the following:
|
||||
|
||||
1. [Install Homebrew](https://brew.sh/) by running the following command in the Terminal:
|
||||
|
||||
@@ -47,7 +47,7 @@ After installation of minicom on your macOS computer, you can connect to the Dev
|
||||
Note the list of devices.
|
||||
|
||||
3. Connect the developer board to your computer using a USB Type-C cable.
|
||||

|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_Wi-Fi_developer_board_wired.png width=700
|
||||
|
||||
4. Rerun the command. Two new devices have to appear: this is the Developer Board.
|
||||
|
||||
@@ -100,7 +100,7 @@ After installation of minicom on your Linux computer, you can connect to the Dev
|
||||
Note the list of devices.
|
||||
|
||||
3. Connect the developer board to your computer using a USB Type-C cable.
|
||||

|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_Wi-Fi_developer_board_wired.png width=700
|
||||
|
||||
4. Rerun the command. Two new devices have to appear: this is the Developer Board.
|
||||
|
||||
@@ -143,17 +143,17 @@ On Windows, do the following:
|
||||
2. Cold-plug the Developer Board into your Flipper Zero by turning off the Flipper Zero, connecting the developer board, and then turning it back on.
|
||||
|
||||
3. Connect the developer board to your computer using a USB Type-C cable.
|
||||

|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_Wi-Fi_developer_board_wired.png width=700
|
||||
|
||||
4. Find the serial port that the developer board is connected to by going to **Device Manager → Ports (COM & LPT)** and looking for a new port that appears when you connect the Wi-Fi developer board.
|
||||

|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_Wi-Fi_devboard_Device_Manager.png width=700
|
||||
|
||||
5. Run the PuTTY application and select **Serial** as the connection type.
|
||||
|
||||
6. Enter the port number you found in the previous step into the **Serial line** field.
|
||||
|
||||
7. Set the **Speed** parameter to **230400** and click **Open**.
|
||||

|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_Wi-Fi_devboard_PuTTy.jpg width=700
|
||||
|
||||
8. View logs of your Flipper Zero in the PuTTY terminal window.
|
||||
|
||||
|
22
documentation/devboard/USB connection to the Devboard.md
Normal file
22
documentation/devboard/USB connection to the Devboard.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# USB connection to the Devboard {#dev_board_usb_connection}
|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_WiFi_devboard_USB_connection_CDN.jpg width=700
|
||||
|
||||
To connect to the Developer Board via USB, do the following:
|
||||
|
||||
1. If the Devboard isn't connected to your Flipper Zero, turn off your Flipper Zero and connect the Developer Board to it. Then, turn your Flipper Zero back on.
|
||||
|
||||
2. On your computer, check the list of serial devices.
|
||||
|
||||
- **macOS:** On your computer, run `ls /dev/cu.*` in the Terminal.
|
||||
|
||||
- **Linux:** On your computer, run `ls /dev/tty*` in the Terminal.
|
||||
|
||||
- **Windows:** Go to **Device Manager** and expand the **Ports (COM & LPT)** section.
|
||||
|
||||
3. Connect the Devboard to your computer via a USB-C cable.
|
||||
|
||||
4. Repeat **Step 2**. Two new devices will appear — this is the Developer Board.
|
||||
|
||||
> [!warning]
|
||||
> If the Developer Board doesn't appear in the list of devices, try using a different cable, USB port, or computer.
|
60
documentation/devboard/Wi-Fi connection to the Devboard.md
Normal file
60
documentation/devboard/Wi-Fi connection to the Devboard.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Wi-Fi connection to the Devboard {#dev_board_wifi_connection}
|
||||
|
||||
You can connect to the Developer Board wirelessly in two ways:
|
||||
|
||||
- **Wi-Fi access point mode (default):** The Devboard creates its own Wi-Fi network, which you can connect to in order to access its web interface and debug via Wi-Fi. The downside is that you will need to disconnect from your current Wi-Fi network, resulting in a loss of internet connection.
|
||||
|
||||
- **Wi-Fi client mode:** You can connect to the Devboard through an existing Wi-Fi network, allowing you to access the Devboard web interface and debug via Wi-Fi without losing your internet connection.
|
||||
|
||||
Let's go over both of these modes below.
|
||||
|
||||
***
|
||||
|
||||
## Wi-Fi access point (AP) mode {#wifi-access-point}
|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_WiFi_devboard_Access_Point_CDN.jpg width=700
|
||||
|
||||
Out of the box, the Developer Board is configured to work as a Wi-Fi access point. To connect the Developer Board in this mode, do the following:
|
||||
|
||||
1. Plug the Wi-Fi Devboard into your Flipper Zero by turning off your Flipper Zero and connecting the Developer Board, and then turning it back on.
|
||||
|
||||
2. Open Wi-Fi settings on your client device (phone, laptop, or other).
|
||||
|
||||
3. Connect to the network:
|
||||
|
||||
Name: `blackmagic`
|
||||
Password: `iamwitcher`
|
||||
|
||||
If your computer fails to find the **blackmagic** network, read the [troubleshooting section](#wifi-access-point_troubleshooting) below.
|
||||
|
||||
4. To access the Devboard's web interface, open a browser and go to <http://192.168.4.1> or <http://blackmagic.local>.
|
||||
|
||||
### If your computer fails to find the black magic network {#wifi-access-point_troubleshooting}
|
||||
|
||||
- Reset Wi-Fi connection on your computer.
|
||||
|
||||
- The Developer Board is probably configured to work in Wi-Fi client mode. → Reset your Developer Board settings to default by pressing and holding the **BOOT** button for **10 seconds**, then wait for the Devboard to reboot. After the reset, the Devboard will work in Wi-Fi access point mode.
|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_Wi-Fi_devboard_reboot.jpg width=700
|
||||
|
||||
***
|
||||
|
||||
## Wi-Fi client (STA) mode {#wifi-client-mode}
|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_WiFi_devboard_STA_CDN.jpg width=700
|
||||
|
||||
To connect the Developer Board in **Wi-Fi client** mode, you need to configure it to connect to your Wi-Fi network by doing the following:
|
||||
|
||||
1. Plug the Wi-Fi Devboard into your Flipper Zero by turning off your Flipper Zero and connecting the Developer Board, and then turning the device back on.
|
||||
|
||||
2. Connect to the Developer Board in [Wi-Fi access point](#wifi-access-point) mode.
|
||||
|
||||
3. In a browser, go to the Devboard's web interface at <http://192.168.4.1> or <http://blackmagic.local>.
|
||||
|
||||
4. Select the **STA** mode and enter your network's **SSID** (name) and **password**. For convenience, you can click the **+** button to see the list of nearby 2.4 GHz networks (5 GHz networks aren't supported).
|
||||
|
||||
5. Save the configuration and reboot the Developer Board.
|
||||
|
||||
\image html https://cdn.flipperzero.one/Flipper_Zero_WiFi_devboard_connect_to_WiFi_CDN.jpg width=700
|
||||
|
||||
6. Now, you can access the Devboard's web interface at [http://blackmagic.local](https://blackmagic.local) via the existing Wi-Fi network without losing connection to the internet.
|
Reference in New Issue
Block a user