完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我得到一个项目,一个C模块本身不能编译,但是被包含在父C模块中,这意味着我不能直接把它包括在我的项目中。我的问题是,我不能单步进入那个子模块,IDE用正确的相对路径和文件名表示“Source not., file:fddfdf”。我曾尝试在通用文件夹中添加目录,但它没有帮助。有人吗?使用IDE 3.40,XC16 1.24用于PIC24FJ256GB210器件。
以上来自于百度翻译 以下为原文 Hi, I got a project were a C-module is not compilable by itself but is #included in a parent C-module which means I cannot include it directly in my project. My problems is that I cannot single step into that sub-module, the IDE says "Source not found, file: fddfdf" with a correct relative path and file name. I have tried to add the directory in General->Source folders but it does not help. Anyone?! Using IDE 3.40, XC16 1.24 for a PIC24FJ256GB210 device. Thanks Goran Ekstrom |
|
相关推荐
13个回答
|
|
我同意,但这是第三方代码,所以没有选择。
以上来自于百度翻译 以下为原文 I agree but this is third party code so no choise. |
|
|
|
一个毫无意义的帖子,我应该叫他们白痴来帮助我的案子吗?或者你可以:
以上来自于百度翻译 以下为原文 Kind of pointless post, should I call them idiots to help my case or maybe you can: http://www.easygui.com/ |
|
|
|
也许不是,这只是C编译器的工作方式,所以调试工具并不期待。按照惯例,在包含的文件内不应该有可执行代码。我不能肯定这是不可能的,其他人可能会附和这样做的方法。
以上来自于百度翻译 以下为原文 Probably not, that just isn't how the C compiler is designed to work, so the debugging tools are not expecting it. Be convention, there should never be executable code inside an included file. I can't say for sure it's impossible, someone else may chime in with a way to do it. |
|
|
|
还要注意,有些工具在路径名中不喜欢非ASCII字符。您没有显示这些文件的实际相对路径名。检查路径中是否有重音符号或符号。
以上来自于百度翻译 以下为原文 also note, some of the tools don't like non-ASCII characters in path names. You did not show the actual relative path name to these files. Check if there are any accented characters or symbols in the path. |
|
|
|
重命名module.h,将其移动到正常的项目路径中,适应#include并继续。是的,导入C-code是有效的原因:主要是速度与可维护性,但是还有其他原因,比如有效的可变访问等等。
以上来自于百度翻译 以下为原文 Rename the module .h, move it into the normal project path, adapt the #includes and proceed. And yes - there exist valid reasons to 'import' C-code: mostly speed vs. maintainability, but there are further reasons like efficient variable access etc. |
|
|
|
一个毫无意义的帖子,我应该叫他们白痴来帮助我的案子,或者你可以:HTTP://www. EasyGui.com?你是否购买了可选的支持?
以上来自于百度翻译 以下为原文 Kind of pointless post, should I call them idiots to help my case or maybe you can: http://www.easygui.com/ Did you purchase the optional support ? |
|
|
|
我的客户拥有许可证,他们联系了他们的支持包。
以上来自于百度翻译 以下为原文 My customer owns the license and they have contacted them about a support package. |
|
|
|
当你做不寻常的事情时,各种工具都不工作是很常见的。我知道,因为我经常做“不寻常”的事情。这仅仅是因为他们不测试这种情况。我建议用微芯片提交一个支持案例。他们可能会决定在未来某个时刻修正这个问题。
以上来自于百度翻译 以下为原文 It is very common for various tools not to work when you do something unusual. I know because I often do "unusual" things. This is simply because they don't test such cases. I would suggest filing a support case with Microchip. They may decide to fix this at some point in the future. |
|
|
|
我想我还没有完全理解你的问题。我尝试了这个,同样的设备和编译器版本,它运行得很好。我能够进入包含的文件。你能提供一个简单的例子来说明这个问题吗?
以上来自于百度翻译 以下为原文 I think I don't completely understand your issue. I just tried this, same device and compiler version and it worked perfectly. I was able to step into the included file. Can you provide a simple example that illustrates the issue? // main.c #include #include "foo.c" void main(void) { i = 0; while (1) foo(); return; } //foo.c int i; void foo() { i = i + 1; } |
|
|
|
很有趣!嗯,IDE显示了一条错误消息,当我试图进入它时,“它找不到要调试的源文件”,在消息中包括了正确的文件夹名和正确的#includeC文件名,所以它似乎知道它们应该在哪里,但是无论如何都失败了。注意,失败的C文件位于主项目目录的子文件夹中。
以上来自于百度翻译 以下为原文 Interesting! Well, the IDE shows an error message that "it cannot find the source file for debugging" when I try to step into it, including the correct folder name and correct #included C-file name in the message so it seems to know where they should be (and are) but fails anyway. Note that the C-files that fail are located in a subfolder to the main project directory. |
|
|
|
我把FO移到一个子文件夹,仍然工作。我意识到这很可能令人沮丧。但是我认为知道MPLAB X一般正确地处理包含的文件是有用的。也许include语句的路径错了?(尤其是相对路径可能很棘手)我会尝试我给出的简单例子,看看它是否有效。然后不断修改它,使它越来越接近您正在处理的真实代码,直到找到破坏它的东西。
以上来自于百度翻译 以下为原文 I moved foo to a sub folder and still worked. I realize that this is likely frustrating. But I think it's useful to know that, in general, MPLAB X handles included files correctly. Maybe the include statement has the wrong path? (Especially relative paths can be tricky.) I would try the simple example I gave and see that it works. And then keep changing it to make it closer and closer to real code you are working with until you find the thing that breaks it. #include #include "subfoo.c" void main(void) { i = 0; while (1) foo(); return; } |
|
|
|
#include将搜索为项目设置的任何include路径以查找文件。也许编译器和调试器正在对包含的文件执行不同的wrt操作,并在哪里查找文件。
以上来自于百度翻译 以下为原文 #include will search any include paths setup for the project to find the files. Maybe the compiler and the debugger are doing things differently wrt to included files and where they look for them. |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
5166 浏览 9 评论
2000 浏览 8 评论
1928 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3174 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2226 浏览 5 评论
734浏览 1评论
615浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
506浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
631浏览 0评论
528浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-24 23:28 , Processed in 1.541940 second(s), Total 101, Slave 85 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号