Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

printf("xxx")编辑报错 #9

Open
1003657663 opened this issue Aug 19, 2021 · 2 comments
Open

printf("xxx")编辑报错 #9

1003657663 opened this issue Aug 19, 2021 · 2 comments

Comments

@1003657663
Copy link

背景:
编译 example/8258_driver_test

报错:
undefined reference to `puts'

经查证:
u_printf.c 212行 有一句 extern void puts(char* s); 217行有 puts(my_printf_buff);
这个方法的实现在 example/at/app_uart.c
编译 非at项目的时候找不到这个方法
注释这两行代码后就可以编译通过

@sxyandapp
Copy link

+1 这个puts函数其实就是调用at_print函数打印结果到uart

@liantianji
Copy link

在要调用printf的地方添加
extern void puts(char *s) { at_print(s); }
后可以使用printf了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants