##// END OF EJS Templates
Sync
Sync

File last commit:

r89:68078fc5f465 dev_alexis
r97:596815cfc1ab dev_alexis
Show More
startup.c
35 lines | 692 B | text/x-c | CLexer
Jeandet Alexis
wraped printf for simulator.
r89 #include <stdio.h>
#include <stdarg.h>
#include <streamdevices.h>
Added Simulator target to run code on x86 and debug functions....
r63
Jeandet Alexis
wraped printf for simulator.
r89 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);
}
Added Simulator target to run code on x86 and debug functions....
r63
int main(void)
{
bsp_init();
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 libuc_main();
Added Simulator target to run code on x86 and debug functions....
r63 }