Giter VIP home page Giter VIP logo

genavb_tsn's People

Contributors

ghmarwen avatar yackou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

genavb_tsn's Issues

Better documentation of build process for iMXRT1170+FreeRTOS

Hi.

I am trying to build this project for iMXRT1170 EVK but I am not able to fully understand the documentation.

  1. What MCUXpresso SDK software should be downloaded and which versions?
    The docs points to this section:
    image
    Is MCUXpresso Config Tools required? That doesn't make sense?

The section above (not the one that is linked) seems more relevant. But what is the correct middleware?
image

You can pick between:

  1. AVB/TSN stacks

  2. GenAVB/TSN evaluation package

  3. -- Development Package

  4. 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

How can I use this stack on ls1028 endpoint port eno0??

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

Bridge time synchronization

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?

endpoint_avb build broken for linux_imx8

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
  • inclusion of <linux/clk/imx-pll.h> that is not found in kernel tree
/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```

Not able to get clock sync working with iMXRT1170 and LinuxPTP grandmaster.

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

Add support for Gigabit phy/speed

Today, the speed is set to 100 Mbit/s here:

if [ "$AVB_MODE" -eq 1 ]; then
(easy to patch, but would be great if its configurable / driven by the phy mode selected)

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

Integration with MCUXpresso, MCUXpresso VScode extension or other host debug tools

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.