如何调试闪存中的引导加载程序?

发布于 2024-08-23 06:08:50 字数 84 浏览 2 评论 0原文

s3c44b0x不支持flash断点(不像其他处理器,如lpc1758,有片上flash),那么当它仍然运行在flash中时如何调试bootloader?

s3c44b0x does not support flash breakpoint(unlike other processors such as lpc1758 which has on-chip flash), then how to debug bootloader when it still runs in the flash?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寂寞美少年 2024-08-30 06:08:50

逻辑分析仪、printf、ICE 和 EPROM/闪存仿真器将是老式方法。

三星 S3C44b0x (ARM7TDMI)声称拥有片上 ICE 断路器调试支持,因此您可能需要一个在线仿真器。

添加:

如果您有足够的 RAM,在从 Flash 启动期间,您可以将日志消息打印到 RAM 中的内存缓冲区,然后在 UART 初始化后使用 printf 串行输出该缓冲区。

第二个补充:

要隔离引导过程的哪个部分,您可以用空存根替换模块或步骤,其唯一目的是隔离崩溃。该方法是为了缩小失败的可能性。制作一个仅初始化第一个基本步骤(例如系统内存)的固件映像,如果可以的话,添加您的任务或进程管家模块/步骤,稍后包括初始化 UART 等。

如果您有输出引脚,请添加一些 LED 来计数二进制文件中的部分,使您可以查看当前正在运行的代码部分。

查看调试规则一书并打印您自己的免费调试规则海报。这是一本简短的书,虽然没有什么革命性的内容,但它巩固了调试过程,并帮助大多数人在调试时更有条理、更有条理。

参考文献:

Logic analyzer, printf, ICE, and EPROM / Flash memory emulator would be the old-school ways.

The Samsung S3C44b0x (ARM7TDMI) claims to have an on-chip ICE breaker debug support, so getting a In-Circuit Emulator might be what you want to do.

Added:

If you have enough RAM, during the booting from Flash you could print log messages to an in-memory buffer in RAM, and then output this buffer, using printf to serial later once the UART is initialized.

2nd addition:

To isolate which portion of the bootstrap process, you could replace modules or steps with empty stubs, with the sole intent to isolate crashing. The approach is to narrow the possibilities of failure. Make an firmware image that initializes only the first basic step e.g. the system's memory, if that works add your task or process housekeeper module / step, later including initializing the UART, etc.

If you have the output pins, add some LEDs to count the sections in binary, allowing your to see which section of code is currently running.

Check out the book Debugging Rules and print off your own copy of the free Rules of Debugging poster. It's a short book, and while nothing revolutionary it solidifies the debugging process, and helps most people be more organized and methodical in their debugging.

References:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文