Analog debugging method, programmable single-chip microcomputer, device, equipment and medium

By using simulation debugging methods and utilizing programmable microcontrollers to simulate the communication protocols of various communication devices, the problem of inconsistent pace caused by lack of equipment in BMC development was solved, development efficiency was improved, and the project was completed on time.

CN115391125BActive Publication Date: 2026-06-26INSPUR BUSINESS MACHINE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR BUSINESS MACHINE CO LTD
Filing Date
2022-08-26
Publication Date
2026-06-26

Smart Images

  • Figure CN115391125B_ABST
    Figure CN115391125B_ABST
Patent Text Reader

Abstract

The application discloses a simulation debugging method, a programmable single-chip microcomputer, a device, equipment and a medium, is applied to the programmable single-chip microcomputer, relates to the peripheral equipment technical field, wherein the programmable single-chip microcomputer includes a power supply interface, a dial switch, a device simulator and a baseboard management controller connector, and the method comprises the following steps: power supply and target firmware download are carried out through the power supply interface; the device simulator is switched through the dial switch to simulate a plurality of communication devices corresponding to the target firmware; the communication protocol of the communication device simulated through the device simulator is acquired through the baseboard management controller connector, and communication is carried out with the baseboard management controller according to the communication protocol, so that the monitoring management of the baseboard management controller is simulated. Through the technical scheme of the application, the development efficiency can be improved, the problem of insufficient resources in the early stage is solved, the development and testing are not disconnected, the problem is found early, and the smooth progress of the project is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of peripheral equipment technology, and in particular to a simulation debugging method, a programmable microcontroller, a device, equipment, and a medium. Background Technology

[0002] The rapid development of the internet has also brought prosperity to the server market. The BMC (Baseboard Management Controller) plays a crucial role in monitoring and managing servers. In the early stages of BMC firmware development, resources are limited, often consisting of only a motherboard with a lack of peripherals. Development often involves writing code first, without physical access to many peripherals, hindering troubleshooting. Debugging only begins on physical devices once the necessary resources arrive, often resulting in tight deadlines and a long gap between coding and debugging, hindering rapid problem resolution. Furthermore, some devices are expensive, such as the latest GPUs (Graphics Processing Units). A company might only have one GPU, with some needing performance testing, others compatibility testing, and still others stability testing, making coordination extremely difficult. The main reasons are: lack of equipment, difficulty in coordinating equipment availability, insufficient code development and testing, project delays, and difficulty ensuring everyone has access to a complete set of equipment when developing with multiple developers.

[0003] In summary, how to resolve the issue of inconsistent development and testing pace caused by lack of or insufficient equipment during the development of BMC, which slows down the development progress and leads to project delays, is a problem that needs to be solved. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a simulation debugging method, a programmable microcontroller, a device, equipment, and medium, which can solve the problem of inconsistent development and testing paces caused by the lack of or absence of equipment during the development of BMCs, thus slowing down the development progress and causing project delays. The specific solution is as follows:

[0005] In a first aspect, this application discloses a simulation debugging method applied to a programmable microcontroller, wherein the programmable microcontroller includes a power supply interface, a DIP switch, a device simulator, and a baseboard management controller connector, wherein the method includes:

[0006] Power is supplied through the power interface and the target firmware is downloaded.

[0007] The device simulator can be switched using the DIP switch to simulate various communication devices corresponding to the target firmware;

[0008] The communication protocol of the communication device simulated by the device simulator is obtained through the board management controller connector, and communication is performed with the board management controller according to the communication protocol to simulate monitoring and management of the board management controller.

[0009] Optionally, the step of supplying power and downloading the target firmware through the power supply interface includes:

[0010] Powered via USB interface, the target firmware is downloaded according to the different communication protocols and specifications corresponding to different communication devices.

[0011] Optionally, the step of switching the device simulator via the DIP switch to simulate multiple communication devices corresponding to the target firmware includes:

[0012] The device simulator is switched using the DIP switch to simulate a temperature sensor;

[0013] Alternatively, the device simulator can be switched via the DIP switch to simulate an NVMe hard drive;

[0014] Alternatively, the device simulator can be switched via the DIP switch to simulate an electrically erasable programmable read-only memory;

[0015] Alternatively, the device simulator can be switched via the DIP switch to simulate a GPU card;

[0016] Alternatively, the device simulator can be switched via the DIP switch to simulate a network card;

[0017] Alternatively, the device simulator can be switched via the DIP switch to simulate voltage.

[0018] Optionally, acquiring the communication protocol of the communication device simulated by the device simulator via the baseboard management controller connector includes:

[0019] The system management bus protocol of the communication device, simulated by the device simulator, is obtained through the baseboard management controller connector;

[0020] Alternatively, the field-replaceable unit protocol of the communication device, simulated by the device simulator, can be obtained through the baseboard management controller connector;

[0021] Alternatively, the MCTP over I2C protocol of the communication device, simulated by the device simulator, can be obtained through the baseboard management controller connector;

[0022] Alternatively, the protocol read from the general I2C device register, simulated by the device simulator, can be obtained through the baseboard management controller connector.

[0023] Optionally, communicating with the baseboard management controller according to the communication protocol includes:

[0024] The device is connected to the motherboard of the baseboard management controller via an I2C cable to communicate with the baseboard management controller according to the communication protocol.

[0025] Optionally, the step of switching the device simulator via the DIP switch to simulate multiple communication devices corresponding to the target firmware includes:

[0026] The device simulator can be switched by using the DIP switch to change the slave addr of the programmable microcontroller and simulate various communication devices corresponding to the target firmware.

[0027] Secondly, this application discloses a programmable microcontroller, including a power supply interface, a DIP switch, a device simulator, and a baseboard management controller connector, wherein...

[0028] The power supply interface is used to connect to the server for power supply and to download the target firmware;

[0029] The DIP switch is used to switch the device simulator to simulate various communication devices corresponding to the target firmware;

[0030] The device simulator is used to simulate various communication devices corresponding to the target firmware;

[0031] The baseboard management controller connector is used to acquire the communication protocol of the communication device simulated by the device simulator, and to communicate with the baseboard management controller according to the communication protocol to simulate monitoring and management of the baseboard management controller.

[0032] Thirdly, this application discloses a simulation debugging device applied to a programmable microcontroller, wherein the programmable microcontroller includes a power supply interface, a DIP switch, a device simulator, and a baseboard management controller connector, wherein the device includes:

[0033] The power supply module is used to supply power and download the target firmware through the power supply interface;

[0034] A communication device simulation module is used to switch the device simulator via the DIP switch to simulate various communication devices corresponding to the target firmware;

[0035] The communication module is used to acquire the communication protocol of the communication device simulated by the device simulator through the baseboard management controller connector, and to communicate with the baseboard management controller according to the communication protocol to simulate monitoring and management of the baseboard management controller.

[0036] Fourthly, this application discloses an electronic device, which includes a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the simulation debugging method as described above.

[0037] Fifthly, this application discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the simulation debugging method as described above.

[0038] This application utilizes a programmable microcontroller, which includes a power supply interface, a DIP switch, a device simulator, and a baseboard management controller connector. The method first supplies power and downloads the target firmware through the power supply interface; then, the device simulator is switched via the DIP switch to simulate various communication devices corresponding to the target firmware; finally, the communication protocol of the communication device simulated by the device simulator is obtained through the baseboard management controller connector, and communication is established with the baseboard management controller according to the communication protocol to simulate monitoring and management of the baseboard management controller. Therefore, this application, based on a programmable microcontroller, provides a realistic physical device capable of simulating various communication devices for monitoring and management of baseboard management controllers. This solves the problem of inconsistent development and testing paces caused by the lack of or absence of equipment during baseboard management controller development, which slows down development progress and leads to project delays. Furthermore, the one-click switching of the device simulator via the DIP switch does not affect the compatibility of the device between different projects, improving development efficiency. This ensures that the baseboard management controller has physical devices available at any time during the development process, and that multiple devices and configurations are always available. This allows for thorough testing in the early stages, and the earlier problems are discovered, the more likely project delays can be avoided. It also solves the problem of insufficient resources in the early stages, ensures that development and testing are not disconnected, and guarantees the smooth progress of the project. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0040] Figure 1This is a flowchart of a simulation debugging method disclosed in this application;

[0041] Figure 2 This is a schematic diagram of the structure of a programmable microcontroller disclosed in this application;

[0042] Figure 3 This is a schematic diagram of the structure of a specific programmable microcontroller disclosed in this application;

[0043] Figure 4 This is a schematic diagram of the structure of a simulation debugging device disclosed in this application;

[0044] Figure 5 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] Currently, in the early stages of server BMC firmware development, the R&D team has limited resources. Therefore, during development, they can only write code first. Many peripheral devices do not have actual equipment, making it impossible to troubleshoot problems in the early stages. This leads to a mismatch between development and testing, which slows down the development progress and causes project delays.

[0047] To address this issue, this application provides a simulation debugging solution that can resolve the problem of inconsistent development and testing paces caused by the lack of or absence of equipment during the development of BMC, which slows down the development progress and leads to project delays.

[0048] This invention discloses a simulation debugging method, see [link to relevant documentation]. Figure 1 As shown, the method is applied to a programmable microcontroller, which includes a power supply interface, a DIP switch, a device simulator, and a baseboard management controller connector. The method includes:

[0049] Step S11: Power is supplied through the power supply interface and the target firmware is downloaded.

[0050] This application provides a realistic simulator based on a programmable microcontroller unit (MCU, also known as a single-chip microcomputer) powered via a USB (Universal Serial Bus) interface, thus offering flexible power supply options.

[0051] In this embodiment, after power is supplied via the USB interface, different target firmware can be downloaded according to different communication protocols and specifications corresponding to different communication devices. For example, in a programmable microcontroller, if it is necessary to simulate an NVME (Non-Volatile Memory Express) hard drive, then the communication protocol corresponding to the NVME hard drive, such as MCTP (Management Component Transport Protocol) over I2C (Inter-Integrated Circuit) protocol, is downloaded. It can be understood that the MCTP over I2C protocol means that the underlying protocol of this Management Component Transport Protocol is ultimately transmitted via I2C.

[0052] Step S12: Switch the device simulator using the DIP switch to simulate various communication devices corresponding to the target firmware.

[0053] In this embodiment, the downloaded target firmware can simulate the required peripheral devices; that is, different device firmwares correspond to different DIP switches. Therefore, during the simulation process, the device simulator can be switched with a single click by adjusting the DIP switches, thereby simulating various types of devices.

[0054] In this embodiment of the application, the simulated communication devices corresponding to the target firmware may include temperature sensors, NVME hard drives, EEPROM (Electrically Erasable Programmable Read-Only Memory), GPU cards, etc., and may also simulate network cards or simulate external voltages, without specific limitations.

[0055] Specifically, the step of switching the device simulator via the DIP switch to simulate various communication devices corresponding to the target firmware includes: switching the device simulator via the DIP switch to simulate a temperature sensor; or, switching the device simulator via the DIP switch to simulate an NVMe hard drive; or, switching the device simulator via the DIP switch to simulate a electrically erasable programmable read-only memory; or, switching the device simulator via the DIP switch to simulate a GPU card; or, switching the device simulator via the DIP switch to simulate a network card; or, switching the device simulator via the DIP switch to simulate voltage.

[0056] Step S13: Obtain the communication protocol of the communication device simulated by the device simulator through the board management controller connector, and communicate with the board management controller according to the communication protocol to simulate monitoring and management of the board management controller.

[0057] In this embodiment, since some of the devices monitored and managed by the baseboard management controller are based on the I2C communication protocol, they can be connected to the motherboard of the baseboard management controller via an I2C cable to communicate with the baseboard management controller according to the communication protocol, thereby simulating various I2C devices monitored and managed by the baseboard management controller.

[0058] In this embodiment, the different communication protocols corresponding to the simulated different types of devices may include SMBUS (System Management Bus) protocol, FRU (Field Replace Unit) protocol, MCTP over I2C protocol, etc., or may be read from general I2C device registers, without specific limitations here. Among them, the I2C device is a device that monitors and manages the baseboard management controller based on the I2C communication protocol.

[0059] Specifically, obtaining the communication protocol of the communication device simulated by the device simulator through the baseboard management controller connector includes: obtaining the system management bus protocol of the communication device simulated by the device simulator through the baseboard management controller connector; or, obtaining the field replaceable unit protocol of the communication device simulated by the device simulator through the baseboard management controller connector; or, obtaining the MCTP over I2C protocol of the communication device simulated by the device simulator through the baseboard management controller connector; or, obtaining the protocol read from the general-purpose I2C device register simulated by the device simulator through the baseboard management controller connector.

[0060] In this embodiment, when the device simulator is switched via the DIP switch, the slave address of the programmable microcontroller can be changed at any time to simulate various communication devices corresponding to the target firmware. This allows for dynamic configuration of the physical addresses of communication devices monitored and managed by various baseboard management controllers, ensuring consistency with real devices.

[0061] This application utilizes a programmable microcontroller, which includes a power supply interface, a DIP switch, a device simulator, and a baseboard management controller connector. The method first supplies power and downloads the target firmware through the power supply interface; then, the device simulator is switched via the DIP switch to simulate various communication devices corresponding to the target firmware; finally, the communication protocol of the communication device simulated by the device simulator is obtained through the baseboard management controller connector, and communication is established with the baseboard management controller according to the communication protocol to simulate monitoring and management of the baseboard management controller. Therefore, this application, based on a programmable microcontroller, provides a realistic physical device capable of simulating various communication devices for monitoring and management of baseboard management controllers. This solves the problem of inconsistent development and testing paces caused by the lack of or absence of equipment during baseboard management controller development, which slows down development progress and leads to project delays. Furthermore, the one-click switching of the device simulator via the DIP switch does not affect the compatibility of the device between different projects, improving development efficiency. This ensures that the baseboard management controller has physical devices available at any time during the development process, and that multiple devices and configurations are always available. This allows for thorough testing in the early stages, and the earlier problems are discovered, the more likely project delays can be avoided. It also solves the problem of insufficient resources in the early stages, ensures that development and testing are not disconnected, and guarantees the smooth progress of the project.

[0062] This application discloses a schematic diagram of a programmable microcontroller. (See also...) Figure 2 As shown, the device includes: a power supply interface, a DIP switch, a device simulator, and a board management controller connector; wherein,

[0063] The power supply interface is used to connect to the server for power supply and to download the target firmware;

[0064] The DIP switch is used to switch the device simulator to simulate various communication devices corresponding to the target firmware;

[0065] The device simulator is used to simulate various communication devices corresponding to the target firmware;

[0066] The baseboard management controller connector is used to acquire the communication protocol of the communication device simulated by the device simulator, and to communicate with the baseboard management controller according to the communication protocol to simulate monitoring and management of the baseboard management controller.

[0067] For more detailed descriptions of the power supply interface, DIP switch, device simulator, and board management controller connector, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0068] like Figure 3 The diagram shows a specific simulation debugging structure. The hardware design is based on a programmable MCU, powered and firmware-downloaded via USB. The software design uses different firmware written according to the communication protocols and specifications of different devices. When simulating a device is needed, different firmware can be downloaded by adjusting different DIP switches to simulate different devices, allowing for one-click device switching.

[0069] As can be seen, based on a programmable MCU, when needed, simply toggling a DIP switch allows downloading firmware for different devices, including different communication protocols and raw data value ranges. By connecting USB for downloading and power, and connecting an I2C cable to the motherboard where the BMC resides, multiple different physical devices can be realistically simulated.

[0070] This application discloses a programmable microcontroller, including a power supply interface, a DIP switch, a device simulator, and a baseboard management controller connector. The power supply interface is used to connect to a server for power supply and downloading target firmware. The DIP switch is used to switch the device simulator to simulate various communication devices corresponding to the target firmware. The device simulator is used to simulate various communication devices corresponding to the target firmware. The baseboard management controller connector is used to acquire the communication protocol of the communication device simulated by the device simulator and communicate with the baseboard management controller according to the communication protocol to simulate monitoring and management of the baseboard management controller. Therefore, this application, based on a programmable microcontroller, provides a real physical device capable of simulating various communication devices for monitoring and management of baseboard management controllers. This solves the problem of inconsistent development and testing paces caused by the lack of or absence of equipment during the development of baseboard management controllers, which slows down development progress and leads to project delays. Furthermore, the one-click switching of the device simulator via the DIP switch does not affect the compatibility of the device between different projects, improving development efficiency. This ensures that the baseboard management controller has physical devices available at any time during the development process, and that multiple devices and configurations are always available. This allows for thorough testing in the early stages, and the earlier problems are discovered, the more likely project delays can be avoided. It also solves the problem of insufficient resources in the early stages, ensures that development and testing are not disconnected, and guarantees the smooth progress of the project.

[0071] Accordingly, this application also discloses a simulation debugging device, see [link to relevant documentation]. Figure 4 As shown, this device is applied to a programmable microcontroller, which includes a power supply interface, a DIP switch, a device simulator, and a board management controller connector. The device includes:

[0072] Power supply module 11 is used to provide power and download target firmware through the power supply interface;

[0073] The communication device simulation module 12 is used to switch the device simulator via the DIP switch to simulate a variety of communication devices corresponding to the target firmware;

[0074] The communication module 13 is used to acquire the communication protocol of the communication device simulated by the device simulator through the baseboard management controller connector, and to communicate with the baseboard management controller according to the communication protocol to simulate monitoring and management of the baseboard management controller.

[0075] For more detailed information on the working process of each of the above modules, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0076] Therefore, the above-described solution in this embodiment, applied to a programmable microcontroller, includes a power supply interface, a DIP switch, a device simulator, and a baseboard management controller connector. The method first supplies power and downloads the target firmware through the power supply interface; then, the device simulator is switched using the DIP switch to simulate various communication devices corresponding to the target firmware; finally, the communication protocol of the communication device simulated by the device simulator is obtained through the baseboard management controller connector, and communication is performed with the baseboard management controller according to the communication protocol to simulate monitoring and management of the baseboard management controller. Thus, this application, based on a programmable microcontroller, provides a realistic physical device capable of simulating various communication devices for monitoring and management of baseboard management controllers. This solves the problem of inconsistent development and testing paces caused by the lack of or absence of equipment during the development of baseboard management controllers, which slows down development progress and leads to project delays. Furthermore, the one-click switching of the device simulator via the DIP switch does not affect the compatibility of the device between different projects, improving development efficiency. This ensures that the baseboard management controller has physical devices available at any time during the development process, and that multiple devices and configurations are always available. This allows for thorough testing in the early stages, and the earlier problems are discovered, the more likely project delays can be avoided. It also solves the problem of insufficient resources in the early stages, ensures that development and testing are not disconnected, and guarantees the smooth progress of the project.

[0077] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0078] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the simulation debugging method disclosed in any of the foregoing embodiments.

[0079] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0080] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it can include an operating system 221, computer programs 222, and data 223, etc. The data 223 can include various types of data. The storage method can be temporary storage or permanent storage.

[0081] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the simulation debugging method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0082] Furthermore, this application also discloses a computer-readable storage medium, which includes random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, magnetic disks, optical disks, or any other form of storage medium known in the art. The computer program, when executed by a processor, implements the aforementioned simulation debugging method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0083] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0084] The steps of the simulation debugging or algorithm described in conjunction with the embodiments disclosed herein can be implemented directly using hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0085] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0086] The above provides a detailed description of the simulation debugging method, programmable microcontroller, device, equipment, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A simulation debugging method, characterized in that, Applied to a programmable microcontroller, the programmable microcontroller includes a power supply interface, a DIP switch, a device simulator, and a baseboard management controller connector, wherein the method includes: Power is supplied through the power interface and the target firmware is downloaded. The device simulator can be switched using the DIP switch to simulate various communication devices corresponding to the target firmware; The communication protocol of the communication device simulated by the device simulator is obtained through the baseboard management controller connector, and communication is performed with the baseboard management controller according to the communication protocol to simulate the monitoring and management of the baseboard management controller. The method of switching the device simulator via the DIP switch to simulate various communication devices corresponding to the target firmware includes: The device simulator can be switched by using the DIP switch to change the slaveaddr of the programmable microcontroller and simulate various communication devices corresponding to the target firmware.

2. The simulation debugging method according to claim 1, characterized in that, The process of supplying power and downloading the target firmware through the power supply interface includes: Powered via USB interface, the target firmware is downloaded according to the different communication protocols and specifications corresponding to different communication devices.

3. The simulation debugging method according to claim 1, characterized in that, The method of switching the device simulator via the DIP switch to simulate various communication devices corresponding to the target firmware includes: The device simulator is switched using the DIP switch to simulate a temperature sensor; Alternatively, the device simulator can be switched via the DIP switch to simulate an NVMe hard drive; Alternatively, the device simulator can be switched via the DIP switch to simulate an electrically erasable programmable read-only memory; Alternatively, the device simulator can be switched via the DIP switch to simulate a GPU card; Alternatively, the device simulator can be switched via the DIP switch to simulate a network card; Alternatively, the device simulator can be switched via the DIP switch to simulate voltage.

4. The simulation debugging method according to claim 1, characterized in that, The step of acquiring the communication protocol of the communication device simulated by the device simulator through the baseboard management controller connector includes: The system management bus protocol of the communication device, simulated by the device simulator, is obtained through the baseboard management controller connector; Alternatively, the field-replaceable unit protocol of the communication device, simulated by the device simulator, can be obtained through the baseboard management controller connector; Alternatively, the MCTP over I2C protocol of the communication device, simulated by the device simulator, can be obtained through the baseboard management controller connector; Alternatively, the protocol read from the general I2C device register, simulated by the device simulator, can be obtained through the baseboard management controller connector.

5. The simulation debugging method according to claim 1, characterized in that, The step of communicating with the baseboard management controller according to the communication protocol includes: The device is connected to the motherboard of the baseboard management controller via an I2C cable to communicate with the baseboard management controller according to the communication protocol.

6. A programmable microcontroller, characterized in that, This includes a power supply interface, DIP switches, a device simulator, and a board management controller connector. The power supply interface is used to connect to the server for power supply and to download the target firmware; The DIP switch is used to switch the device simulator to simulate various communication devices corresponding to the target firmware; The device simulator is used to simulate various communication devices corresponding to the target firmware; The baseboard management controller connector is used to acquire the communication protocol of the communication device simulated by the device simulator, and communicate with the baseboard management controller according to the communication protocol to simulate monitoring and management of the baseboard management controller. The DIP switch is specifically used to switch the device simulator to change the slave addr of the programmable microcontroller and simulate various communication devices corresponding to the target firmware.

7. A simulation debugging device, characterized in that, This device is applied to a programmable microcontroller, which includes a power supply interface, a DIP switch, a device simulator, and a baseboard management controller connector. The device includes: The power supply module is used to supply power and download the target firmware through the power supply interface; A communication device simulation module is used to switch the device simulator via the DIP switch to simulate various communication devices corresponding to the target firmware; The communication module is used to acquire the communication protocol of the communication device simulated by the device simulator through the baseboard management controller connector, and to communicate with the baseboard management controller according to the communication protocol to simulate the monitoring and management of the baseboard management controller. The communication equipment simulation module is specifically used for: The device simulator can be switched by using the DIP switch to change the slaveaddr of the programmable microcontroller and simulate various communication devices corresponding to the target firmware.

8. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the simulation debugging method as described in any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein the computer programs, when executed by a processor, implement the simulation debugging method as described in any one of claims 1 to 5.