STM32 Nucleo: Difference between revisions

From Axel Public Wiki
Jump to navigation Jump to search
 
(254 intermediate revisions by the same user not shown)
Line 1: Line 1:
We're sorry, this page is under construction
STM32 Nucleo F767ZI demo board can be used with LogicLab Automation Suite.


This guide is intended for STM32 Nucleo F767ZI demo board, with Axel runtime.
All informations about Nucleo F767ZI target board and ST software are available on STMicroelectronics website [https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-nucleo-boards/nucleo-f767zi.html]


== Quickstart ==
= How to start =


=== USB connection ===
1) Download [https://www.axelsoftware.it/en/download/ Axel Automation Suite]
It is possible to connect the Nucleo board via USB-Serial connection; just refer to the following steps:
* Connect USB cable into CN1 connector.
* Open LogicLab.
* Create new Nucleo_F767ZI project.
* Select from LogicLab main menu bar ''On-line'' -> ''Set up communication''.
* Select ''Modbus'' protocol, click on ''Activate'' button and then on ''Properties'' button, the settings dialog will appear; configure it as shown in the image below:


[[File:Nucleo-USBConnection1.jpg]]
2) Install Axel Automation Suite


* Click ''Ok''
3) Start LogicLab and create new Nucleo project (available for Nucleo F767ZI and F207ZG demo board)
* Now from the main menu bar, choose ''On-line'' -> ''Connect''
* Now, in the right-lower corner of the application window, you should see a green rectangle with the word ''CONNECTED'' written inside.


=== Ethernet connection ===
  [[File:NewNucleoProject.jpg]]
It is possible to connect the Nucleo board via Ethernet; just refer to the following steps:
* Connect to Ethernet LAN plugging cable into CN14 connector.
* Open LogicLab
* Click ''Scan Network…'' button
* If Nucleo board is recognized, you should see this results table:


[[File:Nucleo-EthScan.jpg]]
4) From the main target page open user manual


* By default, IP address is assigned by DHCP
  [[File:NucleoUserManual.jpg]]
* Click on the (+) button to automatically create a new nucleo project with the right communication settings


[[File:Nucleo-EthConfig.jpg]]
5) See user manual chapter ''3 - Firmware Upgrade'' to configure Nucleo target board with Axel Nucleo firmware


* From the main menu bar choose ''On-line'' -> ''Connect''
6) See user manual chapter ''1 - Quickstart'' to connect to target device via USB-Serial or Ehernet
* Now, in the right-lower corner of the application window, you should see a green rectangle with the word CONNECTED written inside.


==== Modify ethernet communication settings ====
7) Once connected to target, enter product key provided by Axel in main target page
If the IP address cannot be correctly assigned by DHCP, it is possible to manually configure a fixed IP address for the Nucleo board. See the following instruction:
* Connect USB cable into CN1 connector
* Open SoftTune
* Create new Nucleo_F767ZI project
* From the menu bar choose ''Target'' -> ''Communication settings''
* Select ''Modbus'' protocol, then click on ''Activate'' and then click on ''Properties''
* Configure the Modbus setting as shown in the following image (specify the USB virtual COM port as recognized by your system):


[[File:Nucleo-USBConnection1.jpg]]
  [[File:NucleoLicense.jpg]]


* Click OK
8) Nucleo is now ready for LogicLab
* Click on the connection Icon
* In the bottom-right corner of the application window, you should see a green rectangle with ''CONNECTED'' written inside
* Inside the parameters tree, select ''All Parameters'' -> ''Communication'' -> '' Configure TCP IP address'', and specify the desired IP address (this should write the parameter inside the target)
* Save parameters and reboot (from the menu bar choose ''Target'' -> ''Save parameter'', then ''Target'' -> ''Device reboot''
* Connect LogicLab to target via Ethernet (see 1.2 Ethernet connection)


== Peripheral connection ==
== User plugins and firmware development ==
{| border="1" cellpadding="3" cellspacing="0" style="text-align:left;"
 
!Peripheral
Nucleo firmware source can be provided by Axel only by explicit request.
!Connector
!Description
!Usage
|-
|Ethernet || CN14 || RJ45 port || Modbus TCP slave
|-
|USB || CN1 || USB-RS232 virtual port || Modbus RTU slave
|-
|GPIO - Out  || CN12 – Pin 11 (PA5) || GPIO digital output pin || I/O
|-
|GPIO - Out  || CN12 – Pin 13 (PA6) || GPIO digital output pin || I/O
|-
|GPIO - In  || CN12 – Pin 23 (PA8) || GPIO digital input pin || I/O
|-
|GPIO - In  || CN12 – Pin 21 (PA9) || GPIO digital input pin || I/O
|-
|CAN Rx  || CN11 – Pin 57 (PD0) || CAN Rx signal || CAN Open master
|-
|CAN Tx  || CN11 – Pin 55 (PD1) || CAN Tx signal || CAN Open master
|-
|USART1 Rx  || CN12 – Pin 26 (PB15) || RS485 Rx signal || Modbus RTU master
|-
|USART1 Tx  || CN12 – Pin 28 (PB14) || RS485 Tx signal || Modbus RTU master
|-
|USART1 DE  || CN12 – Pin 12 (PA12) || RS485 Direction enable signal || Modbus RTU master
|-
|}


== Firmware upgrade ==
If request is accepted Axel will provide firmware sources and guidelines for development.
This is the procedure to prepare Nucleo F767ZI demo board to run Axel PLC.


N.B: all data on the flash will be erased, that means '''license key will be erased''' too. <br/>If the target has been already licensed please be sure to have the license key available. You can read it from target using SoftTune before proceeding with the target upgrade.
Nucleo firmware has been developed using STM32CubeIDE.
* Download “STM32 ST-LINK Utility” application from ST official website at the following link <br/> https://www.st.com/en/development-tools/stsw-link004.html#get-software
* Connect Nucleo F767ZI demo board to PC using USB (CN1 connector)
* Launch “STM32 ST-LINK Utility”
* Connect to target (''Target'' -> ''Connect'')
* Erase the flash (''Target'' -> ''Erase chip'')
* Prepare to download (''Target'' -> ''Program & Verify'')
* Choose the new firmware (Select the new firmware file from Axel Installation folder, for example "C:\Program Files (x86)\Axel PC Tools\Catalog\Nucleo_F767ZI_1p0\Firmware\NUCLEO_STM32F767ZI_RTOS_1p0.bin")


[[File:Nucle-FWUpgrade1.jpg]]
See ''Nucleo versions'' for the STM32CubeIDE version used for development.


* Execute the download (Click ''Start'')
= Supported Nucleo versions =


== Plugin development ==
== Nucleo F767ZI demo board ==
With Nucleo F767ZI demo board, is possible to write a user plugin to add custom functionalities to default implementation.


Plugin development allows the user to add:
=== Nucleo F767ZI 3p0 ===
* Embedded functions
* Datablocks
* Callbacks related to events


Users can develop a plugin library project with its own implementation and run it together with the already available firmware core functions. <br/>Nucleo firmware source demo project is available for STM32 F767ZI demo board.
* PLC
* SoftScope
* Database
* Local I/O (plugin sample)
* Modbus RTU master
* Modbus RTU slave
* CANopen master
* Modbus TCP master ''(new)''
* Modbus TCP slave
* Symbols server ''(new)''
* Network scan support
* Plugin API for custom plugins development
* Plugin builder ''(new)''


Firmware source consist of four project:
Quickstart and documentation [https://www.axelsw.it/pwiki/pub/Nucleo_F767ZI_3p0.pdf Nucleo_F767ZI_3p0.pdf]
* NUCLEO_STM32F767ZI_RTOS – main project
** Contains .ioc project file for ST code generation
** Main PLC porting feature
** Database
** Modbus TCP slave communication stack
** TCP scan support for target identification
* COPMLib – lib project
** The CANopen master project
* ModbusRTULib – lib project
** The Modbus RTU master/slave project
* IOPluginLib – lib project
** IO Plugin sample project


IOPluginLib is here described in details as explanation on how it is possible to add plugins to your project.
Firmware developed and tested with STM32CubeIDE 1.5.1


=== IOPluginLib user sample plugin ===
=== Nucleo F767ZI 2p0 ===
IOPluginLib is provided as sample plugin for Nucleo demo board to show how to do a plugin with custom user functionalities.
* This plugin is used to manage 4 GPIOs: 2 inputs + 2 outputs in this way
* GPIO configuration set at startup
* I/O datablocks are published to LogicLab
* Inputs are read each time the task Fast is executed by system (using callback event)
* Outputs are written each time the task Fast is executed by system (using callback event)


==== Project settings ====
* PLC
Sample project has been created using STM32 Cube IDE 3.0.0 as C static library empty project for STM32 F767ZITx target.
* SoftScope ''(new)''
* Database
* Local I/O  (plugin sample)
* Modbus RTU master
* Modbus RTU slave
* CANopen master
* Modbus TCP slave ''(new)''
* Network scan support ''(new)''
* Plugin API for custom plugins development ''(new)''


These include paths have then been added to access system and driver functions.
Quickstart and documentation [https://www.axelsw.it/pwiki/pub/Nucleo_F767ZI_2p0.pdf Nucleo_F767ZI_2p0.pdf]
* "${workspace_loc:/NUCLEO_STM32F767ZI_RTOS/Drivers/CMSIS/Device/ST/STM32F7xx/Include}"
* "${workspace_loc:/NUCLEO_STM32F767ZI_RTOS/Drivers/CMSIS/Include}"
* "${workspace_loc:/NUCLEO_STM32F767ZI_RTOS/Drivers/STM32F7xx_HAL_Driver/Inc}"
* "${workspace_loc:/NUCLEO_STM32F767ZI_RTOS/Drivers/STM32F7xx_HAL_Driver/Inc/Legacy}"
* "${workspace_loc:/NUCLEO_STM32F767ZI_RTOS/Inc}"
* "${workspace_loc:/NUCLEO_STM32F767ZI_RTOS}"
* "${workspace_loc:/NUCLEO_STM32F767ZI_RTOS/Src}"


In addition, if RTOS is required by your plugin add this includes:
Firmware developed and tested with STM32CubeIDE 1.3.0
* "${workspace_loc:/NUCLEO_STM32F767ZI_RTOS/Middlewares/Third_Party/FreeRTOS/Source/include}"
* "${workspace_loc:/NUCLEO_STM32F767ZI_RTOS/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2}"
* "${workspace_loc:/NUCLEO_STM32F767ZI_RTOS/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1}"


These project defines have been defined to use the same micro and AlPlcRuntime defines of the main project. MCU GCC Compiler →Preprocessor
=== Nucleo F767ZI 1p0 ===
* STM32F767xx,
* USE_HAL_DRIVER,
* ALPLC_C_GCCARM,
* ALPLC_P_ARM_THUMB2VFP2,
* USE_STDINT_FOR_MISRA_C


==== IOPlugin interface description ====
* PLC
'''IOPlugin public interface'''<br/>''IOPluginLib.h'' is the header plugin interface.
* Database
* Local I/O
* Modbus RTU master
* Modbus RTU slave
* CANopen master
* Modbus TCP slave


These functions can be called directly by system core but they are not published to LogicLab.
Firmware developed and tested with STM32CubeIDE 1.3.0
* bool_t GetDigitalInput(uint8_t id);
* bool_t GetDigitalOutput(uint8_t id);
* void SetDigitalOutput(uint8_t id, bool_t value);
* void IOPlugin_Init(void);


''IOPluginLib.c'' provides the implementation of the plugin interface
Quickstart and documentation [https://www.axelsw.it/pwiki/pub/Nucleo_F767ZI_1p0.pdf Nucleo_F767ZI_1p0.pdf]


'''IOPlugin_Init function'''
== Nucleo F207ZG demo board ==
void IOPlugin_Init()
{
MX_GPIO_Init();
/* mandatory to force plugin interface allocation */
ALPLC_PLUGIN_ACTIVATE( IOPlugin )
}


This function must be called in main.c before AlPlcInit() function. <br/>IOPlugin is the unique name of the plugin. This name must be same in all macro declaration of the plugin. <br/>Plugin interface is defined in this c source and here described in details.
=== Nucleo F207ZG 1p0 ===


'''Embedded functions table'''
* PLC
ALPLC_FUNCTIONS_TABLE_INI( IOPlugin ) // start table definition
* SoftScope
// ALFCNREC_FUNC( userFunction ) // function to publish
* Database
ALPLC_FUNCTIONS_TABLE_END // end table definition
* Local I/O (plugin sample)
* Modbus RTU slave
* Plugin API for custom plugins development


In this case no user function have been published. Even if function table is empty the definition is mandatory. <br/>To publish functions add between ALPLC_FUNCTIONS_TABLE_INI and ALPLC_FUNCTIONS_TABLE_END macro.a series of ALFCNREC_FUNC records indicating the function to call. Functions will be published to LogicLab with the same name of the C code function name.
Firmware developed and tested with STM32CubeIDE 1.5.1


'''Datablocks table'''
Quickstart and documentation [https://www.axelsw.it/pwiki/pub/Nucleo_F207ZG_1p0.pdf Nucleo_F207ZG_1p0.pdf]
ALPLC_DATABLOCKS_TABLE_INI( IOPlugin ) // start table definition
ALDBREC_INPUT( 0, m_sysDigitalInputs, sizeof(m_sysDigitalInputs[0]), DBRW_R )
ALDBREC_OUTPUT( 0, m_sysDigitalOutputs, sizeof(m_sysDigitalOutputs[0]), DBRW_RW )
ALPLC_DATABLOCKS_TABLE_END // end table definition


Datablock table definition is mandatory, starts with ALPLC_DATABLOCKS_TABLE_INI and terminate with ALPLC_DATABLOCKS_TABLE_END. <br/>In this case two datablocks have been added using macro:
'''N.B.: Requires WinCommLibs version >= 12.1.0.13 (installed by Axel Automation Suite version >= 3.02.03.00)'''
* '''ALDBREC_INPUT''' to publish the digital inputs datablock as DBTY_INP datablock with index 0.
* '''ALDBREC_OUTPUT''' to publish the digital outputs datablock as DBTY_OUT datablock with index 0.


With this kind of definitions the whole array is published. <br/>It is possible to use ALDBREC_MEMO macro to add memo datablocks with default settings or ALDBREC_EX macro to specify each setting.
== Nucleo H743ZI2 demo board ==


'''Callback data definition'''
=== Nucleo H743ZI2 1p0 ===
ALCBKREC_DATA(OnBeforeTaskFast)


Some callback types (high priority callbacks) requires additional definition to provide memory to AlPlcRuntime in order to manage properly callbacks. <br/>This is the case of ALCBKREC_ON_BEFORE_PLC_TASK_IO that is used to call OnBeforeTaskFast.function. ALCBKREC_DATA definition is used for this.
* PLC
* SoftScope
* Database
* Local I/O (plugin sample)
* Modbus RTU slave
* EtherCAT plugin
* Plugin API for custom plugins development


See AlPlcUserPlugin.h the list of callbacks that requires this definition. If no definition is provided compile error is given.
Firmware developed and tested with STM32CubeIDE 1.5.1


'''Callback table definition'''
Quickstart and documentation [TODO]
ALPLC_CALLBACKS_TABLE_INI( IOPlugin ) // start table definition
ALCBKREC_ON_BEFORE_PLC_TASK_IO(OnBeforeTaskFast)
ALPLC_CALLBACKS_TABLE_END // end table definition


Callbacks table definition is mandatory, starts with ALPLC_DATABLOCKS_TABLE_INI and terminate with ALPLC_DATABLOCKS_TABLE_END. <br/>In IOPlugin the only callback associated is the OnBeforeTaskFast function associated to the on before plc task IO event (that is raised periodically in task fast).
'''N.B.: Requires WinCommLibs version >= 12.1.0.13 (installed by Axel Automation Suite version >= 3.02.03.00)'''


'''Plugin definition'''
ALPLC_PLUGIN_DEFINITION( IOPlugin )
This is the definition of the plugin. This definition is mandatory.


=== Add plugin to main firmware ===
= Firmware notes =
If you want to create a new plugin you should start creating a library project (as explained in 4.1.1 Project settings), you should provide the plugin definition as explained in the sample project. See 4.3 User plugin definition for more information.


Once you got your plugin library you can link it from main Nucleo firmware project:
== Nucleo F767ZI ==
* Project properties -> C++ Build -> Tool Settings. MCU GCC Linker -> Libraries <br/>Libraries box: Add your plugin library here
* Project properties -> C++ Build -> Tool Settings. MCU GCC Linker -> Libraries <br/>Libraries search path box: Add the path of the plugin library
* In main.c #include the file “yourPluginLib.h” where the init function is declared. <br/>The init function is the function that call the ALPLC_PLUGIN_ACTIVATE function. <br/>In the IOPluginLib sample is the IOPlugin_Init function.
* In main.c go to StartMainTask function and add the init function call before AlPlcInit call.


=== User plugin interface ===
Based on Nucleo F767ZI 3p0 firwmare


==== Plugin definition ====
{|class="wikitable"
{| border="1" cellpadding="3" cellspacing="0" style="text-align:left;"
! Plugin/sw component
!#macro
! Is plugin
!Description
! Flash
! RAM
! Description
! Notes
! Customizations info<br>for other porting<br>based on this target
|-
|style="background-color:HoneyDew" | AlPlcRuntimeCore & porting
|No
|24 KB
|48 KB
|Validate, manage and run PLC code
|Includes math, real plugins, functions to manage system events, download and storage
|Mandatory component
|-
|style="background-color:Ivory" | AlPlcRuntimeCore (STRING)
|No
|20 KB
|0 KB
|String plugin
|Support for operations with ascii strings and wide strings:<br>CONCAT, DELETE, FIND, INSERT, LEFT, LEN, MID, REPLACE, RIGHT<br>String to number and number to string conversion functions
|Optional component
|-
|style="background-color:Ivory" | AlPlcRuntimeCore (TIME)
|No
|6 KB
|0 KB
|Time plugin
|Support for operations with Date:<br>CONCAT_DATE, CONCAT_DATE_LTOD, CONCAT_DATE_TOD, CONCAT_LDATE, CONCAT_LTOD, CONCAT_TOD,<br>DAY_OF_WEEK, SPLIT_DATE, SPLIT_LTOD, SPLIT_TOD<br>Support for operations with Date and Time:<br>CONCAT_DT, CONCAT_LDT, SPLIT_DT, SPLIT_LDT
|Optional component
|-
|-
| ALPLC_FUNCTIONS_TABLE_INI(plugin) || Start your function table plugin definition with this macro. Plugin is the univoque plugin name.
|style="background-color:HoneyDew" | PLC code
|No
|512 KB
| - - - - -
|Reserved area for PLC application code
|Code is run directly from flash
|'''Size can be customized.<br>Execution mode from RAM can be implemented'''
|-
|-
| ALFCNREC_FUNC(userFunction) ||
|style="background-color:HoneyDew" | PLC data
|No
| - - - - -
|128 KB
|Reserved area for PLC application variables
|
|'''Size can be customized'''
|-
|-
| ALPLC_FUNCTIONS_TABLE_END ||
|style="background-color:HoneyDew" | Database
|No
|16 KB
|1 KB + (***)
|Manage persistency and access to system and application parameters
|Requires reserved flash sectors for parameters values storage (**)
|'''Basic database required for LogicLab communication.'''<br>No persistency required.<br>Other feature and persistency are customizable
|-
|-
| ALPLC_DATABLOCKS_TABLE_INI(plugin) ||
|style="background-color:Ivory" | Modbus TCP slave
|No
|12 KB
|16 KB
|Allow a client to access database parameters via Modbus TCP
|Requires LwIP stack
|Optional component.<br>Mandatory if Modbus RTU slave is not available
|-
|-
| ALDBREC_INPUT(dbId, var, sizeEl, rw) ||
|style="background-color:Ivory" | Network scan
|No
|1 KB
|4 KB
|Manage UDP requests for target recognition
|
|Optional component
|-
|-
| ALDBREC_OUTPUT(dbId, var, sizeEl, rw) ||
|style="background-color:HoneyDew" | FreeRTOS + HAL drivers + LwIP stack + other
|No
|164 KB
|72 KB
|FreeRTOS real time O.S., low level drivers, TCP/IP stack, main, wrappers
|LwIP required for Modbus TCP slave, Network scan, Modbus TCP master
|'''Depending on system configuration'''
|-
|-
| ALDBREC_MEMO(dbId, var, sizeEl, rw) |
|style="background-color:Ivory" | SoftScope
|Yes
|7 KB
|16 KB
|Real time oscilloscope plugin
|8KB of data required for data transfer in real time mode (acquisitions of 8 tracks at 1 ms)
|Optional component
|-
|-
| ALDBREC_EX(img, type, dbId, addr, numEl, sizeEl, rw, flags) ||
|style="background-color:Ivory" | Local I/O
|Yes
|1 KB
|1 KB
|Basic I/O plugin
|
|Customizable depending on the I/O
|-
|-
| ALPLC_DATABLOCKS_TABLE_END ||
|style="background-color:Ivory" | Modbus RTU master + slave
|Yes
|17 KB
|65 KB + (*)
|Modbus RTU master + slave stack
|Configured to manage up to 32 slaves
|Optional component.<br>Mandatory if Modbus TCP slave is not available
|-
|-
| ALCBKREC_DATA(func) ||
|style="background-color:Ivory" | CANopen master
|Yes
|18 KB
|2 KB + (*)
|CANopen master stack
|Can manage up to 126 slaves
|Optional component
|-
|-
| ALPLC_CALLBACKS_TABLE_INI(plugin) ||
|style="background-color:Ivory" | Modbus TCP master
|Yes
|18 KB
|26 KB + (*)
|Modbus TCP master stack
|Configured to manage up to 16 slaves. Requires LwIP stack
|Optional component
|-
|-
| ALCBKREC_ON_BEFORE_ALPLCINIT(func) ||
|style="background-color:Ivory" | Symbols server
|Yes
|46 KB
|1 KB + (*)
|Allow access to PLC symbols from clients that uses LLSymbols.dll
|Symbols table is allocated into PLC code area
|Optional component
|-
|-
| ALCBKREC_ON_AFTER_ALPLCINIT(func) ||
|'''Total size (No PLC areas)'''
|
|350 KB
|263 KB
|Fimware occupation NOT including PLC code and data reserved area
|
|
|-
|-
| ALCBKREC_ON_BEFORE_ALPLCMANAGE(func) |
|'''Total size'''
|
|862 KB
|391 KB
|Fimware occupation including PLC code and data reserved area
|512 KB for PLC code, 128 KB for PLC data
|
|
|-
|Nucleo F767ZI memory
|
|2048 KB
|512 KB
|
|}
 
(*) some resources, depending on user configuration, are allocated into PLC data area when plugin configuration code is generated.
 
(**) database manager can be configured to save parameters into file systems or EEPROM if available
 
(***) 2 KB for parameters and status variables datablocks
 
== Nucleo F207ZG ==
 
Based on Nucleo F207ZG 1p0 firwmare
 
{|class="wikitable"
! Plugin/sw component
! Is plugin
! Flash
! RAM
! Description
! Notes
! Customizations info<br>for other porting<br>based on this target
|-
|-
| ALCBKREC_ON_BEFORE_START_TASKS(func) ||
|style="background-color:HoneyDew" | AlPlcRuntimeCore & porting
|No
|24 KB
|36 KB
|Validate, manage and run PLC code
|Includes math, real, string and time plugins, functions to manage system events, download and storage
|Mandatory component
|-
|-
| ALCBKREC_ON_BEFORE_STOP_TASKS(func) ||
|style="background-color:Ivory" | AlPlcRuntimeCore (STRING)
|No
|20 KB
|0 KB
|String plugin
|Support for operations with ascii strings and wide strings:<br>CONCAT, DELETE, FIND, INSERT, LEFT, LEN, MID, REPLACE, RIGHT<br>String to number and number to string conversion functions
|Optional component
|-
|-
| ALCBKREC_ON_AFTER_STOP_TASKS(func) ||
|style="background-color:Ivory" | AlPlcRuntimeCore (TIME)
|No
|6 KB
|0 KB
|Time plugin
|Support for operations with Date:<br>CONCAT_DATE, CONCAT_DATE_LTOD, CONCAT_DATE_TOD, CONCAT_LDATE, CONCAT_LTOD, CONCAT_TOD,<br>DAY_OF_WEEK, SPLIT_DATE, SPLIT_LTOD, SPLIT_TOD<br>Support for operations with Date and Time:<br>CONCAT_DT, CONCAT_LDT, SPLIT_DT, SPLIT_LDT
|Optional component
|-
|-
| ALCBKREC_ON_BEFORE_PLC_TASK_IO(func) ||
|style="background-color:HoneyDew" | PLC code
|No
|128 KB
| - - - - -
|Reserved area for PLC application code
|Code is run directly from flash
|'''Size can be customized.<br>Execution mode from RAM can be implemented'''
|-
|-
| ALCBKREC_ON_AFTER_PLC_TASK_IO(func) ||
|style="background-color:HoneyDew" | PLC data
|No
| - - - - -
|32 KB
|Reserved area for PLC application variables
|
|'''Size can be customized'''
|-
|-
| ALCBKREC_ON_BEFORE_PLC(func) ||
|style="background-color:HoneyDew" | Database
|No
|16 KB
|1 KB + (***)
|Manage persistency and access to system and application parameters
|Requires reserved flash sectors for parameters values storage (**)
|'''Basic database required for LogicLab communication.'''<br>No persistency required.<br>Other feature and persistency are customizable
|-
|-
| ALCBKREC_ON_AFTER_PLC(func) ||
|style="background-color:HoneyDew" | FreeRTOS + HAL drivers + other
|No
|53 KB
|18 KB
|FreeRTOS real time O.S., low level drivers, main, wrappers
|
|'''Depending on system configuration'''
|-
|-
| ALCBKREC_ON_END_PLC_LOAD(func) |
|style="background-color:Ivory" | SoftScope
|Yes
|7 KB
|18 KB
|Real time oscilloscope plugin
|8KB of data required for data transfer in real time mode (acquisitions of 8 tracks at 1 ms)
|Optional
|-
|-
| ALPLC_CALLBACKS_TABLE_END ||
|style="background-color:Ivory" | Local I/O
|Yes
|1 KB
|1 KB
|Basic I/O plugin
|
|Customizable
|-
|-
| ALPLC_PLUGIN_DEFINITION(plugin) ||
|style="background-color:HoneyDew" | Modbus RTU slave
|Yes
|13 KB
|1 KB
|Modbus RTU slave stack
|
|Mandatory component
|-
|-
| ALPLC_PLUGIN_DECLARE(plugin) ||
|'''Firmware size<br>(No PLC areas)'''
|
|140 KB
|75 KB
|Fimware occupation NOT including PLC code and data reserved area
|
|-
|-
| ALPLC_PLUGIN_ACTIVATE(plugin) ||
|'''Total firmware size'''
|
|268 KB
|107 KB
|Fimware occupation including PLC code and data reserved area
|128 KB for PLC code, 32 KB for PLC data
|
|-
|-
|Nucleo F207ZG memory
|
|1024 KB
|128 KB
|
|}
|}
(*) some resources, depending on user configuration, are allocated into PLC data area when plugin configuration code is generated.
(**) database manager can be configured to save parameters into file systems or EEPROM if available
(***) 2 KB for parameters and status variables datablocks
== Nucleo H743ZI2 ==
Based on Nucleo H743ZI2 1p0 firwmare
{|class="wikitable"
! Plugin/sw component
! Is plugin
! Flash
! RAM
! Description
! Notes
! Customizations info<br>for other porting<br>based on this target
|-
|style="background-color:HoneyDew" | AlPlcRuntimeCore & porting
|No
|24 KB
|36 KB
|Validate, manage and run PLC code
|Includes math, real, string and time plugins, functions to manage system events, download and storage
|Mandatory component
|-
|style="background-color:Ivory" | AlPlcRuntimeCore (STRING)
|No
|20 KB
|0 KB
|String plugin
|Support for operations with ascii strings and wide strings:<br>CONCAT, DELETE, FIND, INSERT, LEFT, LEN, MID, REPLACE, RIGHT<br>String to number and number to string conversion functions
|Optional component
|-
|style="background-color:Ivory" | AlPlcRuntimeCore (TIME)
|No
|6 KB
|0 KB
|Time plugin
|Support for operations with Date:<br>CONCAT_DATE, CONCAT_DATE_LTOD, CONCAT_DATE_TOD, CONCAT_LDATE, CONCAT_LTOD, CONCAT_TOD,<br>DAY_OF_WEEK, SPLIT_DATE, SPLIT_LTOD, SPLIT_TOD<br>Support for operations with Date and Time:<br>CONCAT_DT, CONCAT_LDT, SPLIT_DT, SPLIT_LDT
|Optional component
|-
|style="background-color:HoneyDew" | PLC code
|No
|256 KB
| - - - - -
|Reserved area for PLC application code
|Code is run directly from flash
|'''Size can be customized.<br>Execution mode from RAM can be implemented'''
|-
|style="background-color:HoneyDew" | PLC data
|No
| - - - - -
|128 KB
|Reserved area for PLC application variables
|
|'''Size can be customized'''
|-
|style="background-color:HoneyDew" | Database
|No
|16 KB
|1 KB + (*1)
|Manage persistency and access to system and application parameters
|Requires reserved flash sectors for parameters values storage (*2)
|'''Basic database required for LogicLab communication.'''<br>No persistency required.<br>Other feature and persistency are customizable
|-
|style="background-color:HoneyDew" | FreeRTOS + HAL drivers + other
|No
|73 KB
|53 KB
|FreeRTOS real time O.S., low level drivers, main, wrappers
|
|'''Depending on system configuration'''
|-
|style="background-color:Ivory" | SoftScope
|Yes
|9 KB
|11 KB
|Real time oscilloscope plugin
|8KB of data required for data transfer in real time mode (acquisitions of 8 tracks at 1 ms)
|Optional
|-
|style="background-color:Ivory" | Local I/O
|Yes
|3 KB
|0.01 KB
|Basic I/O plugin
|
|Customizable
|-
|style="background-color:HoneyDew" | Modbus RTU slave
|Yes
|21 KB
|2 KB
|Modbus RTU slave stack
|
|Mandatory component
|-
|style="background-color:Ivory" | EtherCAT
|Yes
|324 KB
|150 KB (*3)
|EtherCAT master stack
|Requires reserved flash sectors for parameters values storage
|Optional
|-
|style="background-color:Ivory" | Ethercat CNF/ENI file storage
|Yes
|256 KB
|0 KB
|Reserved flash areas for ECAT configuration files storage.
|Size can be customized
|Mandatory when EtherCAT is used
|-
|'''Firmware size<br>(No PLC areas)'''
|
|496 KB
|253 KB
|Fimware occupation NOT including PLC code and data reserved area, not including EtherCAT configuration storage area
|
|-
|'''Total firmware size'''
|
|1008 KB
|381 KB
|Fimware occupation including PLC code and data reserved area, including EtherCAT configuration storage area
|256KB for PLC code, 128 KB for PLC data, 256KB for EtherCAT configuration storage
|
|-
|Nucleo H743ZI2 memory
|
|2048 KB
|1024 KB
|
|}
(*1) 2 KB for parameters and status variables datablocks
(*2) database manager can be configured to save parameters into file systems or EEPROM if available
(*3) Includes 97KB RAM used for dynamic allocation
==Firmware versions release notes==
===NUCLEO_STM32F767ZI_RTOS_3.0.3_20210806.bin===
* Database bugfix for multiple read holding registers operations.
===NUCLEO_STM32F767ZI_RTOS_3.0.2_20210730.bin===
* CAN driver configuration issues fixed. CANopen can be now configured at the specified baudrate.
===NUCLEO_STM32F767ZI_RTOS_3.0.1_20210707.bin===
* Auto IP setting (if no DHCP server is available, IP address is automatically assigned) for LLScan
===NUCLEO_STM32F767ZI_RTOS_3.0.0_20210423.bin===
* Initial NUCLEO_F767ZI 3.0 target version


[[Category:Supported boards]]
[[Category:Supported boards]]

Latest revision as of 17:30, 16 September 2021

STM32 Nucleo F767ZI demo board can be used with LogicLab Automation Suite.

All informations about Nucleo F767ZI target board and ST software are available on STMicroelectronics website [1]

How to start

1) Download Axel Automation Suite

2) Install Axel Automation Suite

3) Start LogicLab and create new Nucleo project (available for Nucleo F767ZI and F207ZG demo board)

 NewNucleoProject.jpg

4) From the main target page open user manual

 NucleoUserManual.jpg

5) See user manual chapter 3 - Firmware Upgrade to configure Nucleo target board with Axel Nucleo firmware

6) See user manual chapter 1 - Quickstart to connect to target device via USB-Serial or Ehernet

7) Once connected to target, enter product key provided by Axel in main target page

 NucleoLicense.jpg

8) Nucleo is now ready for LogicLab

User plugins and firmware development

Nucleo firmware source can be provided by Axel only by explicit request.

If request is accepted Axel will provide firmware sources and guidelines for development.

Nucleo firmware has been developed using STM32CubeIDE.

See Nucleo versions for the STM32CubeIDE version used for development.

Supported Nucleo versions

Nucleo F767ZI demo board

Nucleo F767ZI 3p0

  • PLC
  • SoftScope
  • Database
  • Local I/O (plugin sample)
  • Modbus RTU master
  • Modbus RTU slave
  • CANopen master
  • Modbus TCP master (new)
  • Modbus TCP slave
  • Symbols server (new)
  • Network scan support
  • Plugin API for custom plugins development
  • Plugin builder (new)

Quickstart and documentation Nucleo_F767ZI_3p0.pdf

Firmware developed and tested with STM32CubeIDE 1.5.1

Nucleo F767ZI 2p0

  • PLC
  • SoftScope (new)
  • Database
  • Local I/O (plugin sample)
  • Modbus RTU master
  • Modbus RTU slave
  • CANopen master
  • Modbus TCP slave (new)
  • Network scan support (new)
  • Plugin API for custom plugins development (new)

Quickstart and documentation Nucleo_F767ZI_2p0.pdf

Firmware developed and tested with STM32CubeIDE 1.3.0

Nucleo F767ZI 1p0

  • PLC
  • Database
  • Local I/O
  • Modbus RTU master
  • Modbus RTU slave
  • CANopen master
  • Modbus TCP slave

Firmware developed and tested with STM32CubeIDE 1.3.0

Quickstart and documentation Nucleo_F767ZI_1p0.pdf

Nucleo F207ZG demo board

Nucleo F207ZG 1p0

  • PLC
  • SoftScope
  • Database
  • Local I/O (plugin sample)
  • Modbus RTU slave
  • Plugin API for custom plugins development

Firmware developed and tested with STM32CubeIDE 1.5.1

Quickstart and documentation Nucleo_F207ZG_1p0.pdf

N.B.: Requires WinCommLibs version >= 12.1.0.13 (installed by Axel Automation Suite version >= 3.02.03.00)

Nucleo H743ZI2 demo board

Nucleo H743ZI2 1p0

  • PLC
  • SoftScope
  • Database
  • Local I/O (plugin sample)
  • Modbus RTU slave
  • EtherCAT plugin
  • Plugin API for custom plugins development

Firmware developed and tested with STM32CubeIDE 1.5.1

Quickstart and documentation [TODO]

N.B.: Requires WinCommLibs version >= 12.1.0.13 (installed by Axel Automation Suite version >= 3.02.03.00)


Firmware notes

Nucleo F767ZI

Based on Nucleo F767ZI 3p0 firwmare

Plugin/sw component Is plugin Flash RAM Description Notes Customizations info
for other porting
based on this target
AlPlcRuntimeCore & porting No 24 KB 48 KB Validate, manage and run PLC code Includes math, real plugins, functions to manage system events, download and storage Mandatory component
AlPlcRuntimeCore (STRING) No 20 KB 0 KB String plugin Support for operations with ascii strings and wide strings:
CONCAT, DELETE, FIND, INSERT, LEFT, LEN, MID, REPLACE, RIGHT
String to number and number to string conversion functions
Optional component
AlPlcRuntimeCore (TIME) No 6 KB 0 KB Time plugin Support for operations with Date:
CONCAT_DATE, CONCAT_DATE_LTOD, CONCAT_DATE_TOD, CONCAT_LDATE, CONCAT_LTOD, CONCAT_TOD,
DAY_OF_WEEK, SPLIT_DATE, SPLIT_LTOD, SPLIT_TOD
Support for operations with Date and Time:
CONCAT_DT, CONCAT_LDT, SPLIT_DT, SPLIT_LDT
Optional component
PLC code No 512 KB - - - - - Reserved area for PLC application code Code is run directly from flash Size can be customized.
Execution mode from RAM can be implemented
PLC data No - - - - - 128 KB Reserved area for PLC application variables Size can be customized
Database No 16 KB 1 KB + (***) Manage persistency and access to system and application parameters Requires reserved flash sectors for parameters values storage (**) Basic database required for LogicLab communication.
No persistency required.
Other feature and persistency are customizable
Modbus TCP slave No 12 KB 16 KB Allow a client to access database parameters via Modbus TCP Requires LwIP stack Optional component.
Mandatory if Modbus RTU slave is not available
Network scan No 1 KB 4 KB Manage UDP requests for target recognition Optional component
FreeRTOS + HAL drivers + LwIP stack + other No 164 KB 72 KB FreeRTOS real time O.S., low level drivers, TCP/IP stack, main, wrappers LwIP required for Modbus TCP slave, Network scan, Modbus TCP master Depending on system configuration
SoftScope Yes 7 KB 16 KB Real time oscilloscope plugin 8KB of data required for data transfer in real time mode (acquisitions of 8 tracks at 1 ms) Optional component
Local I/O Yes 1 KB 1 KB Basic I/O plugin Customizable depending on the I/O
Modbus RTU master + slave Yes 17 KB 65 KB + (*) Modbus RTU master + slave stack Configured to manage up to 32 slaves Optional component.
Mandatory if Modbus TCP slave is not available
CANopen master Yes 18 KB 2 KB + (*) CANopen master stack Can manage up to 126 slaves Optional component
Modbus TCP master Yes 18 KB 26 KB + (*) Modbus TCP master stack Configured to manage up to 16 slaves. Requires LwIP stack Optional component
Symbols server Yes 46 KB 1 KB + (*) Allow access to PLC symbols from clients that uses LLSymbols.dll Symbols table is allocated into PLC code area Optional component
Total size (No PLC areas) 350 KB 263 KB Fimware occupation NOT including PLC code and data reserved area
Total size 862 KB 391 KB Fimware occupation including PLC code and data reserved area 512 KB for PLC code, 128 KB for PLC data
Nucleo F767ZI memory 2048 KB 512 KB

(*) some resources, depending on user configuration, are allocated into PLC data area when plugin configuration code is generated.

(**) database manager can be configured to save parameters into file systems or EEPROM if available

(***) 2 KB for parameters and status variables datablocks

Nucleo F207ZG

Based on Nucleo F207ZG 1p0 firwmare

Plugin/sw component Is plugin Flash RAM Description Notes Customizations info
for other porting
based on this target
AlPlcRuntimeCore & porting No 24 KB 36 KB Validate, manage and run PLC code Includes math, real, string and time plugins, functions to manage system events, download and storage Mandatory component
AlPlcRuntimeCore (STRING) No 20 KB 0 KB String plugin Support for operations with ascii strings and wide strings:
CONCAT, DELETE, FIND, INSERT, LEFT, LEN, MID, REPLACE, RIGHT
String to number and number to string conversion functions
Optional component
AlPlcRuntimeCore (TIME) No 6 KB 0 KB Time plugin Support for operations with Date:
CONCAT_DATE, CONCAT_DATE_LTOD, CONCAT_DATE_TOD, CONCAT_LDATE, CONCAT_LTOD, CONCAT_TOD,
DAY_OF_WEEK, SPLIT_DATE, SPLIT_LTOD, SPLIT_TOD
Support for operations with Date and Time:
CONCAT_DT, CONCAT_LDT, SPLIT_DT, SPLIT_LDT
Optional component
PLC code No 128 KB - - - - - Reserved area for PLC application code Code is run directly from flash Size can be customized.
Execution mode from RAM can be implemented
PLC data No - - - - - 32 KB Reserved area for PLC application variables Size can be customized
Database No 16 KB 1 KB + (***) Manage persistency and access to system and application parameters Requires reserved flash sectors for parameters values storage (**) Basic database required for LogicLab communication.
No persistency required.
Other feature and persistency are customizable
FreeRTOS + HAL drivers + other No 53 KB 18 KB FreeRTOS real time O.S., low level drivers, main, wrappers Depending on system configuration
SoftScope Yes 7 KB 18 KB Real time oscilloscope plugin 8KB of data required for data transfer in real time mode (acquisitions of 8 tracks at 1 ms) Optional
Local I/O Yes 1 KB 1 KB Basic I/O plugin Customizable
Modbus RTU slave Yes 13 KB 1 KB Modbus RTU slave stack Mandatory component
Firmware size
(No PLC areas)
140 KB 75 KB Fimware occupation NOT including PLC code and data reserved area
Total firmware size 268 KB 107 KB Fimware occupation including PLC code and data reserved area 128 KB for PLC code, 32 KB for PLC data
Nucleo F207ZG memory 1024 KB 128 KB

(*) some resources, depending on user configuration, are allocated into PLC data area when plugin configuration code is generated.

(**) database manager can be configured to save parameters into file systems or EEPROM if available

(***) 2 KB for parameters and status variables datablocks

Nucleo H743ZI2

Based on Nucleo H743ZI2 1p0 firwmare

Plugin/sw component Is plugin Flash RAM Description Notes Customizations info
for other porting
based on this target
AlPlcRuntimeCore & porting No 24 KB 36 KB Validate, manage and run PLC code Includes math, real, string and time plugins, functions to manage system events, download and storage Mandatory component
AlPlcRuntimeCore (STRING) No 20 KB 0 KB String plugin Support for operations with ascii strings and wide strings:
CONCAT, DELETE, FIND, INSERT, LEFT, LEN, MID, REPLACE, RIGHT
String to number and number to string conversion functions
Optional component
AlPlcRuntimeCore (TIME) No 6 KB 0 KB Time plugin Support for operations with Date:
CONCAT_DATE, CONCAT_DATE_LTOD, CONCAT_DATE_TOD, CONCAT_LDATE, CONCAT_LTOD, CONCAT_TOD,
DAY_OF_WEEK, SPLIT_DATE, SPLIT_LTOD, SPLIT_TOD
Support for operations with Date and Time:
CONCAT_DT, CONCAT_LDT, SPLIT_DT, SPLIT_LDT
Optional component
PLC code No 256 KB - - - - - Reserved area for PLC application code Code is run directly from flash Size can be customized.
Execution mode from RAM can be implemented
PLC data No - - - - - 128 KB Reserved area for PLC application variables Size can be customized
Database No 16 KB 1 KB + (*1) Manage persistency and access to system and application parameters Requires reserved flash sectors for parameters values storage (*2) Basic database required for LogicLab communication.
No persistency required.
Other feature and persistency are customizable
FreeRTOS + HAL drivers + other No 73 KB 53 KB FreeRTOS real time O.S., low level drivers, main, wrappers Depending on system configuration
SoftScope Yes 9 KB 11 KB Real time oscilloscope plugin 8KB of data required for data transfer in real time mode (acquisitions of 8 tracks at 1 ms) Optional
Local I/O Yes 3 KB 0.01 KB Basic I/O plugin Customizable
Modbus RTU slave Yes 21 KB 2 KB Modbus RTU slave stack Mandatory component
EtherCAT Yes 324 KB 150 KB (*3) EtherCAT master stack Requires reserved flash sectors for parameters values storage Optional
Ethercat CNF/ENI file storage Yes 256 KB 0 KB Reserved flash areas for ECAT configuration files storage. Size can be customized Mandatory when EtherCAT is used
Firmware size
(No PLC areas)
496 KB 253 KB Fimware occupation NOT including PLC code and data reserved area, not including EtherCAT configuration storage area
Total firmware size 1008 KB 381 KB Fimware occupation including PLC code and data reserved area, including EtherCAT configuration storage area 256KB for PLC code, 128 KB for PLC data, 256KB for EtherCAT configuration storage
Nucleo H743ZI2 memory 2048 KB 1024 KB

(*1) 2 KB for parameters and status variables datablocks

(*2) database manager can be configured to save parameters into file systems or EEPROM if available

(*3) Includes 97KB RAM used for dynamic allocation

Firmware versions release notes

NUCLEO_STM32F767ZI_RTOS_3.0.3_20210806.bin

  • Database bugfix for multiple read holding registers operations.

NUCLEO_STM32F767ZI_RTOS_3.0.2_20210730.bin

  • CAN driver configuration issues fixed. CANopen can be now configured at the specified baudrate.

NUCLEO_STM32F767ZI_RTOS_3.0.1_20210707.bin

  • Auto IP setting (if no DHCP server is available, IP address is automatically assigned) for LLScan

NUCLEO_STM32F767ZI_RTOS_3.0.0_20210423.bin

  • Initial NUCLEO_F767ZI 3.0 target version