原创 ViVi

2009-7-2 11:18 2046 2 2 分类: MCU/ 嵌入式

head.s     config.h(包含autoconf.h---autoconf.h(配置选项)


              linkage.h-(链接相关)


              machine.h(平台选择,包含smdk2410)---smdk2410.h


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 


       WatchDog


       禁止所有中断


       初始化系统时钟


       初始化内存控制器


       检查是否从掉电模式唤醒


       点亮LED GPF=<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />0


       初始化UART0


       vivi所有代码从nandflash复制到sdram , 然后 run on sdram


       跳到bootloader的阶段2运行 main()


 


 


main.c


       reset_handler()      /lib/reset_handle.c


              clear_mem()          /lib/memory.c 内存清0


       board_init()            /arch/s3c2410/smdk.c


              init_time()              /arch/s3c2410/proc.c     TCFG0=0xf00


              set_gpios()            /arch/s3c2410/smdk.c   设置GPA--GPH端口,EXTINT0--2


       mem_map_init();    /arch/s3c2410/mmu.c


              mem_map_nand_boot()


                     mem_mepping_linear     建立页表。页表存放在SDRAM物理地址                                                                   0x33dfc000开始处,共16K:一个页表项4字节                                                               (32bit Word),共有4096个页表项;每个页表项对                                                  1M地址空间,共4G


                    


              cache_clean_invalidate()


              tlb_invalidate()


       mem_init()      启动MMU


              arm920_setup()


       heap_init()      建立堆/lib/heap.c


              mmalloc_init()


       mtd_dev_init()              Memory Technology Device,在上层应用和硬件驱动的中间,抽                象出MTD设备层。驱动层仅仅提供一些简单的接口,比如读写、                             擦除及查询。MTD层将驱动层提供的函数封装起来,向上层提                             供统一的接口。/drivers/mtd/mtdcore.c


              mtd_init()       /drivers/mtd/maps/s3c2410_flash.c


                     smc_init()      /drivers/mtd/maps/s3c2410_flash.c


 


 


 


 


 


 


       init_priv_data()      /lib/priv_data/rw.c


              get_default_priv_data()


              load_saved_priv_data()


       misc()     /arch/s3c2410/smdk.c


              add_command(&cpu_cmd) 


       init_builtin_cmds() /lib/command.c


              add_command()


       boot_or_vivi()       /init/main.c


              vivi_shell()     /init/main.c


                     serial_term()  /drivers/serial/term.c


                            ..


                            getcmd()        /drivers/serial/getcmd.c


                            exec_string()  /lib/command.c


                                   ..


                                   parseargs()    确定参数      /lib/command.c


                                   execcmd()     执行命令      /lib/command.c


 


              run_autoboot()      /init/main.c


                     exec_string("boot")       /lib/command.c


                            command_boot()          /lib/boot_kernel.c


                                   boot_kernel()               /lib/boot_kernel.c


                                          ..


                                          setup_linux_param()


                                          call_linux()

PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
EE直播间
更多
我要评论
0
2
关闭 站长推荐上一条 /3 下一条