[英]Set Up the TCP IP Stack of Harmony Configurator on MPLab X IDE
我在“和谐配置”中添加了TCP / IP堆栈,但是它给了我下面的错误。 我的问题是如何使用MPLAB®Harmony集成软件框架v1.04.01在MPLab X IDE V3上正确设置TCP / IP堆栈。
尝试运行代码时出错:
../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/drivers/usart.c:81:19: error: 'U3MODE' undeclared here (not in a function)
../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/drivers/usart.c:81:40: error: 'U3STA' undeclared here (not in a function)
../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/drivers/usart.c:81:60: error: 'U3TXREG' undeclared here (not in a function)
nbproject/Makefile-tcp_ip.mk:693: recipe for target 'build/tcp_ip/production/_ext/28866467/usart.o' failed
../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/drivers/usart.c:81:82: error: 'U3RXREG' undeclared here (not in a function)
../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/drivers/usart.c:81:104: error: 'U3BRG' undeclared here (not in a function)
make[2]: *** [build/tcp_ip/production/_ext/28866467/usart.o] Error 1
make[2]: *** Waiting for unfinished jobs....
"/opt/microchip/xc32/v1.34/bin/xc32-gcc" -g -x c -c -mprocessor=32MX460F512L -ffunction-sections -O1 -D__XC \
-I../src -I../../../../microchip/harmony/v1_04_01/framework -I../src/system_config/tcp_ip/framework -I../src/system_config/tcp_ip -I../../../../microchip/harmony/v1_04_01/bsp/pic32mx460_pim+e16 -I../../../../microchip/harmony/v1_04_01/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MXI../../../../microchip/harmony/v1_04_01/third_party/rtos/FreeRTOS/Source/include \
-MMD -MF build/tcp_ip/production/_ext/682004257/system_debug.o.d -o build/tcp_ip/production/_ext/682004257/system_debug.o ../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/system_debug.c
"/opt/microchip/xc32/v1.34/bin/xc32-gcc" -g -x c -c -mprocessor=32MX460F512L -ffunction-sections -O1 -D__XC -I../src \
-I../../../../microchip/harmony/v1_04_01/framework -I../src/system_config/tcp_ip/framework -I../src/system_config/tcp_ip -I../../../../microchip/harmony/v1_04_01/bsp/pic32mx460_pim+e16 -I../../../../microchip/harmony/v1_04_01/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MXI../../../../microchip/harmony/v1_04_01/third_party/rtos/FreeRTOS/Source/include \
-MMD -MF build/tcp_ip/production/_ext/1577513309/tcpip_manager.o.d -o build/tcp_ip/production/_ext/1577513309/tcpip_manager.o ../../../../microchip/harmony/v1_04_01/framework/tcpip/src/tcpip_manager.c
"/opt/microchip/xc32/v1.34/bin/xc32-gcc" -g -x c -c -mprocessor=32MX460F512L -ffunction-sections -O1 -D__XC -I../src \
-I../../../../microchip/harmony/v1_04_01/framework -I../src/system_config/tcp_ip/framework -I../src/system_config/tcp_ip -I../../../../microchip/harmony/v1_04_01/bsp/pic32mx460_pim+e16 -I../../../../microchip/harmony/v1_04_01/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MXI../../../../microchip/harmony/v1_04_01/third_party/rtos/FreeRTOS/Source/include \
-MMD -MF build/tcp_ip/production/_ext/682004257/system_command.o.d -o build/tcp_ip/production/_ext/682004257/system_command.o ../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/system_command.c
nbproject/Makefile-tcp_ip.mk:699: recipe for target 'build/tcp_ip/production/_ext/682004257/system_command.o' failed
make[2]: Leaving directory '/home/myworkarea/HttpTester/firmware/HttpTester.X'
nbproject/Makefile-tcp_ip.mk:78: recipe for target '.build-conf' failed
make[1]: Leaving directory '/home/myworkarea/HttpTester/firmware/HttpTester.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
In file included from ../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/system_command.c:46:0:
../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/system_command.h:49:21: error: redefinition of typedef 'SYS_CMD_HANDLE'
../../../../microchip/harmony/v1_04_01/framework/system/command/sys_command.h:251:21: note: previous declaration of 'SYS_CMD_HANDLE' was here
../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/system_command.h:83:2: error: conflicting types for 'SYS_CMD_API'
../../../../microchip/harmony/v1_04_01/framework/system/command/sys_command.h:370:2: note: previous declaration of 'SYS_CMD_API' was here
../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/system_command.h:95:2: error: conflicting types for 'SYS_CMD_DEVICE_NODE'
../../../../microchip/harmony/v1_04_01/framework/system/command/sys_command.h:489:2: note: previous declaration of 'SYS_CMD_DEVICE_NODE' was here
../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/system_command.h:103:2: error: conflicting types for 'SYS_CMD_DEVICE_LIST'
../../../../microchip/harmony/v1_04_01/framework/system/command/sys_command.h:510:2: note: previous declaration of 'SYS_CMD_DEVICE_LIST' was here
../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/system_command.h:109:15: error: conflicting types for 'SYS_CMD_FNC'
../../../../microchip/harmony/v1_04_01/framework/system/command/sys_command.h:559:15: note: previous declaration of 'SYS_CMD_FNC' was here
../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/system_command.h:116:2: error: conflicting types for 'SYS_CMD_DESCRIPTOR'
../../../../microchip/harmony/v1_04_01/framework/system/command/sys_command.h:580:3: note: previous declaration of 'SYS_CMD_DESCRIPTOR' was here
../../../../microchip/harmony/v1_04_01/framework/tcpip/src/system/system_command.h:124:2: error: conflicting types for 'SYS_CMD_DESCRIPTOR_TABLE'
../../../../microchip/harmony/v1_04_01/framework/system/command/sys_command.h:602:3: note: previous declaration of 'SYS_CMD_DESCRIPTOR_TABLE' was here
发生“重新定义”错误是因为包含了两个定义相同typedef的头文件。 冲突文件为:
...\v1_04_02\framework\system\command\sys_command.h
和
...\v1_04_02\framework\tcpip\src\system\system_command.h
文件中包含的
...\v1_04_02\framework\tcpip\src\system\system_command.c
仅当包含Harmony组件“ TCPIP堆栈->使用TCP / IP命令”并且不包含“服务->命令->使用命令处理器系统服务”时,才包含文件system_command.c。
要消除冲突(和错误),请禁用“ TCPIP堆栈->使用TCP / IP命令”,或启用“服务->命令->使用命令处理器系统服务”(我不知道此组件的作用是,但如果启用它,代码将增长约30 KB)。
它看起来像包含在两个不同位置的一些头文件。
每个头文件中的多个保护代码应已阻止该事件的发生。
同样,看起来缺少定义UART 3中寄存器的头文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.