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

Redirect printf to other function (like uart) to take log #60

Open
phamvantien96 opened this issue Mar 24, 2020 · 3 comments
Open

Redirect printf to other function (like uart) to take log #60

phamvantien96 opened this issue Mar 24, 2020 · 3 comments

Comments

@phamvantien96
Copy link

I find a C test framework for embedded, I find this but have a problem with the printf, puts function like a other function in stdio.h. So how can I redirect the printf.

@codylico
Copy link

The macro MUNIT_OUTPUT_FILE might be useful. At a glance, it seems to handle most of the library's main output. (Help message is hard-coded to printf, puts though.)

@phamvantien96
Copy link
Author

phamvantien96 commented Mar 25, 2020

Yeah, but seem not work at my system when I can't use the fprintf function.

@strohlaj
Copy link

Isn't this is often something that is provided by the board support package for your embedded system? The BSP that gets generated with my Xilinx Arm Cortex-M processor has a configuration file that indicates what uart the printf function outputs to.

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