[U-Boot] printf in uboot

siddharth baisane nov15twentyten at gmail.com
Mon Dec 12 08:51:45 CET 2011


hi,

I am trying to print statement in uboot.
but whenever I add *printf *statement board hangs.
For example in *u-boot/lib_arm/board.c* i added prinf statement and board
hags.




void start_armboot (void)
{
    init_fnc_t **init_fnc_ptr;
    char *s;
#if defined(CONFIG_VFD) || defined(CONFIG_LCD)
    unsigned long addr;
#endif


*printf("armboot starts\n");*
    /* Pointer is writable since we allocated a register for it */
    gd = (gd_t*)(_armboot_start - CONFIG_SYS_MALLOC_LEN - sizeof(gd_t));
    /* compiler optimization barrier needed for GCC >= 3.4 */
    __asm__ __volatile__("": : :"memory");

    memset ((void*)gd, 0, sizeof (gd_t));
    gd->bd = (bd_t*)((char*)gd - sizeof(bd_t));
    memset (gd->bd, 0, sizeof (bd_t));

    gd->flags |= GD_FLG_RELOC;

    monitor_flash_len = _bss_start - _armboot_start;







Thanks


More information about the U-Boot mailing list