CN115827447A - ESP development device and system - Google Patents

ESP development device and system Download PDF

Info

Publication number
CN115827447A
CN115827447A CN202211512186.XA CN202211512186A CN115827447A CN 115827447 A CN115827447 A CN 115827447A CN 202211512186 A CN202211512186 A CN 202211512186A CN 115827447 A CN115827447 A CN 115827447A
Authority
CN
China
Prior art keywords
esp
peripheral
development device
burning
development
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211512186.XA
Other languages
Chinese (zh)
Inventor
陈锦彬
刘豪
穆允翔
李辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Qiming Cloud Technology Co ltd
Original Assignee
Shenzhen Qiming Cloud Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Qiming Cloud Technology Co ltd filed Critical Shenzhen Qiming Cloud Technology Co ltd
Priority to CN202211512186.XA priority Critical patent/CN115827447A/en
Publication of CN115827447A publication Critical patent/CN115827447A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of development and testing, in particular to an ESP (electronic stability program) development device and an ESP development system, wherein the ESP development device comprises a peripheral and a control module; the peripheral is connected with the control module, the peripheral comprises a connection peripheral, a storage peripheral and an interaction peripheral, the connection peripheral comprises a first connection peripheral used for connecting target equipment and a second connection peripheral used for connecting an upper computer, the storage peripheral is used for storing data, and the interaction peripheral is used for connecting the interaction module; the control module comprises an interactive control unit, a universal file unit and a USB control unit, wherein the USB control unit is used for a USB bridge serial port, a USB bridge JTAG and a USB MSC. The ESP development device provided by the invention can realize online or offline burning, integrates JTAG, can realize breakpoint setting, single step debugging, pause, continuous operation and the like, can check and modify a memory, check a stack, a thread and the like, has good interactive design, and can provide large-capacity storage.

Description

ESP development device and system
Technical Field
The invention relates to the technical field of development and testing, in particular to an ESP development device and system.
Background
In embedded development, common MCU debugging and burning modes include serial port, JTAG, SWD, or custom interface and protocol. The serial port is generally used for Log information output and display in debugging, and is often required to be matched with one of the following modes for debugging.
The ESP32 supports two debugging and burning modes of serial port and JTAG, because the description or tutorial related to the JTAG debugging on the ESP32 is not many and complicated at the beginning, it is necessary to know and learn the debugging mode of configuration and using OpenOCD in cooperation with GDB, and the ESP Prog, which is the JTAG debugging tool given by the official, is expensive, and it is not much to know and use the debugging mode in practice. The development of the common ESP32 is basically performed around a serial port, and burning and Log information checking are performed through the serial port to debug.
However, this development has two significant disadvantages: one is that the transmission speed is slow; the other is that the debugging mode for checking Log information has great limitation, cannot be suspended at a specified position, can only be operated all the time, is difficult to locate the position of the currently operated program, is difficult to check and modify data of a CPU, a memory, a register and the like, and is not beneficial to development and debugging. Therefore, when a problem is encountered, log output information is often increased at a plurality of positions, the problem can be reproduced after a plurality of restarts, the reason is determined, and even a great amount of time is sometimes spent, the reason of the problem cannot be determined.
Disclosure of Invention
In view of the above, it is necessary to provide an ESP development device and system.
The embodiment of the invention is realized in such a way that the ESP development device comprises a peripheral and a control module;
the peripheral is connected with the control module, the peripheral comprises a connection peripheral, a storage peripheral and an interaction peripheral, the connection peripheral comprises a first connection peripheral used for connecting target equipment and a second connection peripheral used for connecting an upper computer, the storage peripheral is used for storing data, and the interaction peripheral is used for connecting the interaction module;
the control module comprises an interactive control unit, a universal file unit and a USB control unit, wherein the USB control unit is used for a USB bridge serial port, a USB bridge JTAG and a USB MSC.
In one embodiment, the present invention provides an ESP development system comprising:
an ESP development device according to the present invention;
the upper computer is connected with the ESP development device through a second connection peripheral in a wired or wireless mode and is used for transmitting firmware to the ESP development device and/or controlling starting and stopping of burning;
and the target equipment is provided with one or more target equipment, and the target equipment is connected with the ESP development device through a first connection peripheral.
The ESP development device provided by the invention can realize online or offline burning, integrates JTAG, can realize breakpoint setting, single step debugging, pause, continuous operation and the like, can check and change a memory, check stacks, threads and the like, has good interactive design, can provide large-capacity storage, can integrate some practical functions such as an I2C address scanning tool and the like, is easy to expand in function, can reuse current pins due to the characteristics of an IO Matrix of the ESP32, and can easily add other functions and update and upgrade in the follow-up process due to the characteristics of the ESP32 including WIFI and USB.
Drawings
FIG. 1 is a block diagram of an ESP development device provided in one embodiment;
FIG. 2 is a block diagram of the serial port connection of an ESP development system in one embodiment;
FIG. 3 is a block diagram of an ESP development system JTAG connection in one embodiment;
fig. 4 is a schematic diagram of an ESP development system connecting single or multiple target devices through JTAG in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms unless otherwise specified. These terms are only used to distinguish one element from another. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script, without departing from the scope of the present disclosure.
As shown in fig. 1, in one embodiment, an ESP development device is proposed, which comprises peripherals and a control module;
the peripheral is connected with the control module, the peripheral comprises a connection peripheral, a storage peripheral and an interaction peripheral, the connection peripheral comprises a first connection peripheral used for connecting target equipment and a second connection peripheral used for connecting an upper computer, the storage peripheral is used for storing data, and the interaction peripheral is used for connecting the interaction module;
the control module comprises an interactive control unit, a universal file unit and a USB control unit, wherein the USB control unit is used for a USB bridge serial port, a USB bridge JTAG and a USB MSC.
In the present exemplary embodiment, the connection peripheral is provided as an interface, via which the first connection peripheral is connected to a target device, here in particular an ESP32 target board. The second connection peripheral includes but is not limited to a wired USB, a wireless WIFI or bluetooth, and the like.
In this embodiment, the storage peripheral includes an SD card or Flash.
As an alternative embodiment of the present invention, the first connection peripheral includes one or more of a serial port (UART), JTAG, and I2C.
In this embodiment, the first connection peripherals preferably include the above three types, and different first connection peripherals have different functions, so that multiple operation modes are provided for the burning of the target device.
As an alternative embodiment of the present invention, the second connected peripheral includes a wired connected peripheral and a wireless connected peripheral.
In this embodiment, the wired connection can ensure the stability of connection and data transmission, and the wireless connection can make the connection more convenient.
As an alternative embodiment of the invention, the storage peripheral is connected to the control module via an SD interface or a serial peripheral interface.
In this embodiment, the storage peripheral is connected through the interface, so that replacement, plugging and unplugging of the storage peripheral can be realized, and downloading of firmware is facilitated.
As an alternative embodiment of the present invention, the interactive peripheral includes a dial switch and a display screen.
In the embodiment, different working modes or different functions can be selected and set by setting the dial switch, and the operation of the ESP development device can be realized by using the display screen matched with the dial switch.
As an alternative embodiment of the invention, the control module adopts an ESP IDF framework and runs on an embedded real-time system FreeRTOS.
As an optional embodiment of the present invention, the interaction control unit is a lightweight embedded graphics library.
In this embodiment, the lightweight embedded graphics library is represented in FIG. 1 as a GUI: LVGL.
As an alternative embodiment of the present invention, the USB control unit is included in a protocol stack that implements USB bridging.
In this embodiment, the USB control unit includes TinyUSB for implementing a USB protocol, and the present invention mainly uses CDC (Communication Device Class) in a Device protocol stack to implement a USB bridge serial port, and MSC (Mass Storage Class) to implement that the Storage Device (SD, flash) can be recognized as a Mass Storage Device (U-disk) by the host and can be normally accessed, and the like.
The embodiment of the present invention further provides an ESP development system, which includes:
an ESP development device according to any one or more of the embodiments of the present invention;
the upper computer is connected with the ESP development device through a second connection peripheral in a wired or wireless mode and is used for transmitting firmware to the ESP development device and/or controlling starting and stopping of burning;
the ESP developing device comprises one or more target devices, and the target devices are connected with the ESP developing device through a first connecting peripheral.
In this embodiment, the upper computer may adopt a computer or similar equipment, which belongs to an optional specific implementation manner, and this is not limited in the embodiment of the present invention; in this embodiment, one or more target devices may be provided, and serial-parallel communication or parallel communication may be employed between the ESP development apparatus and the plurality of target devices.
As an optional embodiment of the invention, the ESP development device and the target equipment adopt serial port communication or JTAG communication;
when serial port communication is adopted, the ESP development device is connected with an upper computer in a wired or wireless mode to realize online burning or offline burning, and multiple pieces of sequential burning or multiple pieces of parallel burning are adopted between the ESP development device and target equipment;
when JTAG communication is adopted, the ESP development device is connected with an upper computer in a wired or wireless mode to realize online burning, offline burning, wired debugging and wireless debugging, and multiple pieces of sequential burning or multiple pieces of parallel burning are adopted between the ESP development device and target equipment.
In this embodiment, fig. 2 shows a burning framework diagram under serial port (UART) communication. In this mode, burning and log information checking can be performed through the serial port.
When burning is carried out through the serial port, for a high layer, two modes of online burning and offline burning are available. The online burning comprises wired online burning and wireless online burning, the wired online burning is connected with target equipment through a serial port, the other end of the wired online burning is connected with an upper computer through a USB, and wired online synchronous burning can be carried out; the wireless online burning is connected with the target device through a serial port at one end, the other end of the wireless online burning is connected into the same local area network where the upper computer is located through Bluetooth or WIFI to be communicated with the upper computer, and wireless online synchronous burning can be conducted. After the offline burning transmits the files related to the burning to an ESP development device in a wired or wireless mode for storage, a corresponding burning mode can be selected for offline burning: manually triggering burning (default), selecting corresponding firmware, burning configuration and the like through interaction with an ESP development device, and then selecting burning; and automatically triggering burning, namely, firstly, interacting with an ESP development device, configuring a burning mode into an automatic triggering mode, then loading the configuration stored for the next time or resetting burning related configuration (such as selecting which firmware, burning configuration and the like), then enabling the automatic triggering burning, namely, waiting for the arrival of a triggering condition, and then automatically triggering the burning. The triggering mode comprises the following steps: detecting the level change on RX, TX, DTR and RTS lines; controlling the flow control line to send a burning or resetting time sequence and identifying data on the data line; or receiving a software trigger condition (such as receiving an instruction transmitted by a wired or wireless mode or finishing updating a firmware file).
For the bottom layer, single serial port burning and multi-serial port burning are available. The single serial port programming is ordinary single serial port programming, data lines are Tx and Rx, and flow control lines RTS (EN) and DTR (Boot) are added. The multi-serial-port burning comprises multi-chip-selection sequential burning and parallel burning, when the multi-chip-selection sequential burning is carried out, the multi-target equipment uses the same serial-port data line (Tx, rx) and DTR flow control line, and finally, a plurality of RTS signal lines are respectively and independently connected with each target equipment, so that the chip selection effect is achieved. Therefore, each device can be partially or completely burned in sequence. When in parallel burning, a plurality of devices use the same serial port data line (Tx, rx) and flow control line (DTR, RTS), each device can be independently read, written and controlled through software, information of each device is firstly obtained, then the flow control line is controlled to simultaneously enter a downloading mode, firmware data is downloaded in parallel, integrity is respectively checked and corresponding processing is carried out after downloading is finished, and the parallel burning of the plurality of devices on the same bus can be completed.
When the log information is checked by the serial port, because the log information is checked and the serial port burning is essentially data transmission on the serial port bus, the log information is checked by the serial port almost as much as the serial port burning mode, and the difference is only in that:
(1) the DTR and RTS flow control lines do not send a downloading time sequence, and only send corresponding signals (such as resetting or manual downloading) according to the control of serial port software on the upper computer on the flow control lines;
(2) displaying serial port output information on a screen of an ESP development device in an offline mode;
(3) the method does not support checking the log information of multiple devices on the single serial bus, namely only supporting checking the log information of single serial device.
In this embodiment, fig. 3 shows a burn framework under the JTAG framework, and fig. 4 shows a schematic diagram of a target device or devices with JTAG connection.
And when online debugging is carried out, wired debugging and wireless debugging are included. And the wired debugging uses a USB to connect a JTAG adapter, one end of the JTAG adapter is connected with target equipment through the JTAG, the other end of the JTAG adapter is connected with an upper computer through the USB, and then wired online debugging can be carried out through openOCD. When in wireless debugging, one end is connected with target equipment through JTAG, the other end is connected with an upper computer through WIFI or Bluetooth, and then wireless online debugging can be carried out through openOCD, and the realization method comprises two methods at present:
the openOCD runs on an upper computer, software for simulating JTAG and network bridging needs to run, the software simulates JTAG equipment to communicate with the openOCD, a network part (WIFI or Bluetooth) is responsible for sniffing and discovering an ESP development device, and then data and instructions between the openOCD of the upper computer and hardware JTAG on the ESP development device are forwarded, and reference numerals (1) on the figure 2 are shown;
the openOCD is also operated on the upper computer, but the openOCD needs to re-edit, configure and compile source codes, the openOCD is mainly modified to realize the JTAG protocol interface part, and communication with a JTAG adapter (ESP development device) by using USB is changed into communication with a JTAG adapter (ESP development device) by using a wireless communication mode of WIFI or Bluetooth, and reference numeral (2) on the figure 2 is shown.
When burning, the online JTAG burning method is basically consistent with the JTAG (online) debugging; the offline JTAG burning only needs one end of the ESP development device to be connected with target equipment through JTAG, then interacts with the ESP development device through a screen and a coder key, selects burning firmware, burning configuration, burning modes and the like, and then carries out corresponding burning operation.
In an embodiment of the present invention, in both the burning framework under serial port (UART) communication shown in fig. 2 and the JTAG communication burning framework shown in fig. 3, burning related files (firmware, burning configuration files, etc.) can be transmitted to the ESP development devices (the present tool shown in fig. 1 to 4) through the PC, and also the burning related files can be transmitted simultaneously or in a time-sharing manner and in a mixed manner (one-to-one, one-to-many, many-to-many, etc.) between the ESP development devices through a wired (USB, SPI, IIC, etc.) or wireless (WIFI, bluetooth) communication manner, so that downloading of the burning related files between the ESP development devices can be accelerated without downloading the burning related files to each development device one by one through the PC. The triggering of data transmission between ESP development devices may be the same as the triggering process of downloading firmware onto a target device, and embodiments of the present invention are not particularly limited in this respect. Specifically, the method comprises the following steps: the ESP development devices are provided with a plurality of groups, each group of ESP development devices is provided with a plurality of secondary development devices, each group of ESP development devices comprises a main development device and a plurality of secondary development devices, each main development device is connected with an upper computer, each secondary development device is connected with the main development device in the group, and the main development devices in different groups are connected with each other; when the upper computer issues the files, the same data is transmitted to a plurality of main development devices by the maximum synchronous transmission number, and the main development devices receiving the transmission files transmit the data to the connected main development devices which do not receive the transmission files while receiving the data; after any main development device receives the file, the received file is synchronously transmitted to all secondary development devices in the group.
It should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in various embodiments may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An ESP development device is characterized by comprising a peripheral and a control module;
the peripheral is connected with the control module, the peripheral comprises a connection peripheral, a storage peripheral and an interaction peripheral, the connection peripheral comprises a first connection peripheral used for connecting target equipment and a second connection peripheral used for connecting an upper computer, the storage peripheral is used for storing data, and the interaction peripheral is used for connecting the interaction module;
the control module comprises an interactive control unit, a universal file unit and a USB control unit, wherein the USB control unit is used for a USB bridge serial port, a USB bridge JTAG and a USB MSC.
2. The ESP development device of claim 1, wherein the first connection peripheral comprises one or more of a serial port, JTAG, and I2C.
3. The ESP development device according to claim 1, characterized in that the storage peripheral is connected to the control module via an SD interface or a serial peripheral interface.
4. The ESP development device of claim 1, wherein the storage peripheral comprises one or more of an SD interface and a serial peripheral interface.
5. The ESP development device of claim 1, wherein said interactive peripherals comprise dial switches and a display screen.
6. The ESP development device of claim 1, wherein said control module employs an ESP IDF framework running on top of an embedded real-time system FreeRTOS.
7. The ESP development device according to claim 1, wherein the interactive control unit is a lightweight embedded graphics library; the USB control unit is included in a protocol stack for implementing USB bridging.
8. An ESP development system, comprising:
an ESP development device according to any one of claims 1-7;
the upper computer is connected with the ESP development device through a second connection peripheral in a wired or wireless mode and is used for transmitting firmware to the ESP development device and/or controlling starting and stopping of burning;
the ESP developing device comprises one or more target devices, and the target devices are connected with the ESP developing device through a first connecting peripheral.
9. The ESP development system according to claim 8,
serial port communication or JTAG communication is adopted between the ESP development device and target equipment;
when serial port communication is adopted, the ESP development device is connected with an upper computer in a wired or wireless mode to realize online burning or offline burning, and multiple pieces of sequential burning or multiple pieces of parallel burning are adopted between the ESP development device and target equipment;
when JTAG communication is adopted, the ESP development device is connected with an upper computer in a wired or wireless mode to realize online burning, offline burning, wired debugging and wireless debugging, and multiple pieces of sequential burning or multiple pieces of parallel burning are adopted between the ESP development device and target equipment.
10. The ESP development system according to claim 9, wherein the ESP development devices are provided with a plurality of groups, each group of ESP development devices is provided with a plurality of groups, each group of ESP development devices comprises a main development device and a plurality of secondary development devices, each main development device is connected with the upper computer, each secondary development device is connected with the main development device in the group, and the main development devices in different groups are connected with each other;
when the upper computer issues the files, the same data is transmitted to a plurality of main development devices by the maximum synchronous transmission number, and the main development devices receiving the transmission files transmit the data to the connected main development devices which do not receive the transmission files while receiving the data;
and after any main development device receives the file, synchronously transmitting the received file to all secondary development devices in the group.
CN202211512186.XA 2022-11-29 2022-11-29 ESP development device and system Pending CN115827447A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211512186.XA CN115827447A (en) 2022-11-29 2022-11-29 ESP development device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211512186.XA CN115827447A (en) 2022-11-29 2022-11-29 ESP development device and system

Publications (1)

Publication Number Publication Date
CN115827447A true CN115827447A (en) 2023-03-21

Family

ID=85532703

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211512186.XA Pending CN115827447A (en) 2022-11-29 2022-11-29 ESP development device and system

Country Status (1)

Country Link
CN (1) CN115827447A (en)

Similar Documents

Publication Publication Date Title
CN101329385B (en) Regulation test system and method of on-chip system as well as on-chip system
US20120198292A1 (en) Test apparatus and test method
CN111372232B (en) Method and system for first connection pairing of electric energy meter and Bluetooth circuit breaker
CN110597675B (en) Chip testing method, device, storage medium and burner
EP2816427B1 (en) Plc simulation system, plc simulator, recording medium, and simulation method
CN109656756B (en) Multi-core CPU board debugging method and device and mobile storage medium
CN115312110A (en) Chip verification system and verification method thereof
CN112216340A (en) Hard disk test method and device, storage medium and electronic equipment
CN112989740B (en) Simulation method and device, computer equipment and storage medium
US7484156B2 (en) Apparatus and method for testing PS/2 interface
CN102323886B (en) Method for writing special information into terminal, device and system
CN115827447A (en) ESP development device and system
CN116560985B (en) Chip equipment test control method, upper computer, equipment and medium
CN113032200A (en) Micro control unit processing method and related equipment
CN112799887A (en) Chip FT test system and test method
CN104678292A (en) Test method and device for CPLD (Complex Programmable Logic Device)
CN112182586B (en) MCU read-write protection test method, device and system
US20040177344A1 (en) Debugging method for the keyboard controller code
CN112885403B (en) Function test method, device and equipment of Flash controller
CN112445670B (en) eMMC test method and device
WO2019080003A1 (en) Method for testing a chip, test platform, and test system
CN108170615A (en) A kind of driving framework of the virtual instrument of signal-oriented
TW201807583A (en) Automatic control system and the instrument automatically search method using the same
US20020026301A1 (en) Automatic evaluation method, automatic evaluation system, and storage medium storing automatic evaluation program
CN115359744B (en) Multi-channel MIPI module point screen method, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination