PIC调试 Error: can't open os_cpu_util_a.s for reading是什么问题,怎样解决
2个回答
展开全部
"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.
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.
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询