Home
STM32 Demonstration Builder developer guide
Contents
1. Doc ID 023271 Rev 1 ky UM1550 Development platform core 3 4 2 The startup window is launched by the GL Startup function to indicate that the initialization phase is going to start After this initialization step the message on the screen changes The user can use the GL State Message in the MOD Liblnit function to view the startup progress of the libraries and stacks Figure 16 Start initialization USB host starting The user should at least indicate the beginning and the end of the initialization phase of a library or stack and also add a message in the console cache so that if an error occurs the startup phase can be analyzed Main menu window Figure 17 Main menu window Note Current background process Date STM32 Demonstration Buibder Group Zone Modules Zone System Time and Date 14 30 56 18 May 2012 The icons used in this demonstration are taken from http commons wikimedia org wiki Crystal_Clear Modules Zone the click event on the icon launches the module startup handler System Time and Date the update of the time and date are done by the kernel background task and can be re adjusted in the Calendar Modules gt Settings menu Group Zone the group zone contains the groups of modules A group is set of modules that have the same functions The main menu holds the entire group of modules and the module icons of the highlighted group and enables you to l
2. C71 UM1550 Sf i User manual STM32 Demonstration Builder developer guide Introduction The STM32 family of 32 bit Flash microcontrollers based on the ARM Cortex M processor is designed to offer new degrees of freedom to MCU users It offers a 32 bit product range that combines high performance real time capabilities digital signal processing and low power low voltage operation while maintaining full integration and ease of development The unparalleled and large range of STM32 devices based on an industry standard core and accompanied by a vast choice of tools and software makes this family of products the ideal choice both for small projects and for entire platform decisions The STM32 Demonstration Builder platform is a completely new way to deliver a demonstration that can also be fully or partly reused in real applications It relies on a full set of software components provided with flexible licensing schemes to allow easy reuse and redistribution All these components are organized within a module architecture that allows them to be reused separately in standalone applications The versatility of STM32 Demonstration Builder platform allows the dynamic addition of modules granting access to common ressources storage graphical components and widgets memory management The STM32 Demonstration Builder platform is built around the STM32 graphical library and the FreeRTOS real time operating system and uses almost the e
3. ST and the ST logo are trademarks or registered trademarks of ST in various countries Information in this document supersedes and replaces all information previously supplied The ST logo is a registered trademark of STMicroelectronics All other names are the property of their respective owners 2012 STMicroelectronics All rights reserved STMicroelectronics group of companies Australia Belgium Brazil Canada China Czech Republic Finland France Germany Hong Kong India Israel Italy Japan Malaysia Malta Morocco Philippines Singapore Spain Sweden Switzerland United Kingdom United States of America www st com 44 44 Doc ID 023271 Rev 1 ky
4. This function is the callback of the module called periodically in the main background task It can be used to refresh the application status and some GL controls MODULE action callbacks Buttons and other module page control actions should be implemented statistically in the MOD xxx c file using the rules outlined in Table 9 Table 9 Module action callback functions Functions Description Should be implemented in all the modules and static void return to menu void enable the module to return to the main menu by selecting the return item in the menu Used to move to pageN when the corresponding static void goto pageN void action is activated Used to close the current module sub page and static void return_from_pageN void return to the module s main menu Direct access feature The modules are designed to operate in standalone mode and are independent from other modules However in some cases some parts of a module may be re used by other modules For example the camera viewer uses the image browser module to display the image captured previously Such a feature is called direct access and generally named MODULE DirectEx Depending on the action of the direct access function the parameters may defer from module to module The MODULE DirectEx function is exported in the modules file to be seen by all the loaded modules The MODULE DirectEx function directly calls the MODULE CreatePage functi
5. d STM32F2x7 ETH Driver i STM32F2xx StdPeriph Driver m STM32F4x7 ETH Driver ii STM32F4xx StdPeriph Driver a Project di Config J Core jj EWARM J MDK ARM j Modules di TrueSTUDIO Utilities The project is composed of three main directories and organized as follows Libraries This directory contains the STM32 graphical library and hardware abstraction layer the standard peripheral libraries the host and device libraries the STM32 USB OTG driver the CMSIS files and the STM32 standard peripheral driver Project This directory contains the workspace and source files for the modules and the demonstration builder core Utilities This directory contains the STM32 EVAL boards drivers LCD SD card buttons touchscreen and STM32 Audio Utilities amp add ons mixer equalizer It also contains the open source third party software file system FatFS used for the USB host and MicroSD storage units FreeRTOS LwIP TCP IP stack and LibJpeg library Development platform files The development platform source files are located under the project folder as shown in Figure 6 Doc ID 023271 Rev 1 ky UM1550 Development platform architecture Figure 6 Development platform files a jb Project T Ex rm Config 5 Core 4 di Core Devices Devi 4 GI STM32F2x 4 evices 1 2 STM32F4xx Jo STM32F2xx 2 J Graphics J STM32
6. memory void MOD_GetParam uint16_t ID uint32_t cfg Return general or module parameters in the backup memory void MOD_NullFunc void Empty function used when a control in page uses a callback with no specific action void MOD_Prelnit void Initialize the BSP and the demonstration builder core events console void MOD_LibInit void Initialize the libraries and show the startup phase progress and mount the storage Unit 1 SD void MOD_HandleModulesBackground void Handle module background processes in the main background task void MOD_HandleModulesClanup void Handle module cleanup processes in the USB disconnect callbacks usbh usr c void MOD_RegisterClickHandler void pEventHandler void GL_Coordinate_TypeDef gRect Associate a click event in a predefined screen area void MOD_UnRegisterClickHandler void Dissociate a click event in a predefined screen area MOD_fClickHandler void Handle click event handler in the main background task void vApplicationMallocFailedHook void Memory management error callback Application data structures and variables MOD InitTypeDef typedef struct MOD InitTypeDef uinti16 t id uinti16 t rev uint8 t name uint8 t icon void startup void void background void void cleanup void Doc ID 023271 Rev 1 29 44 Development platform core UM1550 3 4 3 4 1 30 44 M
7. 28 44 Table 6 Graphic API functions Functions void GL Startup void Description Show the initialization progress as the first display Screen uint32 t GL Init void Initialize the screen display the main menu and apply the retrieved data from the backup memory Void GL ShowMainMenu void Display the main menu this function can be used by module to return to the demonstration menu page Void GL Handle Inputs void Handle the HMI inputs joystick and touch screen void GL State Message uint8 t msg Display the initialization progress state when loading modules and libraries void GL HandleSystemSettingsChange void Apply settings if they were changed void GL ShowConnectivityGroup void Display the connectivity group page void GL ShowMultimediaGroup void Display the multimedia group page void GL ShowUtilitiesGroup void Display the utilities group page Doc ID 023271 Rev 1 UM1550 Development platform core 3 2 2 3 3 4 Modules manager APIs The modules manager APIs is a set of functions that handles the demonstration builder s core process and functions Table 7 Modules manager API functions Functions uint8 t MOD AddModule MOD InitTypeDef module uint8 t group Description Add a module to the modules list void MOD SetParam uint16 t ID uint32 t cfg Save general or module parameters in the backup
8. Cornmand wrapp er Module core functions The command wrapper layer is only used when the background feature is enabled for this module This layer should not have any dependency with the module s graphical components and controls Typical use of the background feature includes the audio player and web server applications For example an audio sample file could be played and controlled by the wrapper without passing through the audio player s graphical menu A module that implements the background feature should be able to disable the background mode on the fly when launching the module from the module s main menu and the page s graphical aspect should be synchronized with the core functions For example if an audio file is being played in background mode when the audio player is launched the corresponding page should indicate the specificities of the sample currently being processed file name progress To implement the background feature the following structure should be implemented in the module typedef struct BKGND InitTypeDef void init void void process uint8 t cmd void args void quit void BKGND InitTypeDef Init initialize the module s core function Process launch the process corresponding to the cmd parameters the args can take the command arguments and parameters Quit de initialize the module s core and quit the background mode If a module implements the backgr
9. UM1550 Development platform core Figure 9 Demonstration modules pU 3 1 1 Touchscreen drivers driver Library i Drivers Main module kernel Application startup task E Module Fenis C19 Storage modules library USB MS and Module SO 1H98 SD card manager Module Module 3 4 LCD STM32 Eval board STM32 Standard Firmware Additional modules Application startup The development platform starts by initializing the main background task int main void NVIC_PriorityGroupConfig NVIC_PriorityGroup_4 Create background task xTaskCreate Background_Task Background Task Background_Task_STACK NULL Background_Task_PRIO amp Task Handle Start scheduler vTaskStartScheduler The background task starts by initializing the BSP to launch the LCD touch screen and joystick so as to handle the input events It then loads the user modules in the demonstration builder core module list to be handled later by the demonstration builder core and initializes the console to gather the demonstration builder core and module messages during the startup phase and while the modules are running Doc ID 023271 Rev 1 15 44 Development platform core UM1550 3 1 2 16 44 Once the BSP and the console are initialized the background task displays the initialization page showing the startup progress state and then initializes the different middleware libraries US
10. Various configuration options Multiple volumes physical drives and partitions Multiple ANSI OEM code pages including DBCS Long file name support in ANSI OEM or Unicode RTOS support Multiple sector size support Read only minimized API I O buffer FAT sub types FAT12 FAT16 and FAT32 Number of open files unlimited depends on available memory Number of volumes up to 10 File size Depends on FAT specifications up to 4 G 1 bytes Volume size Depends on FAT specifications up to 2 Tbytes on 512 bytes sector Cluster size depends on FAT specifications up to 64 kbytes on 512 bytes sector Sector size depends on FAT specifications up to 4 kbytes File operations to different volumes are always re entrant ant can work simultaneously File operations to the same volume are not re entrant but can also be configured to be accessed by several file instances in a safe way with the FS REENTRANT option In this case the OS dependent synchronization object control functionalities ff cre syncobj ff del syncobj ff req grant and ff rel grant must be added to the project When a file function is called while the volume is in use by another task the file function is suspended until that task leaves the file function If the wait time exceeds a period defined by _ TIMEOUT the file function aborts with FR TIMEOUT The timeout feature may not be supported on some RTOS There is an exception for the f mount and f
11. function AddRadioOption function NewSlidebar function NewHistogram function NewGraphChart function NewComboBoxGrp function AddComboOption function Create PageObj function AddPageControlObj function DestroyPageControl function DestroyPage function Set Label function Get Label function Get SlidebarValue function SetGraphChartPoints function SetHistogramPoints function GetObjStatus function GetComboOptionActive function ResetComboOptionActive function GetComboOptionLabel function SetComboOptionLabel function Setlconlmage function ShowPage function RefreshPage function RefreshPageControl function ChangePage function Doc ID 023271 Rev 1 UM1550 Development platform core 3 1 3 Graphical extensions Additional graphical components features and functionalities have been added to enrich the graphical API set so as to improve the graphical aspect of the modules These components are listed in Table 3 Table 3 Graphical extensions Function AddlconControlObj Description Add an icon menu with event handler and caption in the page GL SetMenultem Add a list menu in the page GL RefreshControlNow Refresh a graphical control in the page immediately GL RefreshLabel Refresh a label caption immediately GL CenterCaption Center a text in a buffer GL SetPageHeader Add a page header to show the page caption GL SetChecked Set or reset a check box during graphical co
12. mkfs functionalities since these functions are not re entrant to the same volume When these functions are used all other tasks must close the corresponding file on the volume and avoid accessing the volume Note that this section describes the re entrance of the FatFS module itself The low level disk I O layer must also be re entrant By default the FatFS module does not support the sharing of controls of duplicated file accesses Sharing is permitted when an open operation to a file is in read mode only The duplicated open operation in write mode to a file is always prohibited and the open file must not be renamed or deleted or the FAT structure on the volume may collapse The file sharing control may also be available when FS SHARE is set to 1 or greater The value specifies the number of files to manage simultaneously In this case if any open rename or remove operation violates the file sharing rule described above the file function fails with FR LOCKED If the number of open files is larger than that specified in FS SHARE the f open function fails with FR TOO MANY OPEN FILES Doc ID 023271 Rev 1 23 44 Development platform core UM1550 3 1 5 LCD display and HMI inputs The graphical hardware abstraction layer HAL controls the TSC LCD and JOYSTICK controllers using the following files e LcdHal HAL layer file Contains all the LCD basic API declarations STM32 for this delivery e JoyHal HAL layer file Contains all
13. structures are seen by the application as objects with encapsulated properties and methods In the end they are advanced structures containing the following e Properties as data fields e Methods as function pointers In this way each API function belongs to the related graphic object instance and many graphic objects can be managed simultaneously without conflict Every type of graphic object has a pre event function that provides the process to change its visualization on the screen and the internal status of the object For example in a ComboBox when the user hits the down arrow the pre event function changes the associated image showing the one Doc ID 023271 Rev 1 17 44 Development platform core UM1550 18 44 associated with the highlighted event for a few moments and sets the next option in the list as active This function is predefined for each type of object and very useful in minimizing the developer s workload In this way the developer need only place graphic objects on the Screen page and write a function event that is called after the pre event function when a touch click event occurs between the object s coordinates area The library exports the following public and global API functionalities to create the graphic objects type structure instance and set get the relative properties NewLabel function NewButton function NewSwitch function NewCheckbox function Newlcon function NewRadioButtonGrp
14. the joystick management function declarations e TscHal HAL layer file Contains all the touch screen management function declarations of the TSC controller used by the application The STM32 graphic library uses the HAL layers mentioned above to monitor the graphical pages and control actions depending on the user action The GL Background Handler function is used by the background task to monitor the HID events in polling mode every 50 ms Figure 14 LCD display and HMI inputs LCD touch screen Joystick user buttons Note The joystick can be disabled using the general configuration page of the system module 24 44 Doc ID 023271 Rev 1 ky UM1550 Development platform core 3 1 6 RTOS and memory management The development platform is built around the FreeRTOS real time operating system FreeRTOS is a scaleable real time demonstration builder core designed specifically for small embedded systems Its highlights include e FreeRTOS demonstration builder core with preemptive cooperative and hybrid configuration options e Official support for 27 architectures counting ARM7 and ARM Cortex M3 as one architecture each e Support of the Cortex M3 memory protection unit MPU by the FreeRTOS MPU e Small simple and easy to use design Typically a demonstration builder core binary image will be in the region of 4 to 9 kbytes e Very portable code structure predominantly written in C e Suppor
15. 37 4 7 Distant control feature 2 2 ee 39 Building a module ook ee a ee we m m Imc n d n 40 Removing a module 2 ucosuuu ahhh ee eee 41 Module development considerations 42 REVISION history euuasassdos s RR RR BORLAND 0800 08 Qe n C 43 Doc ID 023271 Rev 1 3 44 List of tables UM1550 List of tables Table 1 Applicable tools addy Sewn xe nx Rees bee baee e eee e ARR RO OE ARMOR Ros swans 1 Table 2 Demo source fileS 2 0 0 cc e ERE EES a E 12 Table 3 Graphical extensions 0 0 eh rn 19 Table 4 MSC file system interface functions 2l 20 Table 5 API f rictions 2 de te debe Bee dos pos do Rer Eo bes pun d aue Rhee er Un dg 20 Table 6 Graphic API functions 2 0 0 0 00 hh 28 Table 7 Modules manager API functions naaa aaaea 29 Table 8 Module functions for graphic management 0 00 c ee eee 34 Table 9 Module action callback functions 2 0 eee 36 Table 10 Document revision history 0 000 eee 43 4 44 Doc ID 023271 Rev 1 ky List of figures List of figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14 Figure 15 Figure 16 Figure 17 Figure 18 Figure 19 Figure 20 Figure 21 Figure 22 Development platform overview 2 0 ce rn 6 STM32 software and hardware resources 1 eee ee
16. B host library TCP IP stack RTC and MicroSD Finally the second LUN SD is mounted note that the first LUN USB is mounted during the USB host initialization phase After the initialization phase the background task starts periodically monitoring the following processes e LED toggling used to indicate the development platform state e Input events joystick and touch screen states e Graphical background process to launch the firmware actions depending on the graphical events widgets events and update the graphical page accordingly e Low power process disabling some features turning off the LCD switching the core to stop mode after a defined timeout e Module background tasks e Setting changes of the monitor system The background tasks run periodically every 10 ms and have the highest priority Certain other tasks are delayed by way of a counter Graphical library The STM32 s embedded graphic library is a firmware package that contains a collection of routines data structures and macros covering the main features of a graphic library and supporting an HID device to interact with the graphic objects touch screen joystick and pushbutton Figure 10 Embedded graphical library GUI objects and widgets Multi input GUI layer layer HAL LCD Library STM32 The library is a general purpose one and can be executed on any 8 16 32 bit CPU to guarantee maximum portability of any architecture or LCD controller
17. D 023271 Rev 1 ky UM1550 Application modules A module page can return to the application main menu by calling MODULE SwitchPage ModulePageN PAGE MENU ModulePageN is the current active module page MODULE CreatePage The MODULE CreatePage is used to create the different pages used in the module Action callbacks are implemented depending on the page control type An example of implementation is shown in the following code static void MODULE CreatePage uint8 t Page GL PageControls TypeDef item GL SetBackColor GL White GL SetTextColor GL Blue switch Page case MODULE MAIN PAGE a break case MODULE_PAGE1 Ges break case MODULE_PAGE2 s break default break The pages should be allocated dynamically using the memory management process as follows ModuleMainPage malloc sizeof GL Page TypeDef Create PageObj ModuleMainPage MODULE Startup This function is the callback of the module icon control in the main menu It is used to initialize the module s structures and data and display the module s main menu by calling the MODULE SwitchPage function MODULE SwitchPage GL HomePage MODULE MAIN PAGE MODULE Cleanup This function is the callback of the module called in the USB host disconnect event to free FS dependent resources Doc ID 023271 Rev 1 35 44 Application modules UM1550 4 5 36 44 MODULE Background
18. Fx z gete p gl ext h di Graphics gl mgr c Lib 2 gl mgr h j Mod manager E iei d User messages c jo EWARM ibi Jj MDK ARM file utils c 4 JA Modules file utils h f E libjpeg_utils c d Audio_Player libjpeg_utils h d Audio_Recorder mem utils c m m nt t m nti Pt v m int mem utils h k Calendar str utils c J Camera str utils h Common time utils c time utils h J Console Credits A Mod_manager mod core c Ji Ethernet W mod core h File Manager mY Image_Browser User gt fatfs drv c Jd Serial main c i System stm32 it c f T stm32 xx it h emp ate usbh usr c i USBD usbh usr h The demo sources are divided into four groups User Contains the main bsp and interrupt files Graphics Contains the extension features of the graphical library and the initialization of the graphical part of the development platform App Contains the functional side of the modules relative to the main task Modules Contains the core manager of the module and the graphical aspect as well as the windowing management of the modules Project settings A folder per tool chain containing the project settings and the linker files Doc ID 023271 Rev 1 11 44 Development platform architecture UM1550 Table 2 Demo source files Group Files directory Description make Contains the entry poin
19. OD InitTypeDef Id unique identifier of the module Name pointer to the module name in ASCII Icon pointer to the module icon bmp format 50 x 50 pixels Startup callback to launch the startup function of the module to initialize the module resources and the graphical constructor Background callback to launch the background functions of a module Cleanup callback to launch the cleanup functions of a module when a storage unit is removed Global variables MOD table an array that keeps the loaded modules in the memory so as to have access to their resources anytime during the run time and that also enables redrawing the main menu The MOD fable has a size of MAX MODULES NUM modules the maximum number of modules being defined in the mod core h file MOD counter holds the current number of loaded modules and is used by the GL ShowMainMenu to call the main menu and calculate exactly the position of the icon in the menu page USB OTG Core main USB core structure for the USB host libraries configured in FS mode It is used to initialize and monitor the USB host library and thus the storage unit O USB Host variable that holds the host process states enumeration control state machine class and user callbacks USB fatfs Unit 0 storage unit file system structure MSD fatfs Unit 1 storage unit file system structure Graphical aspect of the demonstration builder core Startup window Figure 15 Startup window
20. ames and show them on the LCD display with possibility to save them on the USB disk Retrieve BMP and Jpeg image from storage units and display them on the LCD display Camera streaming General app and System info Distant Control Clock and calendar and alarm System information App configuration Firmware upgrade 1 1 6 44 Software resources Figure 2 shows the different software and hardware resources used in the STM32 Demonstration Builder platform Doc ID 023271 Rev 1 a UM1550 Development platform overview Figure2 STM32 software and hardware resources STM32xxx EVAL EET n Lu x j s A A s HID Sa STM32F2xx STM32F4xx ARM Firmware Components 1 2 Firmware architecture The development platform is built with a modular architecture based on a FreeRTOS real time operating system and STM32 graphical library The system configuration and the standard peripheral settings and configuration are made through the STM32F2xx STM32F4xx standard peripheral libraries Data used by the application is stored in the external USB Flash disk and the embedded MicroSD Flash through a FAT file system FatFS Doc ID 023271 Rev 1 7 44 Development platform overview UM1550 8 44 Figure 3 Firmware architecture Audio Player camera Web server ibid Remote app control snapshot Browser USB device USB Device Misc Calendar Time S 1 1 Touch Pad DIESES e rs Te s System Info
21. and characteristics Characteristics of its form and graphical aspect Method to start up the module Method to safely shut down the module for example hot unplug for MS Flash disk Method to manage the low power mode The application body task The module s background process Distant control APIs Specific configurations Module architecture A module is composed of two main parts the graphical aspect and the set of functionalities that it offers The graphical aspect is the used frame or page with a set of visual controls used to launch and monitor the module s functionalities The module s graphical definition page draw methods and action callbacks are declared in the MOD_xxx c file with xxx being the name of the module The functionality of the module is the interaction protocol between the STM32 resources and the demonstration builder core to offer specific actions These actions are launched from the graphical control actions and located in the app_xxx c file Although the app_xxx c file is the main file to execute the action defined in the module s page control other files could be used to build multilayer functionalities if required by the module Doc ID 023271 Rev 1 33 44 Application modules UM1550 4 3 4 4 Note 34 44 Start up phase of the modules A module goes into action when its icon is clicked in the main menu window When the module s icon is selected by one of the two HMI inputs joy
22. and provides a graphical user interface GUI for any application that operates with a graphical LCD While the firmware library functions with all currently available STM32 microcontrollers this document describes the firmware library through the implementation of a graphic library for embedded systems based on the STM32 microcontroller family The library can easily be used in the user application with no in depth knowledge of the STM32 registers FSMC or I2C read write operation steps As a result using the firmware library saves significant time that would otherwise be spent coding while at the same time reducing the application development and integration costs Doc ID 023271 Rev 1 ky UM1550 Development platform core The firmware architecture is developed as separate layers and the HAL hardware abstraction layer makes it independent from the microcontroller used in the final application A set of fonts is included 8 x 12 and 16 x 24 Even though the firmware library source code is developed in ANSI C the code architecture follows an OOP object oriented programming approach The library s architecture has been designed and developed as two separate layers e API layer e HAL layer This type of architecture improves the code s re usability by splitting the application programming interface code fully portable and re usable from the hardware abstraction layer code hardware dependent and written in the LCD libr
23. ary The application programming interface layer allows the final application to use the library as a black box The library firmware encapsulation feature and exported API enable full control of the LCD and touch screen without prior in depth knowledge of the LCD registers and FSMC I2C read write operation steps for the LCD and touch screen respectively The API layer includes the following files e graphicObject c h e graphicObjectTypes cursor c h The hardware abstraction layer is built directly into the specific LCD firmware library and allows the build upon layers such as the API layer to implement their functionalities without in depth knowledge of the LCD MCU and touchscreen controller used This improves the reusability of the library code and guarantees easy portability to other LCDs MCUs and touchscreen controllers The HAL layer includes the following files e LcdHal c h e TscHal c h e JoyHal c h e Touchscreen c h The library offers an application programming interface layer that enables the final application to create pages of the graphic objects and easily use the STMPE811 touch screen controller An OOP approach is used and it is therefore possible for the application developer to create and use one or more instances of a graphic object and work with pages of the object without having to write the code to display the graphic objects every time the application changes its focus to another page Graphic object
24. aunch the module startup function when the corresponding icon is clicked by way of the joystick s middle button or by pressing it on the touch screen Doc ID 023271 Rev 1 31 44 Development platform core UM1550 3 4 3 32 44 Module main menu window Figure 18 shows the main display page for all the modules Actions 1 to 3 can be customized by the user depending on the module s functions while the last menu item is reserved for returning to the application s main menu Figure 18 Main menu window for module Module name Action 1 Action 2 Action 3 Return The name and icon shown at the top of the module s main page should be retrieved from the module structure The GL SetMenultem is used to add an action to the module s main menu for more details about function parameters see Section 3 1 3 Graphical extensions Doc ID 023271 Rev 1 ky UM1550 Application modules 4 4 1 4 2 Application modules What is a module A module is a set of functionalities with specific characteristics declared in one or more files that manage the STM32 s low level resources and that provide common and specific functions Figure 19 Architecture of modules Distant control Configuration Low Power Initialization Management module Graphical Forms proprieties Background Error Safe close down Application Process management module task Each module should provide the following functionalities
25. by the active module The storage units are fundamental components that store and retrieve media from to the USB Flash disk and the MicroSD card The file manager module allows you to explore the content of the storage unit and then launch the audio or image files directly from the file browser frame The demonstration builder core also provides some additional functionalities relative to the configuration and settings allowing them to be saved to the backup memory Demonstration builder core architecture The demonstration builder core is the backbone of the entire development platform It is built around the FreeRTOS the STM32 graphical library the USB host library and the STM32 standard library It loads the different modules and updates the graphical state and the input events following the user actions on the touch screen The core is composed of the following elements Figure 8 Figure 8 Architecture of the demonstration builder core ease a FatFS File System TCP IP STM USB Host and Device Libraries STM32 Standard Libraries Application startup task Graphical library with extensions USB host library and MicroSD driver for storage units LCD Hal and touch screen and joystick drivers RTOS FreeRTOS and memory allocation manager STM32 standard firmware library Modules manager Configuration and settings manager in backup memory Common GL resources icons and images Doc ID 023271 Rev 1 ky
26. d The functionalities implemented in the file system interface to manage the physical storage units are given in Table 4 Table 4 MSC file system interface functions Function Description disk initialize Initialize disk drive disk read Interface function for a logical page read disk write Interface function for a logical page write disk status Interface function for testing if unit is ready disk ioctl Control device dependent features Table 5 gives the full set of API functionalities provided by the file system interface Table 5 API functions Function Description f mount Register unregister a work area f open Open create a file f close Close a file f read Read file f write Write file f Iseek Move read write pointer expand file size f truncate Truncate file size Doc ID 023271 Rev 1 ky UM1550 Development platform core 4 Table 5 API functions continued Function Description f sync Flush cached data f opendir Open a directory f readdir Read a directory item f getfree Get free clusters f stat Get file status f mkdir Create a directory f unlink Remove a file or directory f chmod Change attribute f utime Change timestamp f rename Rename move a file or directory f_mkfs Create a file system on the drive f_forward Forward file data to the stream directly f_chdir Change current directory f_chdrive C
27. ect access process The return process is implemented as follows static void return from direct void ModuleDirectPage ShowPage ModuleDirectPage GL FALSE H DestroyPage ModuleDirectPage 2 vPortFree ModuleDirectPage 3 ModuleDirectPage NULL 4 ModuleBackPage ShowPage ModuleBackPage GL TRUE 5 1 Deactivate the direct access page display 2 Free the direct access page control resources 3 Free the direct access page memory 4 Assign NULL to clear the page pointer 5 Restore the caller page context by activating it e 0 e o o 4 6 Background mode feature The background feature is the ability to run an application without displaying the graphical parent page This feature enables some modules to run in parallel with other modules It is enabled from the global settings of the demonstration and launched by the corresponding module itself An example of use is to run the image browser while an audio file is being played v Enab1e background mode A module that supports the background mode should implement a command wrapper to launch its actions without necessarily going through the module s main page controls ky Doc ID 023271 Rev 1 37 44 Application modules UM1550 38 44 Figure 21 Implementation of command wrapper Application Launch the module Module main page cortrols Launch directly the module core function from the core function GL control A
28. ed to add the module in the main c file MOD InitTypeDef mod template MOD TEMPLATE UID MOD TEMPLATE VER Templates uint8 t Templates icon Template Startup Template Background Template Cleanup 3 the module s startup cleanup and background callback functions with empty body the page switch and create functions which should be updated by the user to add additional pages and associate control actions following the application s needs the first case of the page create function which should be updated to add the module s main page items if needed otherwise it can be replaced by custom page controls GL SetMenuItem Page Itemi 0 goto item1 GL SetMenuItem Page Item2 1 goto item2 GL SetMenuItem Page Item3 2 goto item3 GL SetMenuItem Page Item4 3 goto item4 GL SetPageHeader ImageMainPage Template Menu Use the gl template res cto add the module icon resources The icons should be in a bmp c array file which can be generated by the embedded resource editor GUI tools provided with the STM32 s embedded graphic objects touchscreen library package For more information about this tool and its use refer to AN3128 STM32 embedded graphic objects touchscreen library Implement the application functionality APIs in the app template c file and associate them to the module page action callbacks Export the module s unique ID UID t
29. es it shall not be deemed a license grant by ST for the use of such third party products or services or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES ST PRODUCTS ARE NOT RECOMMENDED AUTHORIZED OR WARRANTED FOR USE IN MILITARY AIR CRAFT SPACE LIFE SAVING OR LIFE SUSTAINING APPLICATIONS NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY DEATH OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE ST PRODUCTS WHICH ARE NOT SPECIFIED AS AUTOMOTIVE GRADE MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK Resale of ST products with provisions different from the statements and or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever any liability of ST
30. eturning from the modules page For this the modules structures should be stored in a table that enables retrieving them when needed MOD table is used to keep the module structure pointers while MOD counter tracks the number of loaded modules To load a module inside the modules table the MOD AddModule function is used Each module should have a unique ID otherwise the second module with the same ID will not be loaded and the MOD AddModule function returns an error Doc ID 023271 Rev 1 ky UM1550 Development platform core 3 1 8 3 2 3 2 1 Configuration and settings management The global demonstration settings are managed at startup while the module settings are applied during the module s initiation phase The various settings for each module are saved as 32 bit words inside the RTC backup registers using the following functions void MOD GetParam uinti16 t mem base uint32 t cfg void MOD SetParam uinti16 t mem base uint32 t cfg Each module can have one or more memory locations to save its internal parameters For easy use a bit field structure could be defined to give access to the module settings Common GL resources All the common graphic icons and images used by the modules and the demonstration builder cores are declared in the demonstration builder s core layer and exported to the entire platform firmware through the gl res h file Shared or exported functionalities between modules or between
31. hange current drive f_getcwd Retrieve the current directory f_gets Read a string f_putc Write a character f_puts Write a string f_printf Write a formatted string For the FatFS file system the page size is fixed to 512 bytes USB disk flashes with higher page sizes are not supported Unit 0 is built around the USB host library working in full speed mode and its software architecture is shown in Figure 12 Doc ID 023271 Rev 1 21 44 Development platform core UM1550 22 44 Figure 12 Software architecture of Unit 0 Application File system FatFS File system driver USB I O requests MS30839V1 Unit 1 is built around the SD driver using the SDIO peripheral and its software architecture is shown in Figure 13 Figure 13 Software architecture of Unit 1 Application File system FatFS File system driver MS30840V1 The FatFS is based upon the USB host mass storage class and the SD driver to allow abstract access to the physical media through standard I O methods Doc ID 023271 Rev 1 UM1550 Development platform core The FatFS is a generic FAT file system module for small embedded systems It is written in compliance with ANSI C and completely separated from the disk s I O layer Therefore it is independent of the hardware architecture and has the following specific features e Windows compatible FAT file system e Very small footprint for code and work area e
32. he module version the mod xxx c structure and any other APIs used by other modules Include the mod xxx h file in the main file and add the module to the core using the following API MOD AddModule amp mod xxx YYYY GROUP Run the STM32 Demonstration Builder project in the used tool chain to add the new module Doc ID 023271 Rev 1 ky UM1550 Removing a module 6 Removing a module Follow these steps to remove a module from the STM32 demonstration builder 1 Remove or comment the mod xxx h include file in the main file and remove or comment the module adding process MOD AddModule 2 Exclude from build the folders and groups related to the module to be removed 3 Compile the STM32 Demonstration Builder project in the used tool chain to remove the module ky Doc ID 023271 Rev 1 41 44 Module development considerations UM1550 7 42 44 Module development considerations Any interrupt that uses the FreeRTOS APIs must be set to the same priority as the kernel as configured by the configKERNEL INTERRUPT PRIORITY macro or at or below configMAX SYSCALL INTERRUPT PRIORITY for ports that include this functionality A special note for Cortex M3 Remember that Cortex M3 cores use numerically low priority numbers to represent HIGH priority interrupts which can seem counter intuitive and is easy to forget If you wish to assign an interrupt a low priority do not assign it a priority of O or other low numeric val
33. modules and the demonstration builder core are defined in the mod xxx h file Implementing these APIs Example IMAGE DirectEx GL Page TypeDef pParent uint8 t file path allows the user to launch the Image browser subpage in the image module through the file manager module when a file in the browser is selected The mod xxx h file also exports the shared variables defines and macros used by the entire platform firmware Example The CONSOLE LOG msg macro is used by all the modules and the demonstration builder core to add messages in the console regardless of whether the console is displayed or deactivated Messages are saved in the console cache and displayed when the console page is activated and displayed Application programming interface The demonstration builder core communicates with the top level application and the application modules through the graphics and the modules manager APIs The application must use the demonstration builder core APIs to have access to the modules functionalities This allows separating the modules and the application when a standalone application based on a module is to be created from the open source platform development package Graphic APIs The graphic APIs are a set of functions and methods that provides access to the GL resources and controls the visual aspects of the open source platform development package Doc ID 023271 Rev 1 27 44 Development platform core UM1550
34. ns 7 Firmware architecture llle rr 8 Architecture of modules 0 0 eer 9 Organization of folders 1 2 0 0 000 lh 10 Development platform files 2 II 11 Development platform core taSkS 0 00 cee tees 13 Architecture of the demonstration builder core 1 ee eee 14 Demonstration modules 0 00 ccc ee eee Ee a aa 15 Embedded graphical library 0 2 0 0 cee 16 Storage units dir erase Racer ke edm kde Ease ated ee abet 20 Software architecture of Unit O lllilllle RR RR RR nn 22 Software architecture of Unit 1 lll RR en 22 LCD display and HMI inputs 0 000000 cece RI en 24 Startup WINdOW iss sa iei meast hh rn rn 30 Start initialization eee eee ees 31 Main menu window lese rrr 31 Main menu window for module 0 ce ee e 32 Architecture of modules 0 0 0 ce ee es 33 Startup phase of modules 0 000s 34 Implementation of command wrapper lsselsesee n 38 Distant control feature lllseeleeeeeee eR 39 Doc ID 023271 Rev 1 5 44 Development platform overview UM1550 1 Figure 1 Development platform overview Development platform overview Audio player WAV Audio recorder and encoding WAV Communication via USART Data storage on usb flash disk USB Mass Storage Keypad HID y Image Browser uw Web Server Capture fr
35. nstruction GL IsChecked Check whether a checkbox is checked or not GL AddScroll GL AddSmalllconControlObj Add a scroll bar in a page Add a small icon menu with event handler and caption in the page GL AdjustColor Invert pixel color RGB to BGR during bitmap drawing GL AddCalendar Add a calendar widget GL UpdateCalendar Update a calendar widget by changing the day month or year in run time Storage units The demonstration builder core offers two storage units that could be used to retrieve audio and image media or to save captured images from the camera The two units are initialized during the development platform startup phase and are available to all the modules during the development platform s run time Doc ID 023271 Rev 1 19 44 Development platform core UM1550 20 44 Figure 11 Storage units FS driver yeah ea iy egg ry oh SORA UMS OCC NE File system fe _ Va Unit 1 USB Flash disk MS30271V1 The two units are accessible through the standard I O operations offered by the FatFS used in the development platform The USB disk Flash unit is identified as Unit O and available only if a USB disk Flash is connected to the USB FS connector The MicroSD Flash is identified as Unit 1 and available only if the MicroSD card is connected The units are mounted automatically when the physical media is connected to the connector on the boar
36. ntire STM32 capability to offer a large scope of usage The architecture was defined so as to make an independent central component from the demonstration builder core which can be used with several RTOS and third party firmware libraries through several abstraction layers inserted between the demonstration builder core and the modules and libraries that function around it This document describes the architecture and development guidelines of the demonstration for more details about the demonstration coming with the demonstration builder package please refer to the UM1549 document This Demonstration supports STM32F2xx and STM32F4xx devices and runs on STM3220G EVAL and STM3240G EVAL evaluation boards from STMicroelectronics Table 1 Applicable tools Type Part numbers Evaluation tools STM3220G EVAL STM3240G EVAL August 2012 Doc ID 023271 Rev 1 1 44 www st com Contents UM1550 Contents 1 Development platform overview esses 6 1 1 Software resources 16 teeta 6 1 2 Firmware architecture illii 7 2 Development platform architecture sssssss 9 2 1 Architecture overview 0 20 00 es 9 2 2 Folder organization x iex qukeeek RR EXE ERE Rx X RU RR E ER RR 10 2 3 Development platform files llli 10 3 Development platform core esses 13 3 1 Demonstration builder core architecture lsl
37. on to create the direct access page and not the MODULE SwitchPage function This is because the caller page should not be killed and its resources freed but instead should be put in a dormant state that is its resources kept but its page not displayed The return action of the direct access page should kill the parent page direct access page and restore the caller page to its default display state active A global pointer should be used to keep the address of the caller page in memory so as to use it later to restore the initial context before launching the direct access page This feature uses larger memory resources than normal access so special care should be taken when defining the heap size A sample implementation of a direct access page is shown in the following code void MODULE DirectEx GL Page TypeDef pParent void params H pParent ShowPage pParent GL FALSE ModuleBackPage pParent 2 MODULE CreatePage IMAGE DIRECT 3 Doc ID 023271 Rev 1 ky UM1550 Application modules ModuleDirectPage ShowPage ModuleDirectPage GL TRUE 4 DirectFunct 5 1 Put the parent page in a dormant state the page is present in the memory but not activated and controls are not displayed 2 Save the parent page pointer address to be used later to restore the context 3 Create the direct access page 4 Activate the direct access page and display it 5 Run the dir
38. ound callback structure this should then be exported to the modules h file as follows Doc ID 023271 Rev 1 ky UM1550 Application modules 4 7 extern BKGND InitTypeDef module bkgnd cb The module should also implement a method to synchronize the graphical controls with the background module Void MODULE GLSynch void Distant control feature The Distant control feature is the ability to launch and monitor a module from a distant host PC through the web server s HTML main page The Distant control feature uses the Ethernet module running in background mode This feature is enabled by the Ethernet module when the Distant Control menu item is selected Figure 22 Distant control feature Ethernet T Distan The modules running remotely should implement the command wrapper described in Section 4 6 Background mode feature on page 37 that is implement the background callback structure as shown typedef struct BKGND InitTypeDef void init void void process uint8 t cmd void args void quit void BKGND InitTypeDef Doc ID 023271 Rev 1 39 44 Building a module UM1550 5 40 44 Building a module Follow these steps to build a new module and add it to the STM32 demonstration builder The first step is to use the mod template c file by changing the template prefix to the user module This file implements the module s main structure to be us
39. ows you to perform the following tasks e Initializes the LCD and the different input devices joystick buttons and touch screen Manage the graphical system menu and the actions relative to the graphical events Probe the input events on the touch screen Initialize the modules and monitor their internal state Initialize the storage units Handle the low power mode Manage the core and module configurations by saving and retrieving the settings information from the system backup e Manage the background tasks of the modules Figure 7 Development platform core tasks Module s manger and BSP initialization Add modules Start Graphical Library module Initialization phase Start the Libraries and third parties stacks Show main menu Toggle Leds Query inputs events Periodic tasks Process GUI events and update widgets state Handle Modules Low power Check system settings changes Handle modules background tasks MS30841V1 The demonstration builder core is based on FreeRTOS A main task called background constitutes the heart of the development platform This task loads the different modules and updates the graphical state and the input events following the user actions on the touch Screen Doc ID 023271 Rev 1 13 44 Development platform core UM1550 3 1 14 44 Once a module is launched the background task switches to supervisor mode and monitors the child task which is then launched
40. phical component and widget memory management Figure 4 shows the architecture of the STM32 Demonstration Builder platform through a set of software components composing the module The modules are managed by the development platform demonstration builder core Nucleus which is then responsible for initializing the modules initializing hardware and GUI resources relative to the modules and initializing the common resources such as the storage unit the graphical widgets and the system menu Figure 4 Architecture of modules Distant control Configuration Low Power Initialization Management module Graphical Forms proprieties Background Error Safe close down Application Process management module task Each module provides the following functionalities Form and graphical aspect characteristics Method to startup the module Method to safely shut down the module example hot unplug for MS Flash disk Method to manage low power mode The application body task The module background process Distant control APIs Specific configuration Error management Doc ID 023271 Rev 1 9 44 Development platform architecture UM1550 2 2 2 3 10 44 Folder organization Figure 5 Organization of folders 4 Li STM32 Demonstration Builder jj _htmresc a Libraries j CMSIS j Embedded GUI HAL Embedded GUI Library m STM32 USB Device Library STM32 USB HOST Library J STM32 USB OTG Driver
41. rmation Application DCMI Audio Control Ethemet Flow and equalizer FAT FS components Audio capture loudness etc File System HTTP DHCP codec encoder management FTP m e Ic o A Stacks and Libraries STM32 Eval board i USB Device USB Host Audio Ethemet drivers Stack Stack codec Stack LCD SDIO Access USB OTG Low STM32 Standard Firmware and Joystick level driver Library control Touch screen drivers Drivers The development platform application is built using the following software components STM32F2xx Standard Peripherals Library STM32F4xx DSP and Standard Peripherals Library STM32 USB USB On The Go Host and Device Library STM32 graphical library and extension STM32 Audio Engine Equalizer Library STM32 Audio Engine Loudness Control Library STM32 Audio Engine Mixer Library FreeRTOS LibJpeg library FatFS file system LwIP TCP IP stack X Doc ID 023271 Rev 1 UM1550 Development platform architecture 2 Development platform architecture 2 1 Architecture overview The STM32 Demonstration Builder platform is a full set of software components based on a module architecture allowing each module to be reused separately in standalone applications All these modules are managed by the development platform demonstration builder core thus allowing new modules to be added dynamically and providing access to common resources storage gra
42. sss 14 3 1 1 Application startup lisse RII 15 3 1 2 Graphical library llle III 16 3 1 3 Graphical extensions 0 000 cee ees 19 3 1 4 Storage UNITS Less uiae de xe eR bk IR Un EEG RO EUR AUD RUE RUE 19 3 1 5 LCD display and HMI inputs llsllselseesne 24 3 1 6 RTOS and memory management 0 00 cece eee eee 25 3 1 7 Modules manager ssssseeleee eee 25 3 1 8 Configuration and settings management s s s sasaaa 27 3 1 9 Common GL resources 0 ees 27 3 2 Application programming interface 0 000 eee eee 27 3 2 1 Graphic APIS 2 cask aie GAs SOG eoa Ree dG ee be 27 3 2 2 Modules manager APIS 0 00 e eee ete 29 3 3 Application data structures and variables 20005 29 3 4 Graphical aspect of the demonstration builder core 30 3 4 1 Startup window lessen 30 3 4 2 Main menu window ssesssl nh 31 3 4 3 Module main menu window seeleee elles 32 4 Application modules 0000 eee 33 4 1 What is a module 0 0 00 ccc eee 33 4 2 Module architecture liliis 33 43 Start up phase of the modules 0c eee eee 34 2 44 Doc ID 023271 Rev 1 ky Contents 4 4 Graphic management of the modules 00 0 eee eeeee 34 4 5 Direct access feature iui REX E RR ER REPE p ER RE 36 4 6 Background mode feature 0 cece ee
43. stick or touch screen the module starts the callback function Figure 20 Startup phase of modules STM32 Demonstration Aro A Player Image Browser ES 02 Oct 2011 14 35 57 Application main menu level 0 Module main menu level 1 Graphic management of the modules A module may be composed of one or several pages managed internally by the module page control actions Each module should at least include the following three functions Table 8 Module functions for graphic management Function Description void MODULE SwitchPage GL Page TypeDef pParent uint32 t Pagelndex Used to switch between module pages Used to add the page controls The control event void MODULE CreatePage uint8 t Page handler is implemented depending on the control action Activated when the module icon in the main Void MODULE Startup void men is selected The module prefix MODULE should have the name of the module For example for audio modules the above three functions are respectively AUDIO SwitchPage AUDIO CreatePage AUDIO Startup MODULE SwitchPage This function is used to kill the parent page active page and create the child page depending on the page index After calling this function the parent page resources are freed and the child page is created and shown on the display The MODULE SwitchPage function uses the MODULE CreatePage function to create the child page Doc I
44. t of both tasks and co routines e Queues binary semaphores counting semaphores recursive semaphores and mutexes for communication and synchronization between tasks or between tasks and interrupts e Mutexes with priority inheritance e Support of efficient software timers e Powerful execution traces functionality e Stack overflow detection options e Pre configured demo applications for selected single board computers allowing out of the box operation and fast learning curve e Free forum support or optional commercial support and licensing e No software restriction on the number of tasks that can be created e No software restriction on the number of priorities that can be used e Norestrictions imposed on priority assignment more than one task can be assigned the same priority e Free development tools for many supported architectures e Free embedded software source code e Royalty free e Cross development from a standard Windows host The heap2 scheme of FreeRTOS is used for memory allocation management This scheme uses a best fit algorithm that allows previously allocated blocks to be freed It does not however combine adjacent free blocks into a single large block The total amount of available RAM is set by the definition configTOTAL HEAP SIZE which is defined in FreeRTOSConfig h Modules manager The modules manager is basically the firmware component responsible for initializing the platform BSP mod
45. t to the development platform and implements the background task User Contains the initialization function to the specific bsp c board features stm32fxxx_it c Contains the STM32 interrupts handler Fatfs drv FatFS disk I O interface for the USB disk Flash and m the MicroSD interfaces Contains the extensions to the graphical library and gl ext c the new widgets core Graphics Contains the development platform graphical library gl mgr c manager and the input events handler Message c Modules messages form mod core c Demonstration Builder core manager Manager usbh usr c User callbacks for the USB host File utils c Global file manager APIs LibJpeg_utils c LibJpeg library user APIs Memory management extension set of APIs to Lib Mem utils allocate de allocate memory in the SRAM used as extra space for data processing For example decoding of images audio files Str utils c String formatting wrapper APIs Time utils c Time and date calculation method and algorithm Devi es STM32Fxxx Board and device specific library and system utilities mod xxx c Module core Modules app xxx Application implementation relative to xxx module Doc ID 023271 Rev 1 4 UM1550 Development platform core 3 Development platform core The development platform core is the software component in charge of initializing and monitoring the demonstration builder application and the various loaded modules The development platform core all
46. ue as this can result in the interrupt actually having the highest priority in the system and therefore potentially make your system crash if this priority is above configMAX SYSCALL INTERRUPT PRIORITY When using the write operation from the fatFS file system the task calling to the f write API should have a higher priority compared to the main background one Doc ID 023271 Rev 1 ky UM1550 Revision history 8 Revision history Table 10 Document revision history Date 01 Aug 2012 Revision 1 Initial release Changes Doc ID 023271 Rev 1 43 44 UM1550 Please Read Carefully Information in this document is provided solely in connection with ST products STMicroelectronics NV and its subsidiaries ST reserve the right to make changes corrections modifications or improvements to this document and the products and services described herein at any time without notice All ST products are sold pursuant to ST s terms and conditions of sale Purchasers are solely responsible for the choice selection and use of the ST products and services described herein and ST assumes no liability whatsoever relating to the choice selection or use of the ST products and services described herein No license express or implied by estoppel or otherwise to any intellectual property rights is granted under this document If any part of this document refers to any third party products or servic
47. ules and the libraries used by them It also provides common helper functions that can be used by all the modules Hardware initialization The modules manager starts by initializing the console and BSP at the beginning of the background task of the demonstration builder core using the following function Doc ID 023271 Rev 1 25 44 Development platform core UM1550 Note 26 44 void MOD PreInit void MOD_counter 0 CONSOLE Init CONSOLE LOG MOD Module Manager running Init Board specific hardware BSP Init Library initialization The modules manager initializes the different middleware libraries and indicates their startup progress in the GUI startup page and mounts the storage unit 1 SD void MOD LibInit void Coxe GL State Message xxx Library Starting Xxx LibInit GL State Message xxx Library Started SD Init if f mount 1 amp MSD fatfs FR OK 1 efs initialisation fails CONSOLE LOG FS Cannot initialize FS on drive 1 else CONSOLE_LOG FS FS on drive 1 initialized Adding modules The modules are defined in a structure that is used during the main menu startup and the module run time Since the main menu uses several GUI resources and thus a big amount of data the adopted strategy regarding the main menu has been to free resources when moving to the next page modules page and draw the menu page when r
Download Pdf Manuals
Related Search
Related Contents
Canon imagePRESS 1110+ High Res Brochure owner`s manual manuel d`utilisateur manual del propietario カタログ - ダコタ・ジャパン Leather keyboard case for Ipad Air 2 150115 Manual de Utilización Balanza BC-1503 Caisses sur anses Copyright © All rights reserved.
Failed to retrieve file