Replies: 1 comment 2 replies
-
|
yeah, originally, I would expect (2) i.e tusb_config.h to include <stdio.h> when custom printf is used, due to stdio.h is not always available on some platform #2942. Though I am flexible, if it causes issue with IDF, we can find another way like the issue mention using an macro to disable stdio include. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When
CFG_TUSB_DEBUG_PRINTFis enabled, the#include stdio.hisn't available so the linker is not able to findsnprinf()implementation.This might happen, when we provide the custom implementation, for example in
tusb_config.h:#define CFG_TUSB_DEBUG_PRINTF tiny_printfCurrent code in
tusb_debug.h:Later, we use the
snprintf()(line 122).I want to clarify the idea, because it seems that either we need:
#define CFG_TUSB_DEBUG_SNPRINTF, to be able to redefine it as well (tinyusb code-base)or:
#include <stdio.h>next to the user-definedCFG_TUSB_DEBUG_PRINTFfor example intusb_config.hto solve the linker issue.Was the option 2 the original idea which should be used?
Beta Was this translation helpful? Give feedback.
All reactions