segger studio work with ea4357

This commit is contained in:
hathach
2018-03-09 16:22:10 +07:00
parent eaaebc2b88
commit 3e42845153
17 changed files with 36943 additions and 0 deletions

View File

@@ -87,6 +87,38 @@ int __sys_readc (void)
return (int) retarget_getchar();
}
#elif defined __SES_ARM && 0
#include <stdarg.h>
#include <stdio.h>
#include "__libc.h"
int printf(const char *fmt,...) {
char buffer[128];
va_list args;
va_start (args, fmt);
int n = vsnprintf(buffer, sizeof(buffer), fmt, args);
for(int i=0; i < n; i++)
{
retarget_putchar( buffer[i] );
}
va_end(args);
return n;
}
int __putchar(int ch, __printf_tag_ptr ctx)
{
(void)ctx;
retarget_putchar( (uint8_t) ch );
return 1;
}
int __getchar()
{
return retarget_getchar();
}
//--------------------------------------------------------------------+
// KEIL
//--------------------------------------------------------------------+