Date: Fri, 29 Mar 2024 12:57:53 +0000 (UTC) Message-ID: <1712169074.1.1711717073391@cc07ce0db5b7> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_0_551495986.1711717073372" ------=_Part_0_551495986.1711717073372 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Version |
Changes |
---|---|
1.0 |
Initial version |
1.1 |
Clarification of naming |
1.2 |
List of components and examples |
uGOAL describes a software package, which allows integration of the irj4= 5/SoM module into applications without using a full GOAL= framework platform. By stripping down the required dependencies from the G= OAL industrial communication framework, integration is possible into a wide= range of platforms from a simple ATMEGA 8-bit CPU with 2KB of RAM up to a = linux PC.
uGOAL mimics the required functionality from the GOAL framework specific= ally needed by the application controller framework. It is configurable in = different ways to ensure compatibility with a wide range of targets. Most G= OAL functionality is not available, however the CCM specific examples for f= ieldbus applications can be reused mostly without adaption.
uGOAL contains a core which includes the basic GOAL framework functional= ity required for Remote Procedere Call (RPC) wrappers. Following RPC wrappe= rs are available for uGOAL:
RPC wrapper |
functionality |
remarks |
---|---|---|
pnio |
Profinet Stack |
fully supported |
ecat |
EtherCAT Stack |
fully supported |
eip |
EtherNet/IP Stack |
fully supported |
http |
Web Server |
only recommended on targets with > 32kByte RAM available |
net |
UDP and TCP channels |
only recommended on targets with > 32kByte RAM available |
ccm |
ccm module management |
fully supported |
The uGOAL based software delivery is API compatible with the GOAL based = software delivery. Therefore all existing application and examples can be r= eused with minimal adaption. Thus the communication module user manual also= applies to the uGOAL software delivery: iRJ45/SoM - User Manual.
Many examples are available:
projects 2=E2=94=9C=E2=94=80=E2=94=80 2015013_irj45 3=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 01_pnio_io_mirror 4=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 02_eip_io_data 5=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 04_pnio_validation 6=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 05_pnio_01_simple_io 7=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 06_eip_io_data_static_ip 8=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 07_pnio_dsn 9=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 08_pnio_01_simple_io_http 10=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 09_ecat_slave 11=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 10_pnio_process_alarm 12=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 11_firmware_update 13=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 12_ecat_validation 14=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 13_firmware_update_callback 15=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 14_ip_management 16=E2=94=82 =E2=94=94=E2=94=80=E2=94=80 15_tcp_proxy 17=E2=94=9C=E2=94=80=E2=94=80 goal_http 18=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 01_get 19=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 02_post 20=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 03_list_res 21=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 04_auth 22=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 05_template_cm 23=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 06_template_list 24=E2=94=82 =E2=94=94=E2=94=80=E2=94=80 07_template_table 25=E2=94=9C=E2=94=80=E2=94=80 goal_net 26=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 01_udp_receive 27=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 02_tcp_client 28=E2=94=82 =E2=94=94=E2=94=80=E2=94=80 03_tcp_server 29=E2=94=94=E2=94=80=E2=94=80 ugoal 30 =E2=94=9C=E2=94=80=E2=94=80 01_ethercat 31 =E2=94=9C=E2=94=80=E2=94=80 02_profinet 32 =E2=94=9C=E2=94=80=E2=94=80 03_eip 33 =E2=94=9C=E2=94=80=E2=94=80 04_profinet_dyn_modules 34 =E2=94=9C=E2=94=80=E2=94=80 05_ccm 35 =E2=94=9C=E2=94=80=E2=94=80 06_ethercat_minimal 36 =E2=94=9C=E2=94=80=E2=94=80 07_http_ip_management 37 =E2=94=9C=E2=94=80=E2=94=80 08_pnio_io_mirror 38 =E2=94=94=E2=94=80=E2=94=80 09_pnio_io_mirror_new_api
Examples from the 2015013_irj45 folder are derived from GOAL based examp= les. Additional description can be found here: iRJ45 / SoM - GOAL e= xamples.
Examples under the goal folder are developed with uGOAL in scope, thus t= hey are generally more suitable for smaller targets (up to only 8kByte of R= AM). Additional description can be found here: iRJ45 / SoM - uGOAL= Examples.
The platform interface required for integration into an platform contain= s of the following functions:
Function |
Signature |
Remark |
---|---|---|
plat_init |
void plat_= init( void ); |
This function is called upon start of the application. It is required to= initialize the required hardware peripherals here:
|
plat_spiTransfer |
int plat= _spiTransfer( const char *txBuf, /**< [in] transmission b= uffer */ char *rxBuf, /**< [out] receive buffe= r */ int size /**< size of valid buffe= r sizes */ ); |
This function needs to transfer the given data (txBuf) with a length of = size to the CCM module. The response data needs to be propagated into the r= xBuf buffer. Only the amount of data (size) is allowed to write into rxBuf.= This function is called cyclically by the uGOAL framework. |
plat_ledSet |
int plat_l= edSet( uint32_t state /**< led state field */ ); |
This function can be used to set LED states acquired from the CC module,= which may be required for some fieldbus protocol implementations. |
plat_heapAllocDone |
void pla= t_heapAllocDone( void ); |
This function is called when dynamic memory allocation is done. It can b= e used to evaluate the memory utilisation. |
plat_getMsTimer |
GOAL_TIM= ESTAMP_T plat_getMsTimer( void ); |
This function needs to return the number of milliseconds from start of t= he system. It is needed for timed operations and timeouts. |
Following optional functions are necessary to support EtherCAT DC.
plat_eventRegister |
int plat= _eventRegister( GOAL_BOOL_T flgAutostart, GOAL_MA_EVENT_NOTIFY fNotify ) |
This optiona function registers a callback function for external interru= pts used e.g. for EtherCAT DC. It also initializes the interrupts configure= d in the specific platform. |
plat_eventEnable |
int plat= _eventEnable( void ) |
Enables the configured events. |
plat_eventDisable |
int plat= _eventDisable( void ) |
Disables the configured events. |
The software delivery does not specifically consider issues of multi tas= king systems. Thus if one wants to integration the code into a multitasking= application, all uGOAL relevant functions should be concentrated and calle= d from one single task. Data exchange with other tasks should be done in a = protected way (locking, messages, semaphores, queues). This is not scope of= the software delivery.
Following table shows the most important configuration options of the so= ftware. Those are defined with a default value in ugoal/ugoal_default.h.
Configuration |
Default value |
Description |
---|---|---|
CONFIG_UGOAL_HEAP_BUFFER |
0 |
By default uGOAL uses malloc for initial memory allocation. It can be fo= rced to use a statically allocated buffer for initial memory allocation, if= e.g. the underlying platform does not provide such functionality. In each = case, behaviour will be the same. Only initially memory is allocated. Durin= g runtime of the application memory is static. |
CONFIG_UGOAL_HEAP_BUFFER_ALIGNMENT |
0 |
With this option allocated memory hunks can be forced to a specific alig= nment. This may be useful for platform specific adoption. |
CONFIG_UGOAL_HEAP_BUFFER_SIZE |
0 |
If the static memory buffer is enabled, with this option the size of the= buffer needs to be defined. |
CONFIG_UGOAL_DATAMAPPER |
0 |
The data mapper provides an abstraction of the cyclic data channel. If e= nabled, the RPC stack wrappers will map process data to this entity. Thus a= ccess to process data is convenient. Without the data mapper process data n= eeds to be accessed within the raw SPI frame. Usage of the data mapper cost= s some memory. |
CONFIG_UGOAL_TIMEOUT_RPC |
5000 |
This is the time (in milliseconds) before a RPC request is considered to=
be timed out. For debugging purpose this value may be set to 0, so a pause=
in execution of the application does not lead to communication errors. |
CONFIG_UGOAL_TIMEOUT_MEDIA |
1000 |
This is the time (in milliseconds) before missing communication on the S= PI is considered to be a fault. For debugging purpose this may be set to 0,= so a pause in execution of the application does not lead to communication = errors. For production purpose this value is not allowed to be 0.= strong> |
CONFIG_UGOAL_INSTANCE |
1 |
This option enables the optional support for instances of components in = UGOAL. The data mapper and HTTP requires and automatically enables this fea= ture. Otherwise it is not required, since it costs some memory. |
CONFIG_UGOAL_MAINLOOP_REG |
1 |
This option enables support for registration of cyclic functions during = the execution of the application. The data mapper requires and automaticall= y enables this feature. Otherwise it is not required, since it costs some m= emory. |
CONFIG_UGOAL_LOGGING |
0 |
This option enables UART logging. |
CONFIG_UGOAL_RPC_RB_SIZE |
274 |
This option configures the size of an entry within the RPC ring buffer. = It defines the maximum size of a RPC request. This value is optimized for m= emory footprint. Some applications may require larger values, if e.g. large= r amounts of data are transported via RPC. |
CONFIG_UGOAL_RPC_RB_ENTRIES |
1 |
This option configures the length of the ring buffer in chunks of CONFIG= _UGOAL_RPC_RB_SIZE. |
CONFIG_UGOAL_RPC_HANDLES |
2 |
This option configures the amount of available RPC handles. Each compone= nt (e.g. a communication Stack wrapper) requires a handle. One handle is al= located by the base system. |