no-OS icon indicating copy to clipboard operation
no-OS copied to clipboard

Add xilinx network support

Open mchindri opened this issue 4 years ago • 4 comments

Created to debug a new tinyiiod version.

  • For tinyiiod seems to work, but it doesn't has the same performance as in linux.
  • Some file are token from here: https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps/lwip_echo_server/src because it seems that there is support for multiple xilinx boards.
  • Tested on zc706 and zedboard
  • At the moment lwip must be enabled manually from BSP with LWIP_DHCP set to true. (I failed to add them from makefile but there should be a way. I didn't spend too much time on that )

mchindri avatar Jan 04 '22 15:01 mchindri

So I just had a look at your branch - you seem to place the xilinx ethernet files here:

$ ls ../../network/xil_eth/
i2c_access.c  iic_phyreset.c  platform.c  platform_config.h  platform.h  platform_mb.c  platform_ppc.c  platform_zynq.c  platform_zynqmp.c  sfp.c  si5324.c  xil_eth.c  xil_eth.h

By modifying util.tcl like this:

-                -template  {Empty Application}
+                -template  {lwIP Echo Server}

And runing make on your branch, I get these files:

$ ls build/app/src/
echo.c  i2c_access.c  iic_phyreset.c  lscript.ld  main.c  platform.c  platform_config.h  platform.h  platform_mb.c  platform_ppc.c  platform_zynq.c  platform_zynqmp.c  README.txt  sfp.c  si5324.c  Xilinx.spec

This shows that the first commit can be dropped, just a slight adaptation of the build system would be needed:

  • util.tcl change above + a way to select the template from the Makefile (new parameter for util.tcl?)
  • src.mk get the etnernet files from the autogenerated location
  • remove that build/app/src/main.c (if files are included with SRC_DIRS += ..., otherwise not needed)
  • edit the build/app/src/platform_config.h file with a script to automatically add a #include "app_config.h" or whatever is needed.
  • ... (maybe other changes)

buha avatar Jan 07 '22 08:01 buha

v2

  • Fix bug (it seems to work ok now)
  • Won't try at this moment to solve the project creation. I will focus on iiod and trigger for the moment.

mchindri avatar Jan 07 '22 13:01 mchindri

  • Won't try at this moment to solve the project creation. I will focus on iiod and trigger for the moment.

okay, makes sense, we can do that later

buha avatar Jan 07 '22 15:01 buha

v3:

  • Fix comments
  • Add eth support for xilinx in iio_app (maybe make sens an other PR for it but for the moment it may be ok here)

mchindri avatar Jan 07 '22 17:01 mchindri