Files
new_f_3/Project/MDK-ARM/CpuRAM.ini
刘正航 609eb878d1 New
2026-04-16 16:55:01 +08:00

32 lines
1.1 KiB
INI
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
*********************************************************************************************************
【本例程在安富莱STM32F103ZE-EK开发板上调试通过 】
【QQ: 1295744630, 旺旺armfly, Email: armfly@qq.com 】
文件名: CpuRAM.ini
这是CPU内部RAM调试脚本。开始Load程序时由IDE控制仿真器执行这段脚本程序。
本脚本完成的功能是
(1) 装载目标程序到CPU内部RAM
(2) 设置堆栈指针SP
(3) 修改PC指针
脚本的语法:
参加MDK的HELP, 搜索关键字 “uv3 Library Routines” 可以看到uv3支持的脚本命令
Copyright (C), 2013-2014, 安富莱电子 www.armfly.com
*********************************************************************************************************
*/
FUNC void Setup (void) {
SP = _RDWORD(0x20000000); // 设置堆栈指针
PC = _RDWORD(0x20000004); // 设置PC指针
_WDWORD(0xE000ED08, 0x20000000); // 设置中断向量表地址
}
LOAD CpuRAM\obj\output.axf INCREMENTAL // 先装载代码到CPU内部RAM (工程选项中就不要选Load Application ar Startup)
Setup(); // 再调用Setup函数修改堆栈和PC指针(因为SP的值需要从目标代码中读取)
g, main // 运行到main()函数