Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!--Wmat (talk)
Please email User:Wmat if you experience any issues with the Request Account form.

ECE597 Listings for Chapter 7 xink

From eLinux.org
Revision as of 18:17, 15 April 2010 by Xinkeqiong (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Number Page Caption Listing
7-1 7-4 Simple C Function With Local Variable
int setup_memory_controller(board_info_t *p)
    {
    unsigned int *dram_controller_register = p->dc_reg;
...
7-2 7-4 Linker Command Script-Reset Vector Placement .../board/omap3/beagle/u-boot.lds
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
SECTIONS
{
	. = 0x00000000;

	. = ALIGN(4);
	.text	:
	{
		cpu/arm_cortexa8/start.o	(.text)
		*(.text)
	}
}
7-3 7-5 Reset Vectors …/cpu/arm_cortexa8/start.S
.globl _start
_start: 
		b	reset
		ldr	pc, _undefined_instruction
		ldr	pc, _software_interrupt
		ldr	pc, _prefetch_abort
		ldr	pc, _data_abort
		ldr	pc, _not_used
		ldr	pc, _irq
		ldr	pc, _fiq
_undefined_instruction: .word undefined_instruction
_software_interrupt:	.word software_interrupt
…
_pad:			.word 0x12345678 /* now 16*4=64 */
.global _end_vect
_end_vect:

7-4 7-9 Portions of U-Boot Board-Configuration Header File …/incluyde/configs/omap3_beagle.h
/*
 * High Level Configuration Options
 */
#define CONFIG_ARMCORTEXA8	1	/* This is an ARM V7 CPU core */
#define CONFIG_OMAP		1	/* in a TI OMAP core */
#define CONFIG_OMAP34XX		1	/* which is a 34XX */
#define CONFIG_OMAP3430		1	/* which is in a 3430 */
#define CONFIG_OMAP3_BEAGLE	1	/* working with BEAGLE */

#include <asm/arch/cpu.h>		/* get chip and board defs */
#include <asm/arch/omap3.h>

/*
 * Display CPU and Board information
 */
#define CONFIG_DISPLAY_CPUINFO		1
#define CONFIG_DISPLAY_BOARDINFO	1