是否可以查看源代码

是否可以查看源代码

本文介绍了RAM中的ARM Eclipse调试代码.是否可以查看源代码`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试调试复制到SRAM并从那里执行的代码时遇到问题.

I have a problem when try to debug the code which is copied to the SRAM and executed from there.

该代码将覆盖数据-但仅在系统更新期间完成.在链接描述文件中正确定义了放置代码的部分,调试器可以正确看到地址.但是当我进入该功能时(RAM中的代码是正确的),它不会将源文件与内存中执行的代码连接起来.

The code is overwriting the data - but it is done only during the system update. The sections where code is placed are correctly defined in the linker script file and the debuger correctly see the addresses. But when I step into the function (and the code in RAM is the correct one) it does not connect the source files with the code executed in the memory.

您知道该怎么做.在汇编程序级别上调试C代码并不是一件令我高兴的事情:)

Do you know how can it be done. Debugging C code on the assembler level is not something which makes me happy :)

任何帮助表示赞赏.

推荐答案

问题有点愚蠢.当您从闪存中调用RAM函数时(必须以这种方式进行第一次调用),它必须由贴面完成.它搞砸了调试器.但是拥有自己的调用宏(由于必须通过指针完成距离),一切正常

The problem is a bit silly. When you call RAM function from the FLASH (the first call has to be done this way) it has to be done by the veneer. It was messing up the debugger. But having own calling macro (because of the distance it has to be done via the pointer) everything works fine

示例调用宏.

#define RAMFCALL(func, ...)   {unsigned (* volatile fptr)() =  (unsigned (* volatile)())func; fptr(__VA_ARGS__);}

这篇关于RAM中的ARM Eclipse调试代码.是否可以查看源代码`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 15:11