[U-Boot] printf in uboot

Sidharth Baisane sidharth at analineartech.com
Mon Dec 12 08:29:43 CET 2011


hi,

 How can i use print statement  in uboot ???
 I tried printf in following program but its not executing it and my
program hangs afterwards.


void start_armboot (void)
{
    init_fnc_t **init_fnc_ptr;
    char *s;
#if defined(CONFIG_VFD) || defined(CONFIG_LCD)
    unsigned long addr;
#endif
*
    printf("starting armboot");*
    /* 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;


More information about the U-Boot mailing list