Part Number:AM6442
利用linux来和R5,M4做ipc通信,更改官方的例程rpmsg_char_simple.c之后如何编译,编译一直没法通过
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /tmp/ccygnyZN.o: in function `rpmsg_char_ping': rpmsg_char_simple.c:(.text+0x150): undefined reference to `rpmsg_char_open' /usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: rpmsg_char_simple.c:(.text+0x308): undefined reference to `rpmsg_char_close' /usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /tmp/ccygnyZN.o: in function `main': rpmsg_char_simple.c:(.text+0x4b0): undefined reference to `rpmsg_char_init' /usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: rpmsg_char_simple.c:(.text+0x4f4): undefined reference to `rpmsg_char_exit' collect2: error: ld returned 1 exit status
这是报错
Gary Lu:
官方例程不建议修改~
如您修改了官方示例代码后,需要确保以下几点:
1. 您的修改没有错误,并且正确地调用了所需的函数2. 您包含了正确的头文件,编译器知道函数的声明3. 您链接了所需的库或对象文件