Skip to content

Commit d4dc3b8

Browse files
author
rt-labs bot
committed
Automatic catchup to commit 41958285b07c715ed7375b4d0db45feb7598f8f7
4195828 Remove path that does not exist from mutilatorrc 209a0bd Backport of github commits 0e48fbf test_dcp: Fix set_ip_suite_count 6930de2 pf_cmina: Fix ARP response after factory reset 11942a9 ports: Remove side effects from CC_ASSERT calls 079abf3 Add evaluation readme 0ea545f Add initial mutilator configuration 7ee3ba8 Add jenkins file to repository 51d1643 Add i.MX8MM Getting Started Guide d547e11 Adjust sample GSDML order no 6e9ede5 Point the cmake/tools submodule to the latest commit (with i.MX) 4d2026d Add i.MX8MM porting layer Based-On-Commit: 41958285b07c715ed7375b4d0db45feb7598f8f7 Change-Id: Icb9dc31ade7c1a8dfdf94104a6266b763d4ed9ec
1 parent 8a14ce4 commit d4dc3b8

8 files changed

+385
-1
lines changed

.github/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Evaluation version
2+
3+
This repository contains an evaluation version of **P-Net**, a P-Net stack
4+
for Profinet Device implementations. It is especially well suited for
5+
embedded systems where resources are limited and efficiency is crucial.
6+
It is written in C and can be run on an RTOS such as rt-kernel, FreeRTOS,
7+
or on Linux.
8+
9+
It does not contain any ports and cannot be built without adding additional sources.
10+
11+
See [readme](../README.md) for more information on the complete version of the stack and the [releases](https://github.com/rtlabs-com/p-net/releases) for binary downloads for common targets.
12+
13+
This version of P-Net can be used for evaluation purposes
14+
only. Contact <sales@rt-labs.com> if you intend to use this stack in a
15+
product or if you need assistance during evaluation. The commercial
16+
version of this stack is supplied with full sources.

requirements.jenkins.in

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
gcovr
2+
-r doc/requirements.txt

requirements.jenkins.txt

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements.jenkins.in -o requirements.jenkins.txt
3+
accessible-pygments==0.0.4
4+
# via pydata-sphinx-theme
5+
alabaster==0.7.16
6+
# via sphinx
7+
babel==2.14.0
8+
# via
9+
# pydata-sphinx-theme
10+
# sphinx
11+
beautifulsoup4==4.12.3
12+
# via pydata-sphinx-theme
13+
breathe==4.34.0
14+
certifi==2024.2.2
15+
# via requests
16+
chardet==5.2.0
17+
# via reportlab
18+
charset-normalizer==3.3.2
19+
# via requests
20+
codespell==2.2.2
21+
colorlog==6.8.2
22+
# via gcovr
23+
commonmark==0.9.1
24+
# via recommonmark
25+
docutils==0.17.1
26+
# via
27+
# breathe
28+
# myst-parser
29+
# pydata-sphinx-theme
30+
# recommonmark
31+
# rst2pdf
32+
# sphinx
33+
# sphinx-jinja
34+
gcovr==7.2
35+
graphviz==0.20.1
36+
idna==3.7
37+
# via requests
38+
imagesize==1.4.1
39+
# via sphinx
40+
importlib-metadata==7.1.0
41+
# via rst2pdf
42+
jinja2==3.1.3
43+
# via
44+
# gcovr
45+
# myst-parser
46+
# rst2pdf
47+
# sphinx
48+
# sphinx-jinja
49+
lxml==5.2.1
50+
# via gcovr
51+
markdown-it-py==2.2.0
52+
# via
53+
# mdit-py-plugins
54+
# myst-parser
55+
markupsafe==2.1.5
56+
# via jinja2
57+
mdit-py-plugins==0.3.5
58+
# via myst-parser
59+
mdurl==0.1.2
60+
# via markdown-it-py
61+
myst-parser==0.18.1
62+
packaging==24.0
63+
# via
64+
# pydata-sphinx-theme
65+
# rst2pdf
66+
# sphinx
67+
pillow==10.3.0
68+
# via reportlab
69+
pydata-sphinx-theme==0.15.2
70+
# via sphinx-book-theme
71+
pyenchant==3.2.2
72+
# via sphinxcontrib-spelling
73+
pygments==2.17.2
74+
# via
75+
# accessible-pygments
76+
# gcovr
77+
# pydata-sphinx-theme
78+
# rst2pdf
79+
# rstcloth
80+
# sphinx
81+
pyyaml==6.0.1
82+
# via
83+
# myst-parser
84+
# rst2pdf
85+
# rstcloth
86+
# sphinxcontrib-kroki
87+
recommonmark==0.7.1
88+
reportlab==4.2.0
89+
# via rst2pdf
90+
requests==2.31.0
91+
# via
92+
# sphinx
93+
# sphinxcontrib-kroki
94+
rst2pdf==0.99
95+
rstcloth==0.5.3
96+
smartypants==2.0.1
97+
# via rst2pdf
98+
snowballstemmer==2.2.0
99+
# via sphinx
100+
soupsieve==2.5
101+
# via beautifulsoup4
102+
sphinx==5.3.0
103+
# via
104+
# breathe
105+
# myst-parser
106+
# pydata-sphinx-theme
107+
# recommonmark
108+
# rstcloth
109+
# sphinx-book-theme
110+
# sphinx-copybutton
111+
# sphinx-jinja
112+
# sphinxcontrib-kroki
113+
# sphinxcontrib-programoutput
114+
# sphinxcontrib-spelling
115+
sphinx-book-theme==1.0.1
116+
sphinx-copybutton==0.5.1
117+
sphinx-jinja==2.0.2
118+
sphinxcontrib-applehelp==1.0.8
119+
# via sphinx
120+
sphinxcontrib-devhelp==1.0.6
121+
# via sphinx
122+
sphinxcontrib-htmlhelp==2.0.5
123+
# via sphinx
124+
sphinxcontrib-jsmath==1.0.1
125+
# via sphinx
126+
sphinxcontrib-kroki==1.3.0
127+
sphinxcontrib-programoutput==0.17
128+
sphinxcontrib-qthelp==1.0.7
129+
# via sphinx
130+
sphinxcontrib-serializinghtml==1.1.10
131+
# via sphinx
132+
sphinxcontrib-spelling==8.0.0
133+
tabulate==0.8.10
134+
# via rstcloth
135+
tomli==2.0.1
136+
# via gcovr
137+
typing-extensions==4.11.0
138+
# via
139+
# myst-parser
140+
# pydata-sphinx-theme
141+
urllib3==2.2.1
142+
# via requests
143+
zipp==3.18.1
144+
# via importlib-metadata

src/device/pf_cmina.c

+9
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,15 @@ int pf_cmina_set_default_cfg (pnet_t * net, uint16_t reset_mode)
318318
0,
319319
sizeof (net->cmina_nonvolatile_dcp_ase.station_name));
320320

321+
/* Reset network interface */
322+
pnal_set_ip_suite (
323+
net->pf_interface.main_port.name,
324+
&net->cmina_nonvolatile_dcp_ase.full_ip_suite.ip_suite.ip_addr,
325+
&net->cmina_nonvolatile_dcp_ase.full_ip_suite.ip_suite.ip_mask,
326+
&net->cmina_nonvolatile_dcp_ase.full_ip_suite.ip_suite.ip_gateway,
327+
net->cmina_nonvolatile_dcp_ase.station_name,
328+
true);
329+
321330
pf_file_clear (p_file_directory, PF_FILENAME_IP);
322331
pf_file_clear (p_file_directory, PF_FILENAME_DIAGNOSTICS);
323332
#if PNET_OPTION_SNMP

src/drivers/drivers.cmake

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#********************************************************************
2+
# _ _ _
3+
# _ __ | |_ _ | | __ _ | |__ ___
4+
# | '__|| __|(_)| | / _` || '_ \ / __|
5+
# | | | |_ _ | || (_| || |_) |\__ \
6+
# |_| \__|(_)|_| \__,_||_.__/ |___/
7+
#
8+
# www.rt-labs.com
9+
# Copyright 2018 rt-labs AB, Sweden.
10+
#
11+
# This software is dual-licensed under GPLv3 and a commercial
12+
# license. See the file LICENSE.md distributed with this software for
13+
# full license information.
14+
#*******************************************************************/
15+
if (PNET_OPTION_DRIVER_ENABLE)
16+
include( src/drivers/lan9662/driver.cmake )
17+
endif()
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#********************************************************************
2+
# _ _ _
3+
# _ __ | |_ _ | | __ _ | |__ ___
4+
# | '__|| __|(_)| | / _` || '_ \ / __|
5+
# | | | |_ _ | || (_| || |_) |\__ \
6+
# |_| \__|(_)|_| \__,_||_.__/ |___/
7+
#
8+
# www.rt-labs.com
9+
# Copyright 2020 rt-labs AB, Sweden.
10+
#
11+
# This software is licensed under the terms of the BSD 3-clause
12+
# license. See the file LICENSE distributed with this software for
13+
# full license information.
14+
#*******************************************************************/
15+
16+
17+
cmake_minimum_required(VERSION 3.14)
18+
19+
# Attempt to find externally built mera library
20+
find_package(mera QUIET)
21+
22+
if (NOT mera_FOUND)
23+
# Download and build mera locally as a static library
24+
# Todo: this is a private repo. Switch to public repo before release
25+
message(STATUS "Fetch mera from github")
26+
include(FetchContent)
27+
FetchContent_Declare(
28+
mera
29+
GIT_REPOSITORY https://github.com/microchip-ung/rtlabs-mera
30+
GIT_TAG b9d43d5
31+
)
32+
33+
FetchContent_GetProperties(mera)
34+
if(NOT mera_POPULATED)
35+
FetchContent_Populate(mera)
36+
set(BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS})
37+
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
38+
add_subdirectory(${mera_SOURCE_DIR} ${mera_BINARY_DIR} EXCLUDE_FROM_ALL)
39+
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "" FORCE)
40+
endif()
41+
42+
endif()

src/drivers/lan9662/driver.cmake

+154
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
#********************************************************************
2+
# _ _ _
3+
# _ __ | |_ _ | | __ _ | |__ ___
4+
# | '__|| __|(_)| | / _` || '_ \ / __|
5+
# | | | |_ _ | || (_| || |_) |\__ \
6+
# |_| \__|(_)|_| \__,_||_.__/ |___/
7+
#
8+
# www.rt-labs.com
9+
# Copyright 2018 rt-labs AB, Sweden.
10+
#
11+
# This software is dual-licensed under GPLv3 and a commercial
12+
# license. See the file LICENSE.md distributed with this software for
13+
# full license information.
14+
#*******************************************************************/
15+
16+
cmake_dependent_option (
17+
PNET_OPTION_DRIVER_LAN9662
18+
"Enable LAN9662 HW Offload driver" OFF
19+
"PNET_OPTION_DRIVER_ENABLE" OFF )
20+
21+
if (PNET_OPTION_DRIVER_LAN9662)
22+
23+
option(PNET_OPTION_LAN9662_SHOW_RTE_INFO "Show RTE config log message" OFF)
24+
set(PNET_LAN9662_MAX_FRAMES 2 CACHE STRING "Max active CPM and PPM instances")
25+
set(PNET_LAN9662_MAX_IDS 16 CACHE STRING "Max subslots for a frame")
26+
27+
set(PNET_LAN9662_VCAM_BASE 2 CACHE STRING "LAN9662 VCAP base index")
28+
set(PNET_LAN9662_RTP_BASE 4 CACHE STRING "LAN9662 RTP base index")
29+
set(PNET_LAN9662_WAL_BASE 6 CACHE STRING "LAN9662 write action list base index")
30+
set(PNET_LAN9662_RAL_BASE 8 CACHE STRING "LAN9662 read action list base index")
31+
32+
message(STATUS "LAN9662 pnet_driver_options.h configuration")
33+
configure_file (
34+
src/drivers/lan9662/pnet_driver_options.h.in
35+
include/pnet_driver_options.h
36+
)
37+
38+
message(STATUS "Add LAN9662 targets and configurations")
39+
40+
if(TARGET mera)
41+
message(STATUS "LAN9662 mera lib found")
42+
get_target_property(MERA_INCLUDES mera INCLUDE_DIRECTORIES)
43+
else()
44+
message(STATUS "LAN9662 mera lib not found - fetch repo")
45+
include(src/drivers/lan9662/add_mera_lib.cmake)
46+
get_target_property(MERA_INCLUDES mera INCLUDE_DIRECTORIES)
47+
endif()
48+
49+
add_executable(pn_lan9662 "")
50+
add_executable(pn_shm_tool "")
51+
52+
set_target_properties (pn_lan9662 pn_shm_tool
53+
PROPERTIES
54+
C_STANDARD 99
55+
)
56+
57+
add_subdirectory (samples/pn_dev_lan9662)
58+
add_subdirectory (samples/pn_shm_tool)
59+
60+
target_sources(profinet
61+
PRIVATE
62+
${PROFINET_SOURCE_DIR}/src/drivers/lan9662/src/pf_cpm_driver_lan9662.c
63+
${PROFINET_SOURCE_DIR}/src/drivers/lan9662/src/pf_lan9662_mera.c
64+
${PROFINET_SOURCE_DIR}/src/drivers/lan9662/src/pf_mera_trace.c
65+
${PROFINET_SOURCE_DIR}/src/drivers/lan9662/src/pf_mera_trace.c
66+
${PROFINET_SOURCE_DIR}/src/drivers/lan9662/src/pf_rte_uio.c
67+
${PROFINET_SOURCE_DIR}/src/drivers/lan9662/src/pf_sram_uio.c
68+
${PROFINET_SOURCE_DIR}/src/drivers/lan9662/src/pf_ppm_driver_lan9662.c
69+
)
70+
71+
target_include_directories(profinet
72+
PRIVATE
73+
src/drivers/lan9662
74+
src/drivers/lan9662/include
75+
${MERA_INCLUDES}
76+
)
77+
78+
target_link_libraries(profinet
79+
PUBLIC
80+
mera
81+
)
82+
83+
install (
84+
TARGETS mera
85+
EXPORT ProfinetConfig
86+
DESTINATION lib
87+
)
88+
89+
target_include_directories(pn_dev
90+
PRIVATE
91+
src/drivers/lan9662
92+
src/drivers/lan9662/include
93+
)
94+
95+
target_include_directories(pn_lan9662
96+
PRIVATE
97+
samples/pn_dev_lan9662
98+
src/drivers/lan9662
99+
src/drivers/lan9662/include
100+
src/ports/linux
101+
)
102+
103+
target_sources(pn_lan9662
104+
PRIVATE
105+
samples/pn_dev_lan9662/sampleapp_common.c
106+
samples/pn_dev_lan9662/app_utils.c
107+
samples/pn_dev_lan9662/app_log.c
108+
samples/pn_dev_lan9662/app_gsdml.c
109+
samples/pn_dev_lan9662/app_data.c
110+
samples/pn_dev_lan9662/app_shm.c
111+
src/ports/linux/sampleapp_main.c
112+
)
113+
114+
target_compile_options(pn_lan9662
115+
PRIVATE
116+
${APP_COMPILER_FLAGS}
117+
)
118+
119+
target_link_options(pn_lan9662
120+
PRIVATE
121+
-Wl,--gc-sections
122+
)
123+
124+
target_sources(pn_shm_tool
125+
PRIVATE
126+
samples/pn_shm_tool/pn_shm_tool.c
127+
)
128+
129+
target_compile_options(pn_shm_tool
130+
PRIVATE
131+
${APP_COMPILER_FLAGS}
132+
)
133+
134+
target_link_options(pn_shm_tool
135+
PRIVATE
136+
-Wl,--gc-sections
137+
)
138+
139+
target_link_libraries (pn_shm_tool PUBLIC rt pthread)
140+
141+
file(COPY
142+
src/drivers/lan9662/include/driver_config.h
143+
src/drivers/lan9662/include/pnet_lan9662_api.h
144+
DESTINATION include
145+
)
146+
147+
file(COPY
148+
src/ports/linux/set_network_parameters
149+
src/drivers/lan9662/set_profinet_leds
150+
DESTINATION
151+
${PROFINET_BINARY_DIR}/
152+
)
153+
154+
endif()

0 commit comments

Comments
 (0)