为什么LDRA TBRUN缺少自己看似基本的功能调用?
我正在使用 ldra的tbrun 在使用keil uvision的STM32L4芯片的现有项目上运行已知在另一个人的机器上成功的单元测试序列。现在,我的任务是尝试在自己的机器上打开它并进行一些小型编辑。
在汇编时,我在下面遇到此错误。乍一看,这当然是一个显而易见的编译错误消息 - 它以ldra_qq_test_comment()的名称的名称缺少一个函数,
具有正确的参数。
../src/my_source.cpp:626:6: note: candidate function not viable: requires 3 arguments, but 1 was provided
void ldra_qq_test_comment (char* fmt, int start, int new_line)
^
../src/my_source.cpp:2730:5: error: no matching function for call to 'ldra_qq_test_comment'
ldra_qq_test_comment ("Set Return Value : ldra_qq_retval equals 900.0f");
但这是...不是 my 源代码的一部分,my_source.cpp
。行号和代码与我的代码中的任何内容都不匹配。而且我当然不会从我的源代码中调用任何LDRA功能。
经过仔细检查,似乎是LDRA本身的一些注入代码,ldra_qq_test_comment()
,以提及它控制的一个存根或模拟功能。但是,为什么LDRA找不到自己的评论功能?
我是否缺少插件或其他内容?关于如何解决这个问题有什么想法吗?
I'm using LDRA's TBRun on an existing project for an STM32L4 chip using Keil uVision, and trying to run a unit test sequence that is known to have succeeded on another person's machine. I'm now tasked with trying to open it on my own machine and make some small edits.
On compilation, I'm getting this error below. At first glance, it's of course quite an obvious compilation error message -- it's missing a function by the name of ldra_qq_test_comment()
with the right number of parameters.
../src/my_source.cpp:626:6: note: candidate function not viable: requires 3 arguments, but 1 was provided
void ldra_qq_test_comment (char* fmt, int start, int new_line)
^
../src/my_source.cpp:2730:5: error: no matching function for call to 'ldra_qq_test_comment'
ldra_qq_test_comment ("Set Return Value : ldra_qq_retval equals 900.0f");
But that's... not part of my source code in my_source.cpp
. The line number and code does not match anything from my code. And I certainly do not myself call any LDRA function from my source code.
On closer inspection, it appears to be some injected code by LDRA itself, ldra_qq_test_comment()
, to mention about perhaps one of the stubs or mocked functions it controls. But, why can't LDRA find its own comment function?
Am I missing a plugin or something? Any idea on how to resolve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了解决方案。
这里要知道的关键是,即使您有 keil tlp (ARMCC)在LDRA TBRUN的编译器列表中安装的项目的编译器,并且您选择了它 - ldra的TBRUN还必须成功地执行第二步,以使用该编译器编译自己的库。
ldra的tbrun tbrun will不要让您知道它缺少了自己的库,除了以这种循环的方式解密编译器日志中的茶叶的方式。
安装编译器时,末尾有一个复选框,可以选择在安装后编译该编译器的LDRA库。 这是与安装的单独步骤,以后调用批处理脚本,因此,如果发生故障(在我的情况下发生),安装似乎仍然成功。
您需要观看日志在此步骤中,请仔细确保它成功,如果没有,请尝试找出缺少哪些STM32 CMSIS和DFP软件包,然后进入Keil Uvision IDE,并确保安装期望的内容。
就我而言,这是令人困惑的,因为我为芯片安装了CMSIS和DFP,但是它期望每个版本的较旧版本,并且未能警告过。检查CMD提示输出是否为CMSIS和DFP包含了用于给定芯片的LDRA库时使用的路径,这应该告诉您所需的版本。
I found the solution.
The key thing to know here is, even if you have the Keil TLP (armcc) compiler for the project installed in LDRA TBrun's list of compilers, and you have it selected -- LDRA's TBrun must also successfully perform a second step of compiling its own libraries with that compiler.
LDRA's TBrun will not let you know that it's missing its own libraries, other than in this round-a-bout way of deciphering the tea leaves in the compiler's log.
When you install the compiler, there's a checkbox at the end that gives you the choice to compile the LDRA libraries for that compiler after the install. This is a separate step from the install by calling a batch script afterwards, so if it fails, which happened in my case, the install will still appear to have succeeded.
You'll need to watch the logs on that step carefully to make sure it succeeds, and if not, try to figure out which STM32 CMSIS and DFP packages it's missing, and go into the Keil uVision IDE and make sure to install what it expects.
In my case, it was confusing, because I had the CMSIS and DFP installed for my chip, but it was expecting older versions of each and failed to warn about that. Check the cmd prompt output for what CMSIS and DFP include paths it's using when compiling the LDRA libraries for your given chip, and that should tell you which version it wants.