关于调试脚本的更多原理介绍,请参考 “Realview MDK 中调试脚本的详细解析”见 。
在S3C2410 的MDK 移植过程中,调试脚本(SDRAM.INI)主要的内容是进行SDRAM 的配置和初始化运行指针。
/*******************************************************************/
/* Ext_RAM.INI: External RAM (SDRAM) Initialization File
*/
/*******************************************************************/
// <<< Use Configuration Wizard in Context Menu >>> //
/*******************************************************************/
/* This file is part of the uVision/ARM development tools. */
/* Copyright (c) 2005-2006 Keil Software. All rights reserved. */
/* This software may only be used under the terms of a valid, current, */
/* end user licence from KEIL for a compatible version of KEIL software */
/* development tools. Nothing else gives you the right to use this software.
*/
/********************************************************************/
FUNC void Setup (void) {
_WDWORD(0x53000000, 0x00000000);
_WDWORD(0x4A000008, 0xFFFFFFFF);
_WDWORD(0x4A00001C, 0x000007FF);
_WDWORD(0x4C000014, 0x00000003);
_WDWORD(0x4C000004, 0x0005c042);
_WDWORD(0x56000070, 0x00280000);
_WDWORD(0x56000078, 0x00000000);
_WDWORD(0x48000000, 0x22111110);
_WDWORD(0x48000004, 0x00000700);
_WDWORD(0x48000008, 0x00000700);
_WDWORD(0x4800000C, 0x00000700);
_WDWORD(0x48000010, 0x00000700);
_WDWORD(0x48000014, 0x00000700);
_WDWORD(0x48000018, 0x00000700);
_WDWORD(0x4800001c, 0x00018005);
_WDWORD(0x48000020, 0x00000700);
_WDWORD(0x48000024, 0x008e0459);
_WDWORD(0x48000028, 0x000000B2);
_WDWORD(0x4800002c, 0x00000030);
_WDWORD(0x48000030, 0x00000030);
_WDWORD(0x56000014, 0x00000001);
_WDWORD(0x56000020, 0xAAAA55AA);
_WDWORD(0x56000028, 0x0000FFFF);
_WDWORD(0x56000024, 0x00000000);
}
Setup(); // Setup for Init
LOAD SDRAM\Button_Test.axf INCREMENTAL // Download
PC = 0x30000000; // <o> Program Entry Point
g, main // Run to main function