##// END OF EJS Templates
Huge cleanup, removed old unmaintained boards/libs/archs....
Huge cleanup, removed old unmaintained boards/libs/archs. Changed from building once the lib in small archives to whole rebuilding from sources for each executable, this will allow to use build-time switchs/optimisations. /!\ Simulator broken.

File last commit:

r89:68078fc5f465 dev_alexis
r105:031afdd64272 tip dev_alexis
Show More
startup.c
35 lines | 692 B | text/x-c | CLexer
#include <stdio.h>
#include <stdarg.h>
#include <streamdevices.h>
extern streamdevice* __opnfiles__[];
extern int __real_printf(const char *format,...);
int __wrap_printf(const char *format,...)
{
char* str_buffer;
// for(int i =0;i<512;i++)str_buffer[i]='\0';
int i;
va_list ap;
va_start(ap,format);
vasprintf(&str_buffer,format,ap);
va_end(ap);
i=strlen(str_buffer);
__opnfiles__[1]->ops->write(__opnfiles__[1],(void*)str_buffer,1,i);
}
extern int __real_puts(const char *s);
int __wrap_puts(const char *s)
{
int i;
i=strlen(s);
__opnfiles__[1]->ops->write(__opnfiles__[1],(void*)s,1,i);
}
int main(void)
{
bsp_init();
libuc_main();
}