MediaTek-Labs / mt3620_m4_software

mt3620_m4_driver
Other
33 stars 29 forks source link

printf #3

Closed Wiz-IO closed 4 years ago

Wiz-IO commented 4 years ago

Hi Please redefine printf(...) from debug file: mhal_osai.h https://github.com/MediaTek-Labs/mt3620_m4_software/blob/master/MT3620_M4_Driver/MHAL/inc/mhal_osai.h#L64

example (tested)

#ifdef OSAI_BARE_METAL
#   define OS_DEBUG(FORMAT, ...) do { /* printf(FORMAT, ##__VA_ARGS__); */ } while(0)
#else
#   define OS_DEBUG(FORMAT, ...) do { /* printf(FORMAT, ##__VA_ARGS__); */ } while(0)
#endif

#define osai_print OS_DEBUG
LawranceLiu commented 4 years ago

Hi Please refer to the latest release: release_191223 https://github.com/MediaTek-Labs/mt3620_m4_software/commit/bf79305cbe71cf968a96d2f074350325a01b896d The "printf" is implemented. You could refer to the sample code: https://github.com/MediaTek-Labs/mt3620_m4_software/blob/master/MT3620_M4_Sample_Code/BareMetal/MT3620_RTApp_BareMetal_HelloWorld/main.c