2012-3-6 13:21:53 阅读9 评论0 62012/03 Mar6
bootloader中start.S详细注解
@文件包含处理
#include <config.h>
@由顶层的mkconfig生成,其中只包含了一个文件:configs/<顶层makefile中6个参数的第1个参数>.h
#include <version.h>
#include <status_led.h>
*************************************************************************
2012-3-6 13:20:09 阅读5 评论0 62012/03 Mar6
http://blog.csdn.net/figolqt/article/details/2501275
一、写在前面的
嵌入式系统软件开发主要包括五个方面:bootloader编写(移植)、驱动程序编写(移植)、操作系统裁减(移植)、文件系统制作、应用程序编写(移植)。
二、准备工作
在分析vivi源代码的时候,不打算完全按照vivi的代码来进行。我的思路是,以从nand flash启动为主线,分析从上电到引导内核的过程。以自己的理解去实现vivi的源代码,要自己手动编写,即使与vivi的代码相同。只有这样,才能从
2012-2-25 16:36:22 阅读5 评论0 252012/02 Feb25
2012-2-25 16:24:00 阅读3 评论0 252012/02 Feb25
反转单链表的代码
#include <stdio.h>
/*定义结构类型*/
struct LinkTest
{
int numbers;
char * name;
struct LinkTest * next;
};
/*函数声明*/
void print_link(struct LinkTest * );
struct LinkTest * rollback_link(struct LinkTest * );
2012-2-25 16:20:35 阅读7 评论0 252012/02 Feb25
有两种算法,既然是要反转,那么肯定是要破坏原有的数据结构的:
算法1:我们需要额外的两个变量来存储当前节点curr的下一个节点next、再下一个节点nextnext:
public static Link ReverseLink1(Link head)
{
Link curr = head.Next;
Link next = null;
Link nextnext = null;
//if no elements or only one element exists
if (curr == null || curr.Next == null)
{
return head;
}
//if more than one element
while (curr.Next != null)
{
next = curr.Next; //1