Added ELF-loader code, should probably eventually end up in core/loader.
Added some replacements for newlib's stdout. Added missing startup code. Some minor fixes.
This commit is contained in:
parent
d684c14aa6
commit
b105b40e9a
16 changed files with 3054 additions and 19 deletions
28
cpu/at91sam7s/dbg-io/dbg-printf.c
Normal file
28
cpu/at91sam7s/dbg-io/dbg-printf.c
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include <stdio.h>
|
||||
#include <debug-uart.h>
|
||||
#include <string.h>
|
||||
#include <strformat.h>
|
||||
|
||||
StrFormatResult
|
||||
write_str(void *user_data, const char *data, unsigned int len)
|
||||
{
|
||||
dbg_send_bytes((unsigned char*)data, len);
|
||||
return STRFORMAT_OK;
|
||||
}
|
||||
|
||||
|
||||
static StrFormatContext ctxt =
|
||||
{
|
||||
write_str,
|
||||
NULL
|
||||
};
|
||||
int
|
||||
printf(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
return format_str_v(&ctxt, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue