2021-07-01 14:12:44 +02:00

333 B

Right-click on the syscalls.c file and select Properties. Under C/C++ Build > Settings, check Exclude resource from build.

in main.c:

#include <stdio.h>
#include "retarget.h"
char buf[100];
RetargetInit(&huart1);

Example:

printf("\r\nYour name: ");
scanf("%s", buf);
printf("\r\nHello, %s!\r\n", buf);