nxp / genavb_tsn Goto Github PK
View Code? Open in Web Editor NEWNXP AVB/TSN stack
NXP AVB/TSN stack
Hi.
I am trying to build this project for iMXRT1170 EVK but I am not able to fully understand the documentation.
The section above (not the one that is linked) seems more relevant. But what is the correct middleware?
You can pick between:
AVB/TSN stacks
GenAVB/TSN evaluation package
-- Development Package
What are the flags FREERTOS_SDK
and FREERTOS_APPS
referring to? Is it the NXP SDK? Or is it the actual FreeRTOS kernel? What are the apps?
Thanks for your help
Hi,
I checked the README file that the ls1028 board support bridge mode of AVB/TSN stack. I wonder if I can use this stack only for endpoint port on ls1028 since it has one endpoint port eno0(ENETC) which the driver is pretty much same as IMX8 endpoint port.
Thank you
Hello,
I tested the GenAVB/TSN stack by using the LS1028ardb-pa board.
I focus on the time synchronization for the bridge. After setting up the bridge for ls1028 as below:
root@LS1028ARDB-Ubuntu:~# brctl show
bridge name bridge id STP enabled interfaces
docker0 8000.02426c4b8d20 no
lxcbr0 8000.00163e000000 no
switch 8000.5676ebb10de9 no swp0
swp1
swp2
swp3
virbr0 8000.525400610249 yes virbr0-nic
I execute the fgptp.sh start, however, the prompt on the screen is the end-point mode, not bridge mode.
root@LS1028ARDB-Ubuntu:~# fgptp.sh start
Using ps = ps ax
Starting fgptp endpoint stack
Setting PTP priority for pid 1492 to 61
Starting phc2sys
Meanwhile, I checked the log, there is no log fgptp-br
.
How to shift to bridge mode?
I'm trying to build genavb_tsn for a imx8 target but the build fails when trying to build the kernel module avb.ko. I have a toolchain from Yocto 3.4 for imx8mpevk. Kernel is based on linux-imx version 5.10.52.
Three initial issues that comes up:
error: unknown type name ‘raw_rwlock_t’
FEC_TX_RING_SIZE
and FEC_RX_RING_SIZE
are not defined/work/git/GenAVB_TSN$ make KERNELDIR=${OECORE_TARGET_SYSROOT}/usr/src/kernel CROSS_COMPILE=${TARGET_PREFIX} STAGING_DIR=${OECORE_TARGET_SYSROOT} KBUILD_OUTPUT=${STAGING_KERNEL_BUILDDIR} target=linux_imx8 config=endpoint_avb modules
Compiling using preset CC=aarch64-poky-linux-gcc -mcpu=cortex-a53 -march=armv8-a+crc+crypto -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/work/sdk/3.4/sysroots/cortexa53-crypto-poky-linux
install -d /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/target/usr/include/genavb/os
install -m ug+rw include/genavb/* /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/target/usr/include/genavb
install -m ug+rw include/linux/os/* /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/target/usr/include/genavb/os
install -m ug+rw build/linux_imx8/endpoint_avb/autoconf.h /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/target/usr/include/genavb
make -C build/linux_imx8/endpoint_avb/linux/modules V=0 modules MAKEFLAGS= GENAVB_INCLUDE=/work/git/GenAVB_TSN/include AUTOCONF=/work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/autoconf.h CONFIG_FILE=/work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/config
make[1]: Entering directory '/work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules'
make -C /work/sdk/3.4/sysroots/cortexa53-crypto-poky-linux/usr/src/kernel M=`pwd` modules CROSS_COMPILE="aarch64-poky-linux-" V=0 ARCH=arm64
make[2]: Entering directory '/work/sdk/3.4/sysroots/cortexa53-crypto-poky-linux/usr/lib/modules/5.10.74-rt53+g2410d1a6a202/build'
CC [M] /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/avbdrv.o
In file included from /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/avbdrv.h:29,
from /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/avbdrv.c:30:
/work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/net_port.h:69:9: error: unknown type name ‘raw_rwlock_t’
69 | raw_rwlock_t lock;
| ^~~~~~~~~~~~
In file included from /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/avbdrv.h:31,
from /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/avbdrv.c:30:
/work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/media_clock_drv.h:62:9: error: unknown type name ‘raw_rwlock_t’
62 | raw_rwlock_t lock;
| ^~~~~~~~~~~~
In file included from /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/avbdrv.c:30:
/work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/avbdrv.h:87:37: warning: "FEC_TX_RING_SIZE" is not defined, evaluates to 0 [-Wundef]
87 | #define TX_CLEANUP_QUEUE_MIN_AVAIL (FEC_TX_RING_SIZE + TX_BEST_EFFORT_TOTAL_QUEUE_SIZE)
| ^~~~~~~~~~~~~~~~
/work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/avbdrv.h:88:37: note: in expansion of macro ‘TX_CLEANUP_QUEUE_MIN_AVAIL’
88 | #define TX_CLEANUP_QUEUE_MAX_AVAIL (TX_CLEANUP_QUEUE_MIN_AVAIL + QUEUE_ENTRIES_MAX)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/avbdrv.h:90:29: note: in expansion of macro ‘TX_CLEANUP_QUEUE_MAX_AVAIL’
90 | #if TX_CLEANUP_QUEUE_SIZE < TX_CLEANUP_QUEUE_MAX_AVAIL
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/avbdrv.h:94:21: warning: "FEC_RX_RING_SIZE" is not defined, evaluates to 0 [-Wundef]
94 | #if RX_QUEUE_SIZE < FEC_RX_RING_SIZE
| ^~~~~~~~~~~~~~~~
In file included from /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/media_clock_rec_pll.h:25,
from /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/dmadrv.h:29,
from /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/debugfs.h:23,
from /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/avbdrv.c:36:
/work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/imx-pll.h:27:10: fatal error: linux/clk/imx-pll.h: No such file or directory
27 | #include <linux/clk/imx-pll.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:280: /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules/avbdrv.o] Error 1
make[2]: *** [Makefile:1822: /work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules] Error 2
make[2]: Leaving directory '/work/sdk/3.4/sysroots/cortexa53-crypto-poky-linux/usr/lib/modules/5.10.74-rt53+g2410d1a6a202/build'
make[1]: *** [Makefile:41: modules] Error 2
make[1]: Leaving directory '/work/git/GenAVB_TSN/build/linux_imx8/endpoint_avb/linux/modules'
make: *** [Makefile.linux:22: modules] Error 2```
Hi.
I am using the FreeRTOS-based stack targeting iMXRT1170. I have downloaded the latest available release which is Rev4.3.0 and SDK2.11.0 here: https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/wired-communications-middleware-for-nxp-microcontrollers:WIRED-COMM-MIDDLEWARE#avb-tsn
I am able to build and flash the examples onto my board and use the shell to edit the configuration. However, I am struggling to get gPTP working properly with a linuxPTP grandmaster. I have connected an ethernet cable directly from my board into a desktop running LinuxPTP. I do not have hardware timestamping on this desktop, but it should work all the same with
software-based timestamping.
This is the print-out I am getting from the board:
genavb_dbg.txt
The first lines is due to the fact that I have updated the config from the shell, but not provided all configuration parameters.
When I turn on debug logging of fgptp, log fgptp dbg
, I get the following:
fgptp_dbg.txt
Thanks for any advice
Hi,
I'm new for IMX.RT series and I am trying to build the TSN 802.1CB project for iMXRT1180 EVK, but I can not find any reference document.
Is there any document can help me build the project?
Thanks for your help
Today, the speed is set to 100 Mbit/s here:
GenAVB_TSN/linux/scripts/avb.sh
Line 844 in 157d836
In REALTIMEDEBUG_Rev2.5.pdf:
Attention: The PHY Delay Compensation Values in Table 64 are calibrated for 1 Gbps links. The i.MX AVB
endpoints are configured to run by default with 100 Mbps links. These compensation values should be enough to keep pDelay values under 800 ns (propagation time threshold), and therefore the port would still be declared as Capable.Future releases shall have proper compensation values for each supported link speed.
would be great to see this changed in the next release
Hi.
Thanks for greatly improving the documentation! It was a very pleasant experience to go through the steps to build AVB applications targeting FreeRTOS and iMXRT1170EVK. It would be really great with some advice on how to integrate this into MCUXpresso (or the VScode plugin). Currently, I am dragging and dropping the generated .bin
files onto the Mass Storage Device exposed by the companion chip on the EVK. It would be great to have the ability to flash and debug the code, use the managed linker scripts etc.
Alternatively, can you recommend some other host debug tools that enable flashing and stepping through code and interacts with GDB. I have some MCU Link and MCU Link Pro's here.
Thanks for suggestions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.