PIC调试 Error: can't open os_cpu_util_a.s for reading是什么问题,怎样解决

 我来答
leisure8572
2018-02-11
知道答主
回答量:2
采纳率:0%
帮助的人:1768
展开全部

简单来说就是找不到os_cpu_util_a.s这个汇编档案,

解决方法:File->Project Properties(...)->Categories[..]->XC16(Global Options)->xc16-as->ASM include dirs,

手动加入汇编档案的目录即可

已赞过 已踩过<
你对这个回答的评价是?
评论 收起
千里之外那片海
2013-06-27
知道答主
回答量:17
采纳率:100%
帮助的人:1.5万
展开全部
"Error: can't open os_cpu_util_a.s for reading" Wednesday, March 16, 2011 7:21 PM (permalink)

0
Hi,
I am trying to get the uC/OS-II RTOS port for the PIC24 working for a project for school. I am trying to use the PIC24FJ256DA206 microcontroller.
When I compile the port files that were downloaded from the Micrium website, I get an error.

I have created a project in MPLAB 8.63 containing these files:

Source Files:
os_cpu_a.s
os_cpu_c.c
os_cpu_util_a.s
os_dbg.c

Header Files:
os_cpu.h

When I try to compile the project, I get this error:
"C:\Micrium\SOFTWARE\uCOS-II\Ports\Microchip\PIC24FJ256DA206\C30\os_cpu_a.s:33: Error: can't open os_cpu_util_a.s for reading"

The os_cpu_util_a.s file contains two macros that save and restore the state of the CPU during context switching.

I also get a few errors due to the fact that the macros within os_cpu_util_a.s have not been defined because the file can't be read.

I am new to the PIC24F series and new to the C30 tool suit. So, I'm not sure if this is a problem with the assembler, or where I have placed the files, or anything really.

The os_cpu_util_a.s file is being included by the os_cpu_a.s file with this line:
.include "os_cpu_util_a.s"

There are other files that are being included, and there are no errors with these.

I was thinking that i might be able to get around this problem by creating a C source file(os_cpu_util_c.c), defining the macros in the new C file, and using the inline assembly option:

asm(assembly instruction);

These macros have to be written in assembly due to the fact that the working registers cannot be accessed using C.

After doing this, I received an error saying "Error: can't open os_cpu_util_c.c for reading"

Does anybody know what the issue might be? Any input would be much appreciated.
Thanks,
-Pete

#1

mad.scientist
New Member

Total Posts : 6
Reward points : 0
Joined: 3/16/2011
Location: 0
Status: offline

Re:"Error: can't open os_cpu_util_a.s for reading" Thursday, March 17, 2011 12:26 PM (permalink)

0
So, I think I have solved that problem.

I'll post what I did just in case anyone has this, or a similar issue of "can't open file for reading."

In MPLAB, if you click on "Projects" and then "Build Options->Project" goto the "Directories" tab.
Then in the "Show directories for:" drop down box, select "Assembler Include Search Path."
Click "New" and add the path of the included file.
Now the assembler knows where to look for the included file.

This process can be followed for adding a path for Library files and *.h files as well.

I hope this helps someone else out.
本回答被网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式