System, use of a system and method for testing the firmware of a microcontroller for an embedded system
A system with real-time and non-real-time computing systems allows early and efficient testing of microcontroller firmware in embedded systems, reducing development time and costs by simulating target system responses, thus addressing the limitations of existing hardware-in-the-loop methods.
Patent Information
- Application Number
- DE102024129697
- Authority / Receiving Office
- DE · DE
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2026-04-16
AI Technical Summary
Current methods for testing microcontroller firmware in embedded systems require complex and costly hardware-in-the-loop test benches, which can only be used after significant development is complete, and do not allow direct testing of firmware, complicating the development process and making it difficult to identify errors in firmware versus circuit board components.
A system comprising a real-time capable reconfigurable computing system and a non-real-time capable microprocessor-based computing system, with an interface for connecting a test board to simulate target system responses, allowing firmware testing before the circuit board is complete, and enabling identification of errors at the individual pin level.
Enables early testing of microcontroller firmware under real-time conditions, reducing development time and costs by eliminating the need for complex test benches and allowing independent testing of firmware without the target system, with the ability to identify faulty pins and signals accurately.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0001] The present invention relates to a system for testing the firmware of a microcontroller for an embedded system, a use of a corresponding system for testing the firmware of a microcontroller for an embedded system, and a method for testing the firmware of a microcontroller for an embedded system.
[0002] Embedded systems are digital systems that are embedded within an external or surrounding technical system. The digital system interacts with the components of the surrounding technical system. For example, the embedded system receives measurements from sensors or controls actuators of the technical system. Many embedded systems control safety-critical processes that protect human lives and investments while adhering to real-time conditions.
[0003] The actual embedded system often comprises a circuit board or printed circuit board designed specifically for the task, on which a microcontroller is mounted. The firmware running on the microcontroller, like the surrounding circuit board, is adapted to the surrounding technical system. In other words, the firmware must be tailored to the specific microcontroller, the circuit board on which the microcontroller is mounted, and the surrounding technical system.
[0004] To test the microcontroller's firmware, the surrounding technical system, and especially the components connected to the embedded system into which the microcontroller is to be embedded, must be simulated in the laboratory. The simulation must therefore include, for example, sensors whose readings are to be processed by the microcontroller, and actuators that are to be controlled by the microcontroller. Other communication devices from which the microcontroller is to receive data or to which it is to send data must also be simulated. It must be ensured that the behavior of the simulated components of the surrounding technical system corresponds to the behavior of the real components in both technical and temporal terms.In other words, it must not only be ensured that the simulated components react to signals in the same way as the real components, but the simulated reactions must also occur within the same timeframe. The simulation must therefore adhere to the real-time conditions under which the embedded system is intended to be used in practice.
[0005] In practice, the entire embedded system—that is, the circuit board developed for the embedded system with the microcontroller mounted on it—is currently tested on so-called hardware-in-the-loop (HiL) test benches. The embedded system is connected to a customized counterpart via its inputs and outputs. Since each embedded system is developed for a specific environment, each test bench must also be individually built, which involves considerable costs and, due to the complexity of the test benches, also significant time delays.
[0006] The embedded system can therefore only be tested once the development of the firmware for the microcontroller and the circuit board for the embedded system are largely complete. This particularly complicates the development of the microcontroller firmware, as it can only be tested under real-time conditions once the firmware development is already well advanced.
[0007] Furthermore, there is the problem that direct testing of the firmware on the microcontroller is not possible with hardware-in-the-loop (HiL) test benches, as only the inputs and outputs of the entire embedded system can be tested on the test bench. Determining whether potential errors found during testing are caused by the circuit board or the microcontroller's firmware requires increased, often manual, testing effort.
[0008] Against this background, the expert faces the task of providing an improved system for testing the firmware of a microcontroller for an embedded system, as well as a corresponding procedure.
[0009] This problem is solved by a system for testing the firmware of a microcontroller for an embedded system, the use of such a system, and a method for testing the firmware of a microcontroller for an embedded system according to the independent claims. Preferred embodiments of the system and the method are the subject of the dependent claims.
[0010] According to a first aspect, the present invention relates to a system for testing the firmware of a microcontroller for an embedded system, comprising an interface and a test environment. The test environment includes a real-time capable reconfigurable computing system and a non-real-time capable microprocessor-based computing system. The interface is configured to accommodate a test board with a plurality of contacts. A microcontroller for an embedded system, carrying the firmware to be tested, is mounted on the test board. The microcontroller has a plurality of pins. The test board has a contact connected to each pin of the plurality of pins of the microcontroller, but not necessarily for every pin of the microcontroller. The interface has a corresponding contact for each contact of the test board.The reconfigurable computing system provides a counterpart for each interface, through which signals can be received from and / or sent to the microcontroller. The microprocessor-based computing system is configured to send signals to and from the microcontroller via the reconfigurable computing system. The test environment is further configured to simulate a response from a target system (for which the microcontroller is intended) and / or from at least one component connected to the target system to receiving signals from the microcontroller. Based on this simulated response, the system then sends replies to the received signals to the microcontroller via the counterparts.
[0011] In other words, the system, which will also be referred to as the test system below, comprises an interface to a test board and a test environment that can be used to test various microcontrollers. The interface provides a generic way in which different microcontrollers can be connected to the system. For example, the interface can be provided by a DDR4 DIMM socket.
[0012] A test board, on which the microcontroller is mounted, is inserted into the interface. This test board, also known as a test circuit board, is not the same as the circuit board that will later form the embedded or target system together with the microcontroller. Rather, it is a circuit board adapted to the test system, providing a contact for each microcontroller pin that will be used for firmware testing. The test board may also include components for powering the microcontroller or components necessary for firmware operation that are not to be simulated by the test environment. Furthermore, the test board may have contacts that allow the microcontroller's firmware to be modified. In particular, these contacts can allow updated firmware versions to be flashed onto the microcontroller.
[0013] The test board is not normally part of the test system, but is only inserted into the interface when the test system is used to test the firmware of a microcontroller. This advantageously allows the test system to be used for a wide variety of microcontrollers mounted on suitable test boards. However, this does not preclude the possibility that, in exceptional cases, the test board may be permanently connected to the interface, meaning the system is only used for testing a specific test board with a specific microcontroller.
[0014] The interface has a corresponding contact for at least each contact of the test board that is connected to one of the microcontroller's pins or terminals. This corresponding contact allows a connection between the test system and the microcontroller's pin. In addition, the interface may have further contacts, for example, to supply power to the test board and the microcontroller mounted on it, and / or to upload updated firmware to the microcontroller. These additional interface components can be provided by the same component as the corresponding contacts, or they can be separate components.
[0015] The interface's counterparts are connected to the test environment, specifically to the test environment's reconfigurable computing system. This system consists of a programmable logic circuit, preferably a Field Programmable Gate Array (FPGA), and must be capable of real-time operation. Therefore, the reconfigurable computing system is able to calculate and deliver a response to a request within a predefined time interval.
[0016] The reconfigurable computing system provides a counterpart for each contact. Signals can be received from and sent to the microcontroller via these counterparts. It is not necessary to provide a separate counterpart for each contact and thus for each pin of the microcontroller. Rather, multiple pins can be connected to the same counterpart. For example, several pins that together form a digital bus can be connected to the same counterpart. In one exemplary embodiment, five pins are connected to a single counterpart, four of which form data lines and the fifth a clock line. However, other counterparts can also connect only a single pin of the microprocessor, for example, if an analog signal is output via the pin.
[0017] Signals are received by the microcontroller via the remote interfaces, and signals can also be sent to the microcontroller. Depending on what is to be transmitted via the respective pins, a signal can take various forms. If the pin is an analog output, the signal can, for example, consist of a simple voltage change from low to high or from high to low. In another example, if several pins are combined into a digital bus, a signal can consist of a data packet with a large number of bits. Since the reconfigurable computing system is real-time capable, the implementation of the remote interfaces ensures that the incoming and outgoing signals are available for further processing or can be transmitted to the microcontroller within precisely defined and known timeframes.
[0018] In addition to the real-time capable reconfigurable computing system, the test environment also includes a microprocessor-based computing system that is not real-time capable. The microprocessor-based computing system can also be referred to as a general-purpose system and can provide various functions. Specifically, it is designed to allow signals to be sent to and received from the microcontroller via the reconfigurable computing system, with the sending and receiving of signals taking place via the counterparts of the reconfigurable computing system.
[0019] For example, signals representing specific events can be sent from the microprocessor-based computing system to the microcontroller, and the microcontroller's responses to these signals can then be evaluated on the microprocessor-based computing system. The advantage of using a microprocessor-based computing system over a reconfigurable computing system is that programming is significantly simpler, allowing for testing various functions of the microcontroller's firmware with less programming effort.
[0020] To test the behavior of the microcontroller's firmware in conjunction with the target system into which the microcontroller is to be embedded and with components of the technical environment for which the target system is intended, the test environment is designed to simulate the response of the target system and / or components connected to the target system to receiving signals from the microcontroller. For example, the test environment can simulate the response of an actuator to an activation command from the microcontroller and relay the response to the microcontroller via the other components. The actuator would be an example of a component connected to the target system. In addition, the test environment can also simulate, for example, the response of components on the circuit board on which the microcontroller is to be mounted.For example, a signal from the microcontroller can be used to simulate retrieving data from a memory located on the target system's circuit board. The retrieved data is then sent back to the microcontroller via the receiving devices as a response to the received signal.
[0021] This test system advantageously enables the firmware of a microcontroller for an embedded system to be tested even before the circuit board of the embedded system, the target system, is completed. It also eliminates the need for complex test benches. Furthermore, the use of the reconfigurable computing system to provide the interfaces to the microcontroller's pins ensures that the processing of signals received by and sent to the microcontroller occurs at defined times. Additionally, the test system advantageously allows the microcontroller's firmware to be tested at the individual pin level. This means that in the event of errors, it is immediately possible to identify which pin of the microcontroller is supplying faulty signals or which received signals the microcontroller is responding to incorrectly.This allows the microcontroller's firmware or software to be tested independently of the target system. Furthermore, testing the microcontroller is not limited to signals that can be tracked via the target system's inputs and outputs.
[0022] In a preferred embodiment, the reconfigurable computing system of the test environment is configured to simulate the response of the target system and / or at least one component connected to the target system to receiving signals from the microcontroller. Alternatively or additionally, it is preferred that the microprocessor-based system is configured to simulate a response of the target system and / or at least one component connected to the target system to receiving signals from the microcontroller. The response of the target system and / or components connected to the target system to receiving a selected signal is simulated either by the microprocessor-based computing system or by the reconfigurable computing system.
[0023] In other words, the simulation of the response of the target system, or of components of the technical environment in which the target system is embedded, can be performed either by the real-time reconfigurable computing system or the non-real-time microprocessor-based computing system. Typically, the response to a specific selected signal is simulated by either the reconfigurable computing system or the microprocessor-based computing system of the test environment. The test system thus advantageously combines the benefits of simulation in a microprocessor-based computing system with those of simulation in a real-time computing system.Simulations that either do not have high requirements regarding response time or that require only low computational effort can, for example, be carried out by the microprocessor-based computing system, while simulations that are time-critical and must be carried out within particularly short time periods can be carried out by the real-time capable reconfigurable computing system.
[0024] This reduces programming effort and thus testing time, as simulations on the microprocessor-based computer system can generally be defined in a higher-level programming language. If the reconfigurable computer system must be used to simulate reactions to comply with real-time conditions, the implementation in the reconfigurable computer system is usually more time-consuming.
[0025] It is further preferred if a response of the target system and / or components connected to the target system to the reception of a first group of selected signals from the microprocessor-based computing system is simulated, and a response of the target system and / or components connected to the target system to the reception of a second group of selected signals from the reconfigurable computing system is simulated. In other words, in the preferred embodiment, the test environment simulates responses to some signals on the microprocessor-based computing system and signals responses to other signals to the reconfigurable computing system. Thus, the simulation is partitioned between the real-time system and the non-real-time system. Based on the signal received from the microcontroller, the test environment decides which computing system is used for the simulation.
[0026] In a preferred embodiment, the simulation of the response of the target system or of components connected to the target system to receiving signals from the microcontroller is defined in a scripting language, provided that the response of the target system and / or of the at least one component connected to the target system is simulated by the microprocessor-based computing system. The use of scripting languages or other high-level programming languages has the advantage that the simulations can be programmed more quickly, thereby reducing the time required to perform the tests.
[0027] In a further preferred embodiment, the reconfigurable computing system is configured to record a timestamp in an event memory for each signal received by the microcontroller at a remote station and for each signal sent to the microcontroller from a remote station. In other words, the preferred embodiment provides that the real-time capable computing system includes an event memory in which a timestamp is stored for each sending and receiving operation with the microcontroller. Since the reconfigurable computing system is real-time capable, i.e., the processing of the received and sent signals by the remote stations occurs within known and fixed time periods, the timestamps can be used to determine the time within which the microcontroller reacts to a received signal and sends the expected signal to the test environment, or vice versa.within what time period the test environment is able to simulate a response to a received signal and send the resulting response to the microcontroller.
[0028] In a preferred embodiment, the latter is used to configure the system such that a time difference between a signal received by the microcontroller at a remote station and a response sent to the microcontroller via a remote station containing the firmware under test, based on a reaction simulated by the test environment, is determined and compared with a definable threshold. This advantageously allows verification of whether the simulation takes place within the timeframe in which the real target system or components of the technical environment connected to the target system would react, i.e., whether the real-time conditions are met.For example, if a simulation cannot be carried out within the allotted time using the microprocessor-based computing system, i.e., if a defined threshold is exceeded, this can be used as an opportunity to carry out the simulation with the real-time capable reconfigurable computing system, whereby the simulation runs faster and, in particular, in real time.
[0029] It is still preferred if the simulation of the response of the target system or of components connected to the target system to receiving a signal from the microcontroller is defined in a hardware description language, provided that the response of the target system and / or of the at least one component connected to the target system is simulated by the reconfigurable computing system.
[0030] In a further preferred embodiment, the reconfigurable computing system is designed such that the counterparts provided by the reconfigurable computing system are configurable. Preferably, at least one counterpart is already equipped with preprocessing for a digital bus system, for recording analog signals, or for outputting analog signals. An example of a digital bus system is a Controller Area Network (CAN) bus or a Serial Peripheral Interface (SPI) bus. The recording and output of analog signals can be performed, for example, via counterparts equipped with analog-to-digital converters and digital-to-analog converters.
[0031] The reconfigurable computing system is designed so that different counterparts can be configured depending on the test board used or the microprocessor mounted on it. For example, interface contacts that are connected to a counterpart implementing a CAN bus for testing a first firmware can be connected to a counterpart configured for an SPI bus for testing a second firmware. For testing a third firmware, individual pins that were previously connected to the counterpart implementing the CAN bus can each become their own GPIO counterpart. This advantageously allows firmwares for microcontrollers for a wide variety of applications to be tested using the same test system.
[0032] In a second aspect, the problem underlying the invention is addressed by using a system according to one of the preceding embodiments for testing the firmware of a microcontroller for an embedded system. The microcontroller with the firmware to be tested is arranged on a test board that has a contact connected to each pin of a plurality of the microcontroller's pins, but not necessarily for every pin. The advantages of using the embodiments of the test system described above correspond to the advantages already explained in detail with regard to each of the individual embodiments. To avoid unnecessary repetition, reference is therefore made to the preceding explanations.
[0033] In a third aspect, the problem underlying the invention is solved by a method for testing the firmware of a microcontroller for an embedded system. The microcontroller with the firmware to be tested is arranged on a test board which has a contact connected to each pin of a plurality of pins of the microcontroller, but not necessarily for every pin of the microcontroller. The method comprises the following steps: inserting the test board into an interface with a plurality of mating contacts, such that each contact of the test board is connected to a mating contact of the interface, and thus each pin of the microcontroller connected to a contact is connected, via the contact and the mating contact, to a counterpart provided by a real-time capable reconfigurable computing system.wherein the reconfigurable computing system and a non-real-time microprocessor-based computing system are part of a test environment, receiving a signal from the microcontroller via the counterparts provided in the reconfigurable computing system, simulating a response of a target system for which the microcontroller is intended, and / or of at least one component connected to the target system, to the signal received by the microcontroller via the test environment, and sending a response to the received signal based on the simulated response via the counterparts provided by the reconfigurable computing system to the microcontroller.
[0034] It is further preferred if a response of the target system and / or of at least one component connected to the target system to the signal received by the microcontroller is simulated by the reconfigurable computing system or by the microprocessor-based computing system. Preferably, a response of the target system and / or of components connected to the target system to the reception of a first group of selected signals by the microprocessor-based computing system is simulated, and a response of the target system and / or of components connected to the target system to the reception of a second group of selected signals by the reconfigurable computing system is simulated.
[0035] Preferably, the microprocessor-based computing system first simulates a response from the target system and / or at least one component connected to the target system to a selected signal received by the microcontroller. The response based on the simulated response is then sent to the microcontroller via the remote devices. After sending the response based on the simulated response, a time difference between the reception of the selected signal via the remote devices and the transmission of the response via the remote devices is determined. The reconfigurable computing system is configured or reconfigured to simulate a response from the target system and / or at least one component connected to the target system to the reception of the selected signal by the microcontroller if the determined time difference exceeds a defined threshold.In this case, upon subsequent reception of the selected signal, the reconfigurable computing system simulates the response of the target system and / or of at least one component connected to the target system to the selected signal received by the microcontroller.
[0036] Furthermore, it is preferred that, upon subsequent reception of the first signal, the response of the target system and / or the at least one component connected to the target system to the selected signal received by the microcontroller is still simulated by the microprocessor-based computing system if the determined time difference is below a threshold value. In this case, reconfiguration of the reconfigurable computing system to simulate the response of the target system or the connected components can be omitted.
[0037] It is still preferred if the simulation of the response of the target system or of the at least one component connected to the target system to the reception of a signal from the microcontroller is defined in a scripting language, provided that the response of the target system and / or of the at least one component connected to the target system is simulated by the microprocessor-based computing system.
[0038] In a preferred embodiment, the reconfigurable computing system is a Field Programmable Gate Array (FPGA).
[0039] It is further preferred that the simulation of the response of the target system or of components connected to the target system to the reception of a signal from the microcontroller is defined in a hardware description language, provided that the response of the target system and / or of the at least one component connected to the target system is simulated by the reconfigurable computing system.
[0040] Furthermore, it is preferred if the reconfigurable computing system is designed such that the counterparts provided by the reconfigurable computing system are configurable. It is further preferred if at least one counterpart is preferably already configured for preprocessing for a digital bus system, for recording analog signals, or for outputting analog signals.
[0041] To avoid unnecessary repetition, with regard to the details and configurations of the embodiments of the method for testing firmware for a microcontroller for an embedded system and their advantages, reference is made to the preceding descriptions of the preferred embodiments of the test system, which have device features corresponding to the respective method features.
[0042] The invention is explained in more detail below with reference to an embodiment of a system for testing the firmware of a microcontroller and an embodiment of a method for testing the firmware of a microcontroller, as shown in the drawings. Fig. 1 a schematic representation of an embodiment of a system for testing the firmware of the microcontroller with an embodiment of a test board, Fig. Figure 2 shows a flowchart of an exemplary implementation of a method for testing the firmware of a microcontroller, and Fig. 3 a schematic representation of an exemplary embodiment of an embedded system.
[0043] Fig. Figure 1 shows an embodiment of a system or test system 1 for testing a firmware 3 of a microcontroller 5. The microcontroller 5 is intended for use as part of an embedded system.
[0044] An embodiment of an embedded system 7 is shown in Fig. Figure 3 shows a schematic representation. The microcontroller 5 is intended for the embedded system 7, which is therefore also referred to as the target system 7 below. The embedded system 7 has a printed circuit board 9 on which the microcontroller 5 with the firmware 3 installed on it is arranged. In addition, the exemplary embedded system 7 includes several electronic components 11, for example, an accelerometer, a light sensor, and a memory chip. Furthermore, the embedded system 7 has an external interface 13 via which the embedded system 7 can be connected to several components 15 that are part of a technical environment 17 in which the embedded system 7 is embedded. The embedded system 7 can, for example, receive measured values from the components 15 or control functions of the components 15.
[0045] To test firmware 3, the microcontroller 5, for which firmware 3 is intended, is placed on a test board 19. The test board 19 does not have the additional electronic components 11 of the embedded system 7, nor does it have the external interface 13 that is provided on the exemplary embedded system 7.
[0046] The test board 19 instead provides a series of contacts 21 via which individual pins 23 of the microcontroller 5 can be directly connected to the test system 1. Fig. In diagram 1, a dotted line schematically indicates that pins 23 are connected to contacts 21. In reality, there is a separate connection between each pin 23 and each corresponding contact 21, so that each pin 23 can be directly connected to system 1.
[0047] How to Fig. As can also be seen in Figure 1, not all pins of the microcontroller 5 are connected to contacts 21. For example, three further pins 25 of the microcontroller are connected to corresponding auxiliary contacts 27, via which the microcontroller 5 can be powered. A new or modified firmware 3 can also be uploaded to the microcontroller 5 via the auxiliary contacts 27. In addition, in Fig. Figure 1 shows a third group 29 of pins 23, 25, 29 of the microcontroller 5, which are not connected to any contact 21, 27. These pins 29 are not used.
[0048] For the sake of completeness, it should be noted that the representation of the test board 19 of the microcontroller 5, and in particular of pins 23, 25, 29 and contacts 21, 27, is purely schematic. Specifically, the microcontroller 5 may have more or fewer pins 23, 25, 29; pins 23, 25, 29 may be used for other purposes or connected to other contacts 21, 27; and there may also be more or fewer contacts 21, 27. In particular, contacts 21 and the auxiliary contacts 27 may be combined into a single component. Furthermore, some of the electronic components 11, e.g., those not to be simulated, could be present on the test board 19 and connected to pins of the microcontroller 5.
[0049] The test board 19 advantageously allows direct access to pins 23 and 25, which form the inputs and outputs of the microcontroller 5. Therefore, the test board 19 can be used for a wide variety of microcontrollers 5, whose pins 23, 25, and 29 only need to be connected to the corresponding contacts 21 and 27. Thus, testing the firmware 3 of the microcontroller 5 does not require a fully developed circuit board 9 for the embedded system 7, i.e., no fully developed target system.
[0050] The actual test environment 1 initially comprises an interface 31, which provides a corresponding contact 33 for each of the contacts 21 of the test board 19. The corresponding contacts 33 are directly connected to a real-time capable reconfigurable computing system 35, which, together with a non-real-time capable microprocessor-based computing system 37, forms a test environment 39.
[0051] Each counterpart contact 33 of the interface 31 is connected to a counterpart 41a, 41b, ..., 41n, which is formed by the reconfigurable computing system 35. As in Fig. As shown in Figure 1 as an example, one or more mating contacts 33, and thus one or more pins 23 of the microcontroller 5, can be connected to each mating point 41a, 41b, ..., 41n. For example, two pins 23 are connected to mating point 41a, four pins to mating point 41b, and only one pin to mating point 41n.
[0052] The counterparts 41a, 41b, ..., 41n are adapted to the signals output by the microcontroller via their respective pins 23. For example, counterpart 41n is configured to receive an analog signal. Counter 41b receives, for instance, a digital bus signal, which consists of three data lines and one clock line. The counterparts 41a, 41b, ..., 41n are not merely reception points for the signals received from pins 23, but can also perform preprocessing. For example, packets from a digital data bus can be evaluated, or analog signals can be recorded.
[0053] Advantageously, the counterparts 41a, 41b, ..., 41n can be reconfigured for testing firmware 3 on different microcontrollers 5. That is, the counterpart contacts 33 of the interface 31 can be connected to different counterparts 41a, 41b, ..., 41n, or the counterparts can be configured differently. This allows for flexible adaptation to the distribution of the pins 23 on the microcontrollers 5 and their connection to the contacts 21 of the test board 19.
[0054] The reconfigurable computing system 35 further includes an event memory 43. The event memory 43 is connected to a clock 45. For each signal received by the microcontroller 5 at a remote station 41a, 41b, ..., 41n, and for each signal sent to the microcontroller 5 via a remote station 41a, 41b, ..., 41n, a timestamp is recorded in the event memory 43. The timestamps advantageously allow the microcontroller 5 to be recorded as to the time within which it reacted to signals received from the test environment 39, and vice versa. This advantageously enables the detection of whether the firmware 3 of the microcontroller 5 reacts to incoming signals within the required time.
[0055] The microprocessor-based computing environment 37 comprises a communication module, or transceiver module 47, through which signals can be sent to the microcontroller 5 via the counterparts 41a, 41b, ..., 41n. The transceiver module 47 can also evaluate signals received by the microcontroller 5 via the counterparts 41a, 41b, ..., 41n. Among other things, the transceiver module 47 serves to test the functionality of the microcontroller 5, to verify the extent to which it responds correctly to transmitted commands or requests. The event memory 43 can be used to evaluate whether the microcontroller 5's responses to signals from the transceiver module 47 of the microprocessor-based computing system 37 occur within the expected timeframes.
[0056] To enable testing of the functionality of the firmware 3 of the microcontroller 5 in conjunction with the system 7 into which the microcontroller is embedded, the test environment 39 has a first simulation environment 49, which is part of the microprocessor-based computing system 37, and a second simulation environment 51, which is part of the reconfigurable computing system 35. In the simulation environments 49 and 51, in addition to the target system for which the microcontroller 5 is intended, components 15 of the technical environment 17, which are to be connected to the target system 7, can also be simulated.
[0057] Advantageously, the test environment 39 can simulate, upon receiving signals from the microcontroller 5 via the counterparts 41a, 41b, ..., 41n, the reactions of the target system 7 or of components 15 connected to the target system in a technical environment 17. The simulations are defined either in a scripting language when executed by the simulation environment 49 of the microprocessor-based computing system 37, or in a hardware description language when simulated by the simulation environment 51 of the reconfigurable computing system 35. Using the event memory 43, the test environment 39 can advantageously determine whether the simulated reactions or the responses based on the simulated reactions from the test environments 49, 51 occurred within the timeframes expected in a real system.
[0058] Particularly when performing simulations in the simulation environment 49 of the microprocessor-based computer system 37, delays can occur due to the lack of real-time capability of the microprocessor-based computer system 37. If these simulations take too long, or longer than would be expected in reality, the simulation can be moved to the simulation environment 51 of the reconfigurable computer system 35. Due to the real-time capability of the reconfigurable computer system 35, it is then ensured that the simulations run within the expected timeframe.
[0059] The simulation of the target system 7 and its associated components 15 can thus be advantageously partitioned. For components 15 or electronic components 11 of the circuit board 9 of the target system 7, whose simulation is so time-critical that it cannot be performed within the expected time by the non-real-time microprocessor-based computing system 37, the simulation environment 51, provided by the reconfigurable computing system 35, can be used. For many simulations, the microprocessor-based simulation environment 37 should be sufficiently fast and offers the advantage of simpler definition using a scripting language. Defining the response of the target system 7 or its connected components 15 in a hardware description language, which can be executed in the simulation environment 51 of the reconfigurable system 35, is more complex.
[0060] In addition to the components already described, the test system also includes an external interface 53, via which, for example, a computer 55 belonging to a firmware developer or tester can be connected to the test system 1. The external interface 53 can be used, for example, to reconfigure the reconfigurable computing system 35, i.e., to define new simulations in the simulation environment 51, to read the event memory 53, or to reconfigure the remote devices 41a, 41b, ..., 41n. Furthermore, the microprocessor-based computing system 37 can be accessed via the external interface 53, for example, to configure signals that are to be sent to the microcontroller 5 via the transmit / receive module 47, or to access the simulation environment 49.Furthermore, the external interface 53 can be used to upload updated or modified firmware to the microcontroller 5 via the additional contacts 27 of the test board 19 and corresponding additional counter-contacts 57.
[0061] The following refers to Fig. 2. The course of a procedure is described, in which the in Fig. The test system 1 shown is used to test the firmware 3 of a microcontroller 5 for an embedded system 7. Referring to Fig. 2 thus describes both an embodiment of a method for testing a firmware and an embodiment of a use of a test system 1.
[0062] In the first step 59 of the procedure, the test board 19 with the microcontroller 5 mounted on it is first inserted into the interface 31 of the test system. A connection is thus established between the pins 23 of the microcontroller 5 and the corresponding points 41a, 41b, ..., 41n of the reconfigurable computing system 35 via the contacts 21 of the test board 19 and the corresponding contacts 33 of the interface 31.
[0063] In the subsequent second step 61, a signal is received from the microcontroller 5 via the counterparts 41a, 41b, ..., 41n. In the third step 63, a timestamp is recorded in the event memory 43 of the reconfigurable computing system 35, which documents the time of the signal's input from the microcontroller 5.
[0064] In parallel, the signal received by the microcontroller 5 is forwarded to the simulation environment 49 of the microprocessor-based computing system 37. In the fourth step 65, the test environment 49 of the microprocessor-based computing system 37 simulates a response from the target system 7 or from components 15 of a technical environment 17 that are connected to the target system 7. In a fifth step 67, a response based on the result of the simulation is sent to the microcontroller 5 via the counterparts 41a, 41b, ..., 41n. In the sixth step 69, the event memory 43 records a timestamp for the time at which the signal with the simulation-based response was sent from the test environment 39 to the microcontroller 5.
[0065] In the subsequent seventh step, 71, the time difference between the signal received by the microcontroller 5 and the response signal is compared. If the determined time difference exceeds a predefined threshold, the test is considered invalid. In this case, the tester of firmware 3 has several options. They can repeat the test performed so far, including steps 59 to 71. Since the microprocessor-based computing system 37, which performed the simulation, is not real-time capable, the simulation might run faster and within the expected timeframe the next time. In this case, the time difference determined from the timestamps stored in event memory 43 would be below the expected threshold, and the test could be terminated.
[0066] However, if the time difference remains above the expected threshold, the tester can, in step eight 73, redefine the response of the target system 7 or of components 15 connected to the target system 7 in a hardware description language and load this into the simulation environment 51, which is part of the reconfigurable computing system 35. The tester can, of course, also continue the procedure directly with step eight 73 if the simulation fails due to the microprocessor-based computing system 37.
[0067] In a ninth step 75, if the same signal is received again by the microcontroller 5 with the firmware 3 under test at the remote stations 41a, 41b, ..., 41n, a timestamp for the reception of the signal is recorded again in the event memory 43 in the tenth step 77. Simultaneously, the reaction of the target system 7, or of components 15 of the technical environment 17 connected to the target system 7, is simulated in the simulation environment 51, which is part of the reconfigurable computing system 35. The execution of the simulation in the reconfigurable computing system 35 constitutes the eleventh process step 79.
[0068] In the subsequent twelfth process step 81, a response to the received signal, based on the result of the simulation, is sent to the microcontroller 5 via the counterparts 41a, 41b, ..., 41n. Again, in the thirteenth process step 83, the event memory 43 records a timestamp that documents the time at which the simulated response was sent. Finally, in the fourteenth process step 85, the time difference between the signal received by the microcontroller 5 and the time of sending the response is determined. Since the reconfigurable computing system 35 is real-time capable, it can perform simulations in the simulation environment 51 significantly faster than is possible using the simulation environment 49 of the microprocessor-based computing system 37. In the concluding fifteenth process step 87, the time difference determined in the preceding fourteenth process step 85 is compared with the threshold value.This value should now be below the threshold, allowing the simulation to be performed within the expected timeframe. This enables testing of the microcontroller and its firmware 3 under real-world conditions, without the need for a complex test setup. Therefore, firmware 3 can be tested under real-world conditions well before the completion of the development of target system 7 or the creation of test setups. Reference symbol list 1 system, test system 3 Firmware 5 Microcontroller 7 embedded system, target system 9 printed circuit board 11 electronic components 13 external interface 15 components 17 technical environment 19 test boards 21 contacts 23 pins 25 pins 27 additional contacts 29 pins 31 Interface 33 reciprocal contacts 35 reconfigurable computing system 37 microprocessor-based computing system 39 Test environment 41a, 41b, ..., 41n Counterparts 43 Event log 45 o'clock 47 Transmit / receive module 49 Simulation environment 51 Simulation environment 53 external interface 55 computers 57 additional contacts 59 first step 61 second step 63 third step 65 fourth step 67 fifth step 69 sixth step 71 seventh step 73 eighth step 75 ninth step 77 tenth step 79 eleventh step 81 twelfth step 83 thirteenth step 85 fourteenth step 87 fifteenth step
Citation Information
Patent Citations
Vehicle control unit testing device for use in hardware in-the-loop simulator, has computing unit and signal generating card that are connected with serial bus interface for receiving and / or sending time and angle synchronous messages
DE102010043661A1