/***********************************************************/ /* Debug_RAM.ini: Initialization File for Debugging from Internal RAM */ /******************************************************/ /* This file is part of the uVision/ARM development tools. */ /* Copyright (c) 2005-2014 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) { SP = _RDWORD(0x24010000); // 设置栈指针SP,把0x24000000地址中的内容赋值到SP。 PC = _RDWORD(0x24010004); // 设置程序指针PC,把0x24000004地址中的内容赋值到PC。 XPSR = 0x01000000; // 设置状态寄存器指针xPSR _WDWORD(0xE000ED08, 0x24010000); // Setup Vector Table Offset Register } LOAD %L INCREMENTAL // 下载axf文件到RAM Setup(); //调用上面定义的setup函数设置运行环境 g, main //跳转到main函数