Ale*_*ndr 2 c arm stm32 protocol-buffers
是否有可能开发一个在嵌入式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'
...
Run Code Online (Sandbox Code Playgroud)
我知道nanopb和protobuf-embedded-c.但他们对protobuf的支持有限.
未定义的引用_sbrk来自newlib,即CodeSourcery附带的libc.您需要提供系统调用功能才能将其与系统正确连接.例如,请参阅:https:
//sites.google.com/site/stm32discovery/open-source-development-with-the-stm32-discovery/getting-newlib-to-work-with-stm32-and-code-sourcery-精简版,EABI
(关于nanopb对protobuf的有限支持,我想更多地了解你需要什么功能.我是nanopb的作者.)