COMPUTER SYSTEM COMPRISING A MICROCONTROLLER USING EXTERNAL MEMORY
The microcontroller's integrated management software module addresses the complexity of supporting multiple external memory types by providing optimized control and simplified loading, reducing user knowledge and costs.
Patent Information
- Application Number
- FR2024001914
- Authority / Receiving Office
- FR · FR
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-27
- Publication Date
- 2025-08-29
AI Technical Summary
Existing microcontrollers face challenges in supporting different types of external memory without specific programming, leading to complex and costly integration and management, particularly in terms of communication interfaces and development tools.
A microcontroller with an integrated management software module that includes drivers and communication parameters for various external memory types, along with a loading software module to simplify integration and loading of application programs across multiple development tools.
Simplifies the integration and management of external memory by reducing user knowledge requirements and costs, optimizing control, and enabling faster loading of application programs.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Title of the invention: COMPUTER SYSTEM COMPRISING A MICROCONTROLLER USING AN EXTERNAL MEMORY
[0001] Embodiments and implementations relate to computer systems, and more particularly to computer systems comprising a microcontroller using external memory.
[0002] A microcontroller may use external memory to increase its storage capacity. In particular, microcontrollers generally have limited internal memory capacity, or even no non-volatile internal memory. This internal memory may be insufficient for certain applications requiring greater storage capacity for storing complex data or programs. Thus, the use of external memory makes it possible to extend the available storage capacity.
[0003] There are several types of external memory. In particular, we know non-volatile memories of the “NOR Flash” or “NAND Flash” type, random access memory (known as “RAM”, abbreviation for “Random-access memory”), memory cards, of the “SD” type (abbreviation for “Secure Digital”), or “microSD”.
[0004] Using external memory in a computer system requires knowledge of different memory technologies.
[0005] It is important that the external memory is compatible with the microcontroller in order to ensure correct and efficient operation of the computer system.
[0006] In particular, it is important that the microcontroller uses a communication interface compatible with the external memory used in order to be able to communicate with the latter. The communication interface may be a serial interface of the “SPI” type (abbreviation for “Serial Peripheral Interface”), in particular 16 lines, 8 lines, 4 lines, 2 lines or 1 line, or of the “xSPI” type (abbreviation for “expanded Serial Peripheral Interface”) for example. There are also parallel communication interfaces, in particular of the “FMC” type (abbreviation for “Flexible Memory Controller”).
[0007] Furthermore, it is also important that the microcontroller uses the same communication protocol as the external memory. For example, the protocol "JESD251C" of the standardization body "JEDEC" (abbreviation of the English "Joint Electron Device Engineering Council") defines a communication protocol for an external memory using an "xSPI" communication interface.
[0008] Known solutions do not allow a microcontroller to support different types of external memory without having to specifically program the microcontroller for each type of external memory to be supported. These solutions are complex and expensive to implement.
[0009] In particular, it is possible to develop a suitable driver for an external memory that a user wishes to use with the microcontroller.
[0010] However, the development of such a driver generally rests with the user of the microcontroller (i.e. the designer of the computer system comprising the microcontroller and the external memory), because it is this user who decides which external memory he wishes to use. Indeed, the manufacturer of the microcontroller cannot know in advance which external memory will be used by the user.
[0011] However, developing such a driver can be complex for a microcontroller user. The cost of integrating external memory therefore rests with the user and not with the microcontroller manufacturer.
[0012] There is therefore a need to propose a solution to simplify the management of an external memory by a microcontroller.
[0013] Furthermore, there are various development tools (also referred to by the abbreviation "IDE" for "Integrated Development Environment") allowing the user of the microcontroller to develop his application programs to be executed by the microcontroller. In particular, the development tool allows the user to load an application program onto the external memory used with the microcontroller. Thus, it is important that the development tool is adapted for the type of external memory that the user wishes to use in order to allow the writing of data or application programs into the external memory used with the microcontroller. The same problem arises for program loading tools.
[0014] It is therefore important that each development tool integrates an external memory loader module adapted to the requirements of this development tool as well as to the external memory that the user wishes to use. However, it is not easy to develop an external memory loader module for each development tool.
[0015] There is therefore also a need to propose a solution adapted for different development tools to simplify the loading of an application program for a microcontroller which can use different types of external memory and different communication protocols.
[0016] According to one aspect, there is provided a microcontroller comprising: - a processor, - a communication interface configured to allow communication between the processor and an external memory, - an internal memory storing: • at least one driver configured to control said communication interface when executed by said processor, • a management software module configured to control the external memory using said at least one driver as well as at least one communication parameter associated with said external memory when executed by said processor.
[0017] Such a management software module makes it possible to simplify the integration of an external memory into a computer system by reducing the knowledge requirements of the external memory used for a user wishing to use an external memory with a microcontroller. The use of such a management software module therefore makes it possible to reduce the costs of developing drivers by a user of the microcontroller.
[0018] Furthermore, the control of the external memory is optimized because the management software module takes into account at least one communication parameter - in particular several communication parameters - associated with the external memory, such as a number of data lines and a maximum frequency.
[0019] Advantageously, said management software module comprises a programming interface serving as an entry point for application programs wishing to use the external memory.
[0020] This programming interface can be unique for all external memories supported by the management module. It is thus easier for a user to change external memory.
[0021] Preferably, said management software module comprises: • a driver program configured to control said external memory from said at least one communication parameter associated with this external memory, • at least one interface program configured to allow said driver program to use said at least one driver to control said external memory.
[0022] In particular, the management software module may comprise a driver program for each type of external memory that the user of the microcontroller wishes to use.
[0023] In an advantageous embodiment, said management software module is stored in a boot area of the internal memory so as to be executed by said processor when the microcontroller is started.
[0024] Each communication parameter is defined according to the type of external memory used. For example, said at least one communication parameter associated with the external memory is chosen from a number of data communication lines, a maximum communication frequency and a latency time between write accesses and read accesses to the external memory.
[0025] Advantageously, the management software module comprises a program boot configured to allow, depending on a defined execution mode, execution of an application program, stored in the external memory, from the external memory or from the internal memory or from another external memory after having copied the application program there.
[0026] In an advantageous embodiment, the internal memory further stores - in particular in a volatile part (not shown) of the internal memory - a loading software module configured to allow a development or loading tool to load an application program into the external memory using said management software module. In particular, the loading software module is loaded into the internal memory when the user wishes to load an application program into the external memory.
[0027] Such a loading software module makes it possible to establish a connection between one or more development or loading tools and the microcontroller having access to the external memory via a physical interface. In this way, the loading software module simplifies the loading of an application program into an external memory for a user. In addition, the user of the development or loading tool does not have to know the configuration of this tool or the loading software module to load an application program into the external memory.
[0028] The use of such a loading software module makes it possible to benefit from the advantages provided by the management software module by optimally controlling the external memory to load the application program. In particular, the management software module makes it possible to load the application program into the external memory using, for example, a number of data lines, a maximum frequency associated with the external memory and a latency time between write accesses and read accesses to the external memory. This thus makes it possible to load the application program more quickly into the external memory.
[0029] Preferably, the loading software module comprises: - a programming interface configured to receive requests from the development or loading tool, - an encapsulation module configured to use the management software module to load an application program into external memory upon request from the development or loading tool.
[0030] Advantageously, the loading software module comprises a debugging module configured to execute a series of tests in order to evaluate whether the loading software module is functioning correctly.
[0031] According to another aspect, there is provided a computer system comprising an external memory and a microcontroller comprising: - a processor, - a communication interface configured to allow communication between the processor and said external memory, - an internal memory storing: • at least one driver configured to control said communication interface when executed by said processor, • a management software module configured to control the external memory using said at least one driver as well as at least one communication parameter associated with said external memory when executed by said processor.
[0032] According to another aspect, there is provided a method for managing an external memory by a microcontroller comprising an execution, by a processor of the microcontroller, of a management software module stored in an internal memory of the microcontroller, the execution of the management software module causing a control of the external memory using: - at least one driver configured to control a communication interface enabling communication between the processor and the external memory, and - at least one communication parameter associated with the external memory.
[0033] According to another aspect, there is provided a method of loading, by a development or loading tool, an application program into an external memory used by a microcontroller, the method comprising an execution, by a processor of the microcontroller, of a loading software module, stored in an internal memory of the microcontroller, at the request of the development or loading tool to load said application program into the external memory, the loading software module using a management software module in order to control the external memory from: - at least one driver configured to control a communication interface enabling communication between the processor and the external memory, and - at least one communication parameter associated with the external memory.
[0034] According to another aspect, there is provided a software tool for generating code executable by a microcontroller comprising: - a graphical interface adapted to allow entry of a type of external memory to be used with a microcontroller, - a code generation module suitable for generating a management software module configured to control external memory using: • at least one driver configured to control a communication interface enabling communication between a microcontroller processor and external memory, and • at least one communication parameter associated with the external memory.
[0035] In an advantageous embodiment, the code generation module is also suitable for generating a loading software module configured to enable a development or loading tool to load an application program into external memory using said management software module.
[0036] According to another aspect, there is provided a method of generating code executable by a microcontroller, the method comprising: - an entry, via a graphical interface of a software tool for generating executable code, of a type of external memory to be used with a microcontroller, - a generation, by a code generation module, of said software tool, of a management software module configured to control the external memory using: • at least one driver configured to control a communication interface enabling communication between a microcontroller processor and external memory, and • at least one communication parameter associated with the external memory.
[0037] Advantageously, the method further comprises: - a generation, by said code generation module, of a loading software module configured to allow a development or loading tool to load an application program into the external memory using said management software module, and - an integration, by said development or loading tool, of the loading software module and the management software module in the internal memory of said microcontroller.
[0038] Other advantages and characteristics of the invention will appear on examining the detailed description of the embodiment and implementation, which is in no way limiting, and the appended drawings in which:
[0039] [Fig.l] ;
[0040] [Fig.2] ;
[0041] [Fig.3]
[0042] [Fig.4] ;
[0043] [Fig.5] ;
[0044] [Fig.6] ;
[0045] [Fig.7] ;
[0046] [Fig.8] ; and
[0047] [Fig.9] schematically illustrate methods of implementation and realization of the invention.
[0048] [Fig.l] illustrates a computer system SYS comprising a microcontroller MCU and at least one external memory EXTMEM.
[0049] The microcontroller MCU comprises an internal memory INTMEM and a processor PRC. Alternatively, the MCU microcontroller may have multiple processors. The MCU microcontroller may, for example, be an STM32® microcontroller, marketed by STMicroelectronics. The MCU microcontroller may include an Arm® Cortex®-M type PRC processor.
[0050] The internal memory INTMEM can be a flash memory for example.
[0051] The microcontroller MCU may comprise COM_I communication interfaces so that the PRC processor of the microcontroller MCU can communicate with at least one external memory EXTMEM. For example, the COM_I communication interfaces may comprise an I_XSPI interface for “xSPI” bus (abbreviation for “expanded Serial Peripheral Interface”), an I_FMC interface for flexible memory controller (also designated by the abbreviation “FMC” for “Flexible Memory Controller”) and / or an I_SD / MMC interface for “SD” card (abbreviation for “Secure Digital”) or for “MMC” multimedia card (abbreviation for “Multimedia Card”).
[0052] The external memory EXTMEM makes it possible to extend the storage capacity of the microcontroller. The external memory may be a non-volatile memory, for example of the “NOR Flash” type. The external memory may also be a volatile memory, in particular a random access memory (also designated by the abbreviation “RAM”, from the English “Random Access Memory”). The external memory EXTMEM may also be an “SD” card.
[0053] In the embodiment shown, the computer system SYS comprises a single external memory EXTMEM. However, it is possible to provide a computer system SYS comprising several external memories EXTMEM, in particular external memories of different types.
[0054] [Fig.2] illustrates an embodiment of an internal memory INTMEM and an external memory EXTMEM.
[0055] The external memory EXTMEM comprises a first space EDATZ dedicated to storing DAT data. The external memory EXTMEM also comprises a second space EPRGZ dedicated to storing APRG application programs.
[0056] The internal memory INTMEM comprises a first space IDATZ dedicated to storing DAT data. The internal memory INTMEM also comprises a second space IPRGZ dedicated to storing programs.
[0057] The internal memory INTMEM comprises an area IBTZ, called a boot sector, in which boot software (also called a boot loader) is stored. The boot area IBTZ of the internal memory INTMEM also comprises a software module EXTMEM_M for managing the external memory EXTMEM.
[0058] [Fig.3] illustrates a software architecture in the internal memory INTMEM allowing the MCU microcontroller to use different types of external EXTMEM memory.
[0059] The PRC processor, the COM_I communication interface, the EXTMEM external memory and the INTMEM internal memory are here represented in a HWR hardware layer.
[0060] The software architecture is organized into several software layers.
[0061] A first FRMW software layer comprises low-level programs, called “firmware”. This first FRMW software layer is notably configured to manage the various hardware elements of the microcontroller.
[0062] In particular, this first FRMW software layer comprises a set of LDRV drivers. These LDRV drivers may be HAL drivers (abbreviation for Hardware Abstraction Layer) or LL drivers (abbreviation for Low Level). The HAL and LL drivers allow communication interfaces and external memories to be controlled. In particular, the HAL and LL drivers allow, for example, commands to be sent to an external memory, in particular to define an operating frequency or a number of data lines for communicating with the microcontroller.
[0063] For example, these “HAL” drivers may include: - a driver to control an “SPI” bus (abbreviation for “Serial Peripheral Interface”), and / or - a driver to control an “xSPI” bus, and / or - a driver to control an “SD” card, and / or - a driver for controlling an embedded multimedia card (also referred to by the abbreviation “EMMC”), and / or - a driver to control a “NAND” type flash memory, and / or - a driver for controlling a “NOR” type flash memory, and / or - a driver to control a random access memory of the “SRAM” type (abbreviation for “Static Random Access Memory”).
[0064] For example, “LL” drivers may include: - a driver to control an “SD” card or an “MMC” card (from the English “Multimedia Card”), and / or - a driver to control a flexible memory controller “FMC”.
[0065] The first FRMW software layer includes “CMSIS” interface programs (abbreviation for “Common Microcontroller Software Interface Standard”) which describe hardware interfaces of the microcontroller including peripherals for communication with external memories and all associated programmable registers.
[0066] A second MDLW software layer comprises an intermediate level EXTMEM_M management software module, called “middleware”. This EXTMEM_M management software module is configured to initialize a C0M_I communication interface and communicate with the EXTMEM external memory. This EXTMEM_M management software module is configured to be used by APRG application programs (in English “software”).
[0067] The EXTMEM_M management software module includes BT_M boot management programs (in English “boot manager”).
[0068] These BT_M boot management programs can be called by the APRG application programs. The BT_M boot management programs are intended to implement a mode of execution of the APRG application programs stored in the external memory EXTMEM.
[0069] In particular, two execution modes can be implemented. A first execution mode makes it possible to execute the APRG application programs from the external memory EXTMEM. This first execution mode can be implemented when the external memory EXTMEM is associated with a predefined address that can be used by the microcontroller MCU to execute an APRG application program.
[0070] A second execution mode makes it possible to execute APRG application programs stored in the external memory EXTMEM from the internal memory INTMEM of the microcontroller MCU or in another external memory. In particular, this second execution mode makes it possible to copy into the internal memory INTMEM of the microcontroller (in particular into the IDATZ zone of the internal memory INTMEM) or into another external memory (not shown) the APRG application programs to be executed initially stored in the external memory EXTMEM. This second execution mode then makes it possible to execute the copied APRG application programs.
[0071] When executing an APRG application program, the MCU microcontroller is configured to use a link file to establish a correspondence between addresses used by an application program and memory locations where the data used by this application program are stored. This link file depends on the execution mode used because it provides the addressing of codes and data in external memory EXTMEM or in internal memory INTMEM.
[0072] The EXTMEM_M management software module also includes EXTMEM_D driver programs. These EXTMEM_D driver programs are configured to manage different EXTMEM external memory technologies. These EXTMEM_D driver programs are configured to control the EXTMEM external memory. These EXTMEM_D driver programs are also dependent on the standards associated with the various EXTMEM external memory technologies. When no protocol is associated with an EXTMEM external memory, then the EXTMEM_D driver programs use custom communication parameters to control that EXTMEM external memory.
[0073] These EXTMEM_D driver programs can be configured to initialize a communication with the EXTMEM external memory, in particular when the EXTMEM external memory used is a serial Flash memory configured to use the “SFDP” protocol (abbreviation for “Serial Flash Discoverable Parameter”), published under the reference JESD216F.02 by the “JEDEC” (abbreviation for “Joint Electron Device Engineering Council”). This communication allows the EXTMEM_D driver programs to retrieve communication parameters associated with the EXTMEM external memory. The initialization is then carried out with minimal communication parameters, in particular by using a single data line and a minimal frequency, for example of the order of 50 MHz.
[0074] These communication parameters may include an indication of the number of data lines to be used to carry out communication between the external memory EXTMEM and the microcontroller MCU. These communication parameters may also include a maximum operating frequency of the external memory EXTMEM. These communication parameters may also include a latency time between write accesses and read accesses to the external memory.
[0075] These communication parameters are then used by the EXTMEM_D driver programs to control the EXTMEM external memory, in particular to use commands for writing, reading and erasing data in the external memory.
[0076] For example, the EXTMEM_D driver programs include: - a D_SFDP driver program for controlling an “SFDP” flash memory, in particular of the “NOR” type, and / or - a D_PSRAM driver program to control a “PSRAM” type RAM (abbreviation for “Pseudo Static Random Access Memory”), - a D_SD driver program to control an “SD” card, - a D_NAND driver program to control a “NAND” type flash memory, - a D_CFI driver program for controlling a common flash memory interface (also referred to by the abbreviation “CFI”), in particular of the “NOR” type, and / or optionally, - a D_CST driver program to use a configured DCUST custom driver to control an external memory not defined by a protocol
[0077] In particular, the EXTMEM_D driver programs make it possible to support “JEDEC” protocols which define the operation of certain memories, such as serial flash memories configured to use the “SFDP” protocol.
[0078] The EXTMEM_M management software module also includes a set I_SAL of “SAL” (short for “Software Adaptation Layer”) interface programs. The “SAL” interface programs are configured to use the “HAL” drivers to control the microcontroller. The “SAL” interface programs are configured to be used by the EXTMEM_D driver programs of the EXTMEM_M management software module.
[0079] For example, the interface program set I_SAL includes: - a SAL_XSPI interface program to use the HAL_XSPI driver to control an “xSPI” bus, this SAL_XSPI interface program can be used by the D_SFDP, D_PSRAM and D_CFI driver programs, - a SAL_SD / MMC interface program to use the HAL_SD and HAL_EMMC drivers to control an "SD" card and an embedded multimedia card, this SAL_SD / MMC interface program can be used by the D_SD driver program, - a SAL_SPI interface program to use the HAL_SPI driver to control an “SPI” bus, this SAL_SPI interface program can be used by the D_SD driver program, - a SAL_FMC interface program to use the HAL_NAND, HAL_NOR and HAL_SRAM drivers, this SAL_FMC interface program can be used by the D_NAND, D_PSRAM, and D_CFI driver programs.
[0080] The EXTMEM_M management software module also includes a programming interface (not shown) serving as an entry point for APRG application programs wishing to use the EXTMEM external memory. This programming interface is configured to provide functions for controlling the EXTMEM external memory for APRG application programs using this EXTMEM external memory.
[0081] For example, these functions can be used to initialize the external memory EXTMEM, to read, write or overwrite data in the external memory EXTMEM.
[0082] This programming interface is unique for all EXTMEM external memories supported by the EXTMEM_M management software module. It is therefore easier for a user to change EXTMEM external memory.
[0083] [Fig.4] illustrates a mode of implementation of a method for managing an external memory EXTMEM by an MCU microcontroller.
[0084] The method comprises a step 40 in which the PRC processor of the MCU microcontroller initializes the memory interface hardware peripheral and executes the EXTMEM_M management software module.
[0085] The execution of the management software module EXTMEM_M causes a control 41 of the external memory EXTMEM using the LDRV driver configured to control the communication interface C0M_I used to establish communication between the processor PRC and the external memory EXTMEM.
[0086] The control 41 of external memory EXTMEM is also exercised by using at least one communication parameter associated with the external memory EXTMEM. This makes it possible to obtain better performances in the control of the external memory EXTMEM by using a number of data lines and a maximum frequency associated with the external memory EXTMEM.
[0087] [Fig.5] illustrates an embodiment of a software architecture allowing load an APRG application program into an external EXTMEM memory used by an MCU microcontroller.
[0088] The software architecture comprises a first software layer FRMW and a second software layer MDLW such as those described previously.
[0089] In particular, the second software layer MDLW comprises a management software module EXTMEM_M as described previously. This management software module EXTMEM_M may be a second instance of the module EXTMEM_M previously described. This second instance is then dedicated solely to allowing the control of the external memory EXTMEM for the loading of an application program. This second instance is then temporarily stored in the internal memory INTMEM of the microcontroller MCU, in particular in a volatile part (not shown) of the internal memory INTMEM.
[0090] The second software layer also comprises an external memory loader software module EXTMEM_L. The loading software module EXTMEM_L is configured to allow communication between different development tools IDE_T (see [Fig.7]) or loading tools and the external memory EXTMEM in order to load an application program APRG into the external memory EXTMEM. This loading software module EXTMEM_L is then stored in the internal memory INTMEM of the microcontroller MCU, in particular in a volatile part of the internal memory INTMEM, then executed from this internal memory INTMEM to load the application program APRG into the external memory EXTMEM from a development tool using an entry point of this loading software module EXTMEM_L.
[0091] In particular, the EXTMEM_L loading software module makes it possible to carry out a loading an application program from external memory using the EXTMEM_M management software module. Loading from external memory aims to install application programs and / or data into external memory.
[0092] The EXTMEM_L loading software module is configured to allow the loading of an application program into the EXTMEM external memory by different IDE_T development tools (also designated by the abbreviation “IDE” from the English “Integrated Development Environment”) or by different application program loading tools.
[0093] For example, the EXTMEM_L loading software module can be used by the “IAR Embedded Workbench for Arm®” development tool (IDE_T#1), or by the “Arm® Keil MDK” development tool (IDE_T#2), or by the “STM32Cube®” development tool (in particular “STM32CubeIDE” and “STM32CubeProg”) (IDE_T#3). The EXTMEM_L loading software module can also be used by an application program loading tool.
[0094] The EXTMEM_L loading software module makes it easier to load an APRG application program into different types of EXTMEM external memory and for different IDE_T development tools using the EXTMEM_M management software module.
[0095] In particular, the EXTMEM_L loading software module comprises an API_IDE programming interface serving as entry points for different IDE_T development tools (IDE_T#1, IDE_T#2, IDE_T#3) or loading. The EXTMEM_L loading software module is configured to take into account the requirements of each IDE_T development tool to define the different entry points.
[0096] The EXTMEM_L loading software module also includes a CRE core comprising a WRPM encapsulation module (in English "wrapper"). This WRPM encapsulation module is configured to allow communication between an IDE_T development or loading tool and the EXTMEM_M management software module. The WRPM encapsulation module therefore makes it possible to benefit from the advantages of the EXTMEM_M management software module, and thus to simplify the management of the EXTMEM external memory when loading an application program into this EXTMEM external memory. The WRPM encapsulation module can also give the user the freedom to define their own management of access to the external memory.
[0097] In particular, this WRPM encapsulation module is configured to call functions provided by the EXTMEM_M management software module upon request from the IDE_T development or loading tool.
[0098] For example, requests from the IDE_T development tool or loading can be requests to write, read, or erase external memory. The WRPM encapsulation module can then use the external memory initialization, writing, reading, and erasing functions provided by the management software module.
[0099] The use of such an EXTMEM_L loading software module makes it possible to benefit from the advantages provided by the EXTMEM_M management software module by optimally controlling the EXTMEM external memory to load an APRG application program there. In particular, the EXTMEM_M management software module makes it possible to load the APRG application program into the EXTMEM external memory using the number of data lines and the maximum frequency associated with the EXTMEM external memory. This thus makes it possible to load the APRG application program more quickly into the EXTMEM external memory.
[0100] The CRE core also includes a SYSTICK clock module configured to control the internal clock of the microcontroller. This SYSTICK clock module is configured to use a "HAL_PRC" driver of the microcontroller processor. This SYSTICK clock module allows the internal clock of the microcontroller to be simply controlled.
[0101] The loading software module EXTMEM_L may also comprise a DBGM debugging module. This DBGM debugging module is configured to execute a main function comprising a series of tests in order to evaluate whether all the services of the loading software module EXTMEM_L are functioning correctly. The series of tests may comprise a test of writing data into the external memory EXTMEM and / or a test of erasing a sector of the external memory EXTMEM and / or a test of initializing the external memory EXTMEM and / or a test of reading data stored in the external memory EXTMEM. This DBGM debugging module is configured to call via the encapsulation module functions provided by the management software module DBGM. Such a DBGM debugging module makes it possible to simply debug the loading software module EXTMEM_L.Such a DBGM debugging module thus simplifies the development of an APRG application program by allowing the user to ensure that the EXTMEM_L loading software module is functioning correctly.
[0102] [Fig.6] illustrates a mode of implementation of a loading method, by a IDE_T development tool or loading of an application program into an external memory EXTMEM used by an MCU microcontroller.
[0103] The method comprises a step 60 in which the processor PRC of the microcontroller MCU executes the loading software module EXTMEM_L, at the request of the development tool IDE_T or loading to load said application program APRG into the external memory EXTMEM. In particular, the request of the IDE_T development tool or loader is received via the API_IDE programming interface.
[0104] The execution of the loading software module EXTMEM_L by the microcontroller, at the request of the development tool IDE_T or loading, results in an implementation 61 of the management software module EXTMEM_M in order to control the external memory EXTMEM.
[0105] The control of the external memory EXTMEM is carried out from the LDRV driver configured to control the communication interface C0M_I used to establish communication between the processor PRC and the external memory EXTMEM.
[0106] Control of the external memory EXTMEM is also exercised using at least one communication parameter associated with the external memory EXTMEM.
[0107] The control of the external memory EXTMEM then makes it possible to load the application program into the external memory.
[0108] [Fig.7] illustrates a CPTR computer configured to execute a CMX software tool for generating executable code by a microcontroller MCU using an external memory EXTMEM. Such a CMX software tool for generating executable code is configured to implement the code generation methods illustrated in Figures 8 and 9. The CPTR computer is also configured to execute an IDE_T development or loading tool for developing and then loading an application program APRG into the external memory EXTMEM.
[0109] [Fig.8] illustrates a method for generating executable code by an MCU microcontroller making it possible to generate an EXTMEM_M software module for managing external memory as described previously.
[0110] Such a method is implemented by the CMX code generation software tool.
[0111] The CMX software tool is configured to use a graphical interface displayed on the CPTR computer to allow a user to provide information regarding the external memory EXTMEM_M that he wishes to use with the MCU microcontroller.
[0112] Such a method is configured to construct the first FRMW software layer and to configure the EXTMEM_M management software module to adapt it to the EXTMEM external memory used.
[0113] In particular, the method comprises a step 80 in which the user indicates that he wishes to use the EXTMEM_M management software module to control one or more EXTMEM external memories.
[0114] The method then comprises a step 81 in which the user enters the different types of external memories that can be used by the MCU microcontroller. For example, the user can enter that he wants the microcontroller to support “SFDP” memories, “PSRAM” memories or even memories custom not defined by a protocol.
[0115] The fact of informing the external memories to be supported makes it possible to reduce the memory occupation of the management software module by limiting it to the external memories to be supported.
[0116] The user also provides the C0M_I communication interface used to communicate with each external memory. For example, the user can provide that the communication interface used is the I_XSPI interface and / or the I_SD interface.
[0117] The method then comprises a step 82 in which the user configures each external memory EXTMEM. In particular, the user enters the driver program EXTMEM_D used to control each external memory as well as the configuration used to communicate with the microcontroller MCU.
[0118] If the user specifies that the external memory EXTMEM will be controlled by the driver program D_SFDP corresponding to the driver “SFDP”, then the user can also specify the communication interface to be used (in particular the interface I_XSPI) as well as the number of data lines to be used (for example eight lines for data on eight bits).
[0119] If the user specifies that the external memory EXTMEM will be controlled by the driver program D_PSRAM, then the user can also specify the communication interface to be used (in particular the I_XSPI interface) as well as the number of data lines to be used (for example sixteen lines for sixteen-bit data). The communication parameters are also specified by the user, such as the memory size and the maximum frequency of the memory, in order to define commands and a configuration to correctly control the external memory EXTMEM. It is also possible to define commands to control the external memory.
[0120] The method then comprises a step 83 in which the user provides the execution mode of the application programs. In particular, the user can choose said first execution mode in which the application programs are executed from the external memory, or said second execution mode in which the application programs are executed from the internal memory INTMEM of the microcontroller or from another external memory allowing execution of programs (for example an external memory of the “PSRAM” type) after having been copied there.
[0121] The method then comprises a step 84 of generating a file corresponding to the management software module EXTMEM_M as described previously in relation to [Fig.l], taking into account the information provided by the user.
[0122] The method also comprises a step 85 in which the CMX code generation software tool generates a linker file adapted to the EXTMEM_M management software module depending on the microcontroller and the IDE_T development or loading tool used. The link file allows a correspondence to be established between addresses used by an APRG application program and memory locations where the data used by this application program are stored.
[0123] The method then comprises a step 86 in which the management software module EXTMEM_M and the link file are integrated into an IDE_T development or loading tool. In this way, this development or loading tool can then integrate the management software module EXTMEM_M into the boot area of the internal memory INTMEM of the microcontroller.
[0124] [Fig.9] illustrates a method for generating executable code by an MCU microcontroller making it possible to generate an EXTMEM_L external memory loading software module as described previously.
[0125] Such a method is implemented by the CMX code generation software tool.
[0126] The CMX software tool is configured to use a graphical interface displayed on a CPTR computer to enable a user to provide requested information.
[0127] The method firstly comprises a step 90 in which the user enters the IDE_T development or loading tool(s) that he wishes to use in the CMX software tool.
[0128] The method then comprises a step 91 in which the CMX software tool generates a file corresponding to the EXTMEM_L loading software module from the IDE_T development tools or loading tools entered by the user. In particular, the CMX software tool defines in particular the entry points of the EXTMEM_L loading software module (i.e. the API_IDE programming interfaces) for the IDE_T development tools. The CMX software tool also generates a second instance of the file corresponding to the EXTMEM_M management software module as described previously.
[0129] The method then comprises a step 92 in which the file corresponding to the loading software module EXTMEM_L and the second instance of the management software module EXTMEM_M are integrated into a development tool IDE_T or loading tool among those previously entered by the user. In this way, this development or loading tool can then integrate the loading software module EXTMEM_L and the second instance of the management software module EXTMEM_M into the internal memory INTMEM of the microcontroller. The development or loading tool can then use an entry point of the loading software module EXTMEM_L to load an application program into the external memory EXTMEM of the microcontroller.
Claims
Claims
1. Microcontroller comprising: - a processor (PRC), - a communication interface (COM_I) configured to allow communication between the processor (PRC) and an external memory (EXTMEM), - an internal memory (INTMEM) storing: • at least one driver (LDRV) configured to control said communication interface when it is executed by said processor, • a management software module (EXTMEM_M) configured to control the external memory (EXTMEM) using said at least one driver as well as at least one communication parameter associated with said external memory when it is executed by said processor.
2. Microcontroller according to claim 1, wherein said management software module (EXTMEM_M) comprises a programming interface serving as an entry point for application programs (APRG) wishing to use the external memory (EXTMEM).
3. Microcontroller according to any one of claims 1 or 2, in which said management software module (EXTMEM_M) comprises: • a driver program (EXTMEM_D) configured to control said external memory (EXTMEM) from said at least one communication parameter associated with this external memory (EXTMEM), • at least one interface program (EXTMEM_I) configured to allow said driver program (EXTMEM_D) to use said at least one driver (DRV) to control said external memory (EXTMEM).
4. Microcontroller according to one of claims 1 to 3, in which said management software module (EXTMEM_M) is stored in a boot zone (BTZ) of the internal memory (INTMEM) so as to be executed by said processor (PRC) when the microcontroller is started.
5. Microcontroller according to one of claims 1 to 5, wherein said at least one communication parameter associated with the external memory is chosen from a number of data communication lines, a maximum communication frequency and a latency time between write accesses and read accesses to the external memory.
6. Microcontroller according to one of claims 1 to 7, in which the management software module (EXTMEM_M) includes a boot program configured to allow, depending on a defined execution mode, execution of an application program, stored in the external memory, from the external memory or from the internal memory or from another external memory after having copied the application program there.
7. Microcontroller according to one of claims 1 to 6, wherein the internal memory (INTMEM) further stores a loading software module (EXTMEM_L) configured to allow a development tool (IDE_T) or loading tool to load an application program into the external memory (EXTMEM) using said management software module (EXTMEM_M).
8. Microcontroller according to claim 7 in which the loading software module (EXTMEM_L) comprises: - a programming interface (API_IDE) configured to receive requests from the development or loading tool, - an encapsulation module (WRP) configured to use the management software module (EXTMEM_M) to load an application program into the external memory upon request from the development or loading tool.
9. A microcontroller according to any one of claims 7 or 8, wherein the loading software module comprises a debugging module (DBGM) configured to execute a series of tests to evaluate whether the loading software module is functioning correctly.
10. Computer system comprising an external memory (EXTMEM) and a microcontroller comprising: - a processor (PRC), - a communication interface (COM_I) configured to allow communication between the processor (PRC) and said external memory (EXTMEM), - an internal memory (INTMEM) storing: • at least one driver (LDRV) configured to control said communication interface when it is executed by said processor, • a management software module (EXTMEM_M) configured to control the external memory (EXTMEM) using said at least one driver as well as at least one communication parameter associated with said external memory when it is executed by said processor.
11. Method for managing an external memory (EXTMEM) by a micro- controller (MCU) comprising an execution, by a processor (PRC) of the microcontroller (MCU), of a management software module (EXTMEM_M) stored in an internal memory (INTMEM) of the microcontroller (MCU), the execution of the management software module (EXTMEM_M) causing a control of the external memory (EXTMEM) using: - at least one driver (LDRV) configured to control a communication interface (C0M_I) allowing communication between the processor (PRC) and the external memory (EXTMEM), and - at least one communication parameter associated with the external memory (EXTMEM).
12. Method for loading, by a development tool (IDE_T) or loading, an application program into an external memory used by a microcontroller, the method comprising an execution, by a processor of the microcontroller (MCU), of a loading software module, stored in an internal memory of the microcontroller, at the request of the development or loading tool to load said application program into the external memory, the loading software module using a management software module (EXTMEM_M) in order to control the external memory (EXTMEM) from: - at least one driver (LDRV) configured to control a communication interface (COM_I) allowing communication between the processor (PRC) and the external memory (EXTMEM), and - at least one communication parameter associated with the external memory (EXTMEM).
13. Software tool for generating code executable by a microcontroller comprising: - a graphical interface adapted to allow entry of a type of external memory to be used with a microcontroller, - a code generation module suitable for generating a management software module configured to control external memory (EXTMEM) using: • at least one driver (LDRV) configured to control a communication interface (COM_I) allowing communication between a processor (PRC) of the microcontroller (MCU) and the external memory (EXTMEM), and • at least one communication parameter associated with external memory (EXTMEM).
14. Software tool according to claim 13, wherein the code generation module is also adapted to generate a loading software module configured to allow a development tool (IDE_T) or loading tool to load an application program into the external memory (EXTMEM) using said management software module (EXTMEM_M).
15. Method for generating executable code by a microcontroller, the method comprising: - an input, via a graphical interface of a software tool for generating executable code, of a type of external memory to be used with a microcontroller, - a generation, by a code generation module, of said software tool, of a management software module configured to control the external memory (EXTMEM) using: • at least one driver (LDRV) configured to control a communication interface (COM_I) allowing communication between a processor (PRC) of the microcontroller (MCU) and the external memory (EXTMEM), and • at least one communication parameter associated with the external memory (EXTMEM).
16. Method according to claim 15, further comprising: - a generation, by said code generation module, of a loading software module configured to allow a development tool (IDE_T) or loading tool to load an application program into the external memory (EXTMEM) using said management software module (EXTMEM_M), and - an integration, by said development tool (IDE_T) or loading tool, of the loading software module and the management software module into the internal memory of said microcontroller.
Citation Information
Patent Citations
System and method thereof
US20070198703A1
Runtime flash device detection and configuration for flash data management software
US20070291552A1
Unified support for solid state storage
US20080229046A1