有没有可能在嵌入式ARM系统(STM32 F4)上开发一个使用protobuf-c 0.15并与使用protobuf的java服务器通信的系统?
protobuf-c 0.15使用动态内存分配。和编译抛出错误:
/opt/arm/sourcery-arm-none-eabi-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb2/libc.a(lib_a-abort.o): In function `abort':
abort.c:(.text+0xa): undefined reference to `_exit'
/opt/arm/sourcery-arm-none-eabi-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb2/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text+0x12): undefined reference to `_sbrk'
...我知道nanopb和protobuf-embedded-c。但他们对protobuf的支持有限。
发布于 2013-01-07 14:26:50
对_sbrk的未定义引用来自于CodeSourcery附带的新libc。您将需要提供系统调用函数来正确地将其连接到您的系统。请参见示例:https://sites.google.com/site/stm32discovery/open-source-development-with-the-stm32-discovery/getting-newlib-to-work-with-stm32-and-code-sourcery-lite-eabi
(关于nanopb对protobuf的有限支持,我想了解更多关于您需要哪些功能的信息。我是nanopb的作者。)
https://stackoverflow.com/questions/14184008
复制相似问题