准备测试CH565开发板的千兆网络通讯,查看CH565的数据手册里面也是让自己看示例程序,示例程序里面调用很多寄存器,初始化等函数,没办法跟数据手册对应起来。直接看程序是一头雾水
想请教下,有没有谁跑过这个例程,然后洗了调试总结分享之类的帖子,或者文章。
准备测试CH565开发板的千兆网络通讯,查看CH565的数据手册里面也是让自己看示例程序,示例程序里面调用很多寄存器,初始化等函数,没办法跟数据手册对应起来。直接看程序是一头雾水
想请教下,有没有谁跑过这个例程,然后洗了调试总结分享之类的帖子,或者文章。
我们EVT代码是底层的MAC帧收发。
TCP\UDP需要自行组包,或者跑以太网协议栈,如TCP\UDP例程可以发送邮件至sj@wch.cn获取
你好,我通过mj@wch.cn获取的TCP/UDP的DEMO程序,编译出错,应该是文件路径的问题,但是我把路径修改之后,还是编译出错。帮忙分析下,是哪里没设置好。
提示信息如下:
08:46:17 **** Incremental Build of configuration obj for project TCP_client ****
make -j8 all
Memory region Used Size Region Size %age Used
FLASH: 7356 B 64 KB 11.22%
FLASH1: 24 B 384 KB 0.01%
RAM: 24 B 16 KB 0.15%
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./User/Main.o: in function `net_initkeeplive':
D:\Code\EXAM\TCP_client\obj/../User/Main.c:83: undefined reference to `CH569NET_ConfigKeepLive'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./User/Main.o: in function `CH569NET_LibInit':
D:\Code\EXAM\TCP_client\obj/../User/Main.c:122: undefined reference to `CH569NET_GetVer'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\Code\EXAM\TCP_client\obj/../User/Main.c:127: undefined reference to `CH569NETConfig'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\Code\EXAM\TCP_client\obj/../User/Main.c:132: undefined reference to `CH569NET_ConfigLIB'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\Code\EXAM\TCP_client\obj/../User/Main.c:135: undefined reference to `CH569NET_Init'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./User/Main.o: in function `CH569NET_HandleSockInt':
D:\Code\EXAM\TCP_client\obj/../User/Main.c:163: undefined reference to `CH569NET_SocketRecvLen'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\Code\EXAM\TCP_client\obj/../User/Main.c:165: undefined reference to `CH569NET_SocketRecv'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\Code\EXAM\TCP_client\obj/../User/Main.c:171: undefined reference to `CH569NET_SocketSend'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./User/Main.o: in function `CH569NET_HandleGlobalInt':
D:\Code\EXAM\TCP_client\obj/../User/Main.c:199: undefined reference to `CH569NET_GetGlobalInt'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\Code\EXAM\TCP_client\obj/../User/Main.c:179: undefined reference to `CH569Inf'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\Code\EXAM\TCP_client\obj/../User/Main.c:223: undefined reference to `CH569NET_GetSocketInt'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./User/Main.o: in function `CH569NET_CreatTcpSocket':
D:\Code\EXAM\TCP_client\obj/../User/Main.c:253: undefined reference to `CH569NET_SocketCreat'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\Code\EXAM\TCP_client\obj/../User/Main.c:256: undefined reference to `CH569NET_SocketSetKeepLive'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\Code\EXAM\TCP_client\obj/../User/Main.c:259: undefined reference to `CH569NET_SocketConnect'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\Code\EXAM\TCP_client\obj/../User/Main.c:263: undefined reference to `CH569NET_SetSocketTTL'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./User/Main.o: in function `register_if_fn':
D:\Code\EXAM\TCP_client\obj/../User/Main.c:265: undefined reference to `ethernet_if'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./User/Main.o: in function `tcp_ip_stack_main_process':
D:\Code\EXAM\TCP_client\obj/../User/Main.c:325: undefined reference to `CH569NET_MainTask'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:\Code\EXAM\TCP_client\obj/../User/Main.c:326: undefined reference to `CH569NET_QueryGlobalInt'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./User/Main.o: in function `get_unique_mac':
D:\Code\EXAM\TCP_client\obj/../User/Main.c:341: undefined reference to `FLASH_ROMA_READ'
d:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./Network_driver/timer.o: in function `Net_TimerIsr':
D:/Code/EXAM/Net_SRC/Network_driver/timer.c:40: undefined reference to `CH569NET_TimeIsr'
collect2.exe: error: ld returned 1 exit status
RAM1: 18648 B 64 KB 28.45%
make: *** [makefile:55: TCP_client.elf] Error 1
08:46:32 Build Failed. 30 errors, 0 warnings. (took 14s.783ms)
您好,以太网代码涉及到H C A文件的工程包含,建议联系邮箱mj@wch.cn进行确认。
另外请教个问题,CH565的数据手册对千兆网络通讯章节写的特别简单,对功能和寄存器都没有进行介绍,DEMO程序中这部分的MAC调用函数也都是封装好打不开的。
如果需要更换不同的PHY芯片,移植起来会非常不方便,出现其他调试过程的问题,自己也无法很好的进行排查。
有更详细一点的数据手册可以提供给我们进行参考学习么?
您好,以太网相关代码我们主要以函数库形式提供,我们会提供类似TCP UDP的例程代码,如果有类似需求可以发送到mj@wch.cn进行咨询
DEMO程序已经邮件发给我了,我了解下你们是否还有除了DEMO程序之外的,可供参考的文档资料。
另外DEMO程序中,的TCP_clientl例程中,主动发送数据是采用哪个函数?
是通过如下两个函数么,还是有其他函数:
ETH_DMATxDescChainInit(ETH_DMADESCTypeDef *DMATxDescTab, UINT8* TxBuff, UINT32 TxBuffCount);
void ETH_DMARxDescChainInit(ETH_DMADESCTypeDef *DMARxDescTab, UINT8 *RxBuff, UINT32 RxBuffCount);