Skip to content

"mpfs-rpmsg-bm"demo bulid with "undefined reference to `sprintf' "error #132

Discussion options

You must be logged in to vote

Hi @EricZhangjie ,

The mpfs-rpmsg demos in the polarfire-soc-amp-examples directory are compiled in standalone mode (no stdlib), that's the reason why there's no standard implementation of sprintf. However there is an ee_vsprintf function included in the project which can be used for the same purpose.

Example:
ee_vsprintf(info_string, "timer_cnt = %d, \r\n",timer_cnt);

There are also some additional helper functions which will write the string directly to UART after formatting. For example:

https://github.com/polarfire-soc/polarfire-soc-amp-examples/blob/main/mpfs-rpmsg-freertos/src/application/inc/pingpong_demo.c#L157

For more information please refer to the ee_vsprintf implementation wi…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@EricZhangjie
Comment options

@vfalanis
Comment options

@AntonKrug
Comment options

Answer selected by EricZhangjie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants