⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mcf5272_lo.s

📁 MCF5272的板极初始化程序
💻 S
字号:
/*
 * File:	mcf5272_lo.s
 * Purpose:	Lowest level routines for the MCF5272.
 *
 * Notes:	
 */

#ifdef _UNDERSCORE_
#define mcf5272_init		_mcf5272_init
#define main				_main
#endif
 
	.extern ___MBAR
	.extern ___SRAM
	.extern ___SRAM_SIZE
	.extern ___SP_INIT
	.extern mcf5272_init
	.extern main

	.global asm_startmeup
	.global _asm_startmeup
	.global cpu_cache_flush
	.global _cpu_cache_flush

	.text

/********************************************************************
 * This is the main entry point upon hard reset.
 */
asm_startmeup:
_asm_startmeup:
	
	move.w	#0x2700,sr

	/* Initialize MBAR */
	move.l #(___MBAR + 1),d0
	movec	d0,MBAR
	
	/* Initialize RAMBAR: locate SRAM and validate it */
	move.l	#(___SRAM + 0x21),d0
	movec	d0,RAMBAR

	/* Point Stack Pointer into SRAM temporarily */
	move.l	#___SRAM,d0
	add.l	#___SRAM_SIZE,d0
	move.l	d0,sp

	/* Initialize mcf5272 periphs, etc */
	jsr		mcf5272_init

	/* Relocate Stack Pointer */ 
	move.l	#___SP_INIT,sp

	/* Jump to the main process */
	jmp		main
	
	bra		.
	nop
	nop
	halt

/********************************************************************
 * The MCF5272 has Instruction cache only
 */
cpu_cache_flush:
_cpu_cache_flush:
	nop						/* sync */
	move.l	#0x01000000,d0	/* Invalidate the I-Cache */
	movec d0,cacr
	rts

	.end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -