- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试在 QEMU 上使用 cortex M4 处理器模拟 STM32F407XX Controller 。我写的 .ld 文件如下:
ENTRY(_Reset)
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K
PERIPHERALS(rw) : ORIGIN = 0x40000000, LENGTH = 128K
}
SECTIONS
{
.startup . : { stm32.o(.text) } >FLASH
.text : { *(.text) }
.data : { *(.data) } >RAM AT> FLASH
.bss : { *(.bss COMMON) } >RAM
. = ALIGN(4);
. = . + 0x400; /* required amount of stack */
stack_top = 0x20020000;
}
当我生成 .elf 文件并运行代码时,出现错误
Qemu: fatal: Lockup: cant escalate 3 to Hardfault (Current Priority -1) error.
Aborted (Core Dumped)
我感觉是内存问题。我究竟做错了什么?我已经按照STM32F407的引用手册要求分配了flash、RAM内存。
为什么首先会出现此错误?我该如何解决此错误?谢谢。
最佳答案
将 vector 表放在正确的位置解决了这个问题。我在上面的评论中遵循了@peter Maydell 的所有说明。我在这里添加它们。
You can turn on some of the debug logging options of QEMU with -d ('in_asm,int,exec,cpu,guest_errors,unimp' are probably a good set to start with), which will tell you what your guest code is doing. I would start by checking that your ELF file has a vector table in it at the place where QEMU expects to find it. Otherwise QEMU will hard fault immediately out of reset (which is what the hardware does).
The core dump is expected: QEMU goes into lockup, but we don't emulate lockup correctly (strictly speaking QEMU should just sit there doing nothing like the real hardware does), so we print a register dump and abort(). As I said in my previous comment, your problem is almost certainly that your binary doesn't have a vector table.
The main thing you must have in your vector table is the entries for the initial PC and stack pointer. The interrupt and exception entries are worth putting in but will only be needed if there is an interrupt or exception. If you put in debugging handlers for the other faults you'll at least know when you get a fault due to a bug in the rest of your program, though
关于c - Qemu: fatal: Lockup: cant escalate 3 to Hardfault (Current Priority -1) 错误-Core Dumped,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55220313/
我正在研究 MySQL 用户定义函数 (UDF),它基本上是 Windows 系统函数的包装器。我的问题是 UDF 对于某些输入按预期工作,但会导致 mysqld 对于其他输入崩溃。 UDF 本身采用
我在 this 中搜索过官方文档查找python中 json.dump() 和 json.dumps() 之间的区别。很明显,它们与文件写入选项有关。 但是它们之间的详细区别是什么?在什么情况下一个比
以前写的很简单,只有几句话,最近发现本文是本博客阅读量最大的一篇文章,觉得这样有种把人骗进来的感觉,于是又细化了一些。如果还有不好的地方,欢迎指出。 首先说明基本功能: dumps是将dict转
有没有办法在运行 'erl' 时禁用“崩溃转储”和“核心转储”文件的生成? PS:我知道 erl 的“+d”选项,但我想完全禁用崩溃/核心转储的生成。 最佳答案 您还可以将 ERL_CRASH_DUM
这是一个错误吗? >>> import json >>> import cPickle >>> json.dumps(cPickle.dumps(u'å')) Traceback (most rece
我已经开始了解用于对象序列化和反序列化的pickle模块了。 我知道pickle.dump是用来将代码存储为字节流(序列化),而pickle.load本质上是相反的,转成流字节返回到 python 对
我有一个这种格式的字符串, d = {'details': {'hawk_branch': {'tandem': ['4210bnd72']}, 'uclif_branch': {'tandem':
下面是我的python代码 r = requests.get("https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults
我正在使用 PigLatin,使用 grunt,每次我“转储”东西时,我的控制台都会被诸如此类、诸如此类的非信息所破坏,有没有办法抑制这一切? grunt> A = LOAD 'testingData
我正在尝试将 mongodump 编辑的一组 .bson 文件 mongorestore 到位于 docker 中的 mongo 数据库,在我只有 SSH 访问权限的 Ubuntu 实例上。 我有一个
我正在尝试使用语音发送文本 watson api,但是当我设置 interim_results = True 时,我收到了值错误。请帮助我:) with open(join(dirname(__fil
鉴于 dump.rdb(或 .json 格式)文件中现有 redis 数据库的快照,我想在我自己的机器上恢复此数据以在其上运行一些测试。 任何有关如何执行此操作的指示都将不胜感激。 我尝试解析 dum
我对 Laravel 4 和 Composer 还是很陌生。当我做 Laravel 4 教程时,我无法理解这两个命令之间的区别; php artisan dump-autoload 和 compose
之间有区别吗 object = {1:"one", 2:"two", 3:"three"} file.write(json.dumps(object)) 和 json.dump(object) .如果
导出/导入整个模式的旧方法: exp user/pwdp@server FILE=export.dmp OWNER=user ROWS=Y imp newuser/pwd@server FULL=
我有一堆需要恢复的 mongo 数据库。我使用 mongodump 获取备份目录,其中包括其中的集合。像这样: |- mydir |-- db1 |--- collection1 |--- colle
尽管我在 root 下运行 dotnet-dump,并且进程在 root 下运行(请参阅下面的服务描述),但似乎我缺乏一些权限。 我还尝试了 home、var 和 tmp 中的其他目录:所有相同的消息
我正在尝试生成 LLVM IR 代码,作为 Kaleidoscope tutorial 的一部分我已成功完成在同一台机器上,使用这些相同的编译器标志。 我的代码在 clang++ 3.4 中编译没有错
我正在使用 eclipse 开发 Web 应用程序,当我尝试从 eclipse 中在服务器上运行我的应用程序时遇到了问题。 # # A fatal error has been detected by
给定一个任意的 picklable Python 数据结构data,是 with open('a', 'bw') as f: f.write(pickle.dumps(data)) 相当于 w
我是一名优秀的程序员,十分优秀!