1 /* 2 * File : showmem.c 3 * This file is part of RT-Thread RTOS 4 * COPYRIGHT (C) 2006, 2008 RT-Thread Development Team 5 * 6 * The license and distribution terms for this file may be 7 * found in the file LICENSE in this distribution or at 8 * http://openlab.rt-thread.com/license/LICENSE 9 * 10 * Change Logs: 11 * Date Author Notes 12 * 2008-07-29 Bernard first version from QiuYi implementation 13 */ 14 15 #include <rtthread.h> 16 rt_hw_show_memory(rt_uint32_t addr,rt_uint32_t size)17void rt_hw_show_memory(rt_uint32_t addr, rt_uint32_t size) 18 { 19 int i = 0, j =0; 20 21 RT_ASSERT(addr); 22 23 addr = addr & ~0xF; 24 size = 4*((size + 3)/4); 25 26 while(i < size) 27 { 28 rt_kprintf("0x%08x: ", addr ); 29 30 for(j=0; j<4; j++) 31 { 32 rt_kprintf("0x%08x ", *(rt_uint32_t *)addr); 33 34 addr += 4; 35 i++; 36 } 37 38 rt_kprintf("\n"); 39 } 40 41 return; 42 } 43