在主函数里只放了
#include <stdio.h>
#define ITM_PORT8(n) (*(volatile unsigned char *)(0xe0000000 + 4*(n)))
#define ITM_PORT16(n) (*(volatile unsigned short *)(0xe0000000 + 4*(n)))
#define ITM_PORT32(n) (*(volatile unsigned long *)(0xe0000000 + 4*(n)))
#define DEMCR (*(volatile unsigned long *)(0xE000EDFC))
#define TRCENA 0X01000000
int fputc(int ch, FILE *f)
{
if(DEMCR & TRCENA)
{
while(ITM_PORT32(0) == 0);
ITM_PORT8(0) = ch;
}
return ch;
}
int main(void)
{
printf("
hello world");
}
然后就出现了以下的问题
..OBJTemplate.axf: Error: L6200E: Symbol fputc multiply defined (by usart.o and main.o).
Not enough information to produce a FEEDBACK file.
Not enough information to list image symbols.
Not enough information to list the image map.
求助大佬,我应该怎么改才能实现打印功能
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>