L1823 error on all volatiles in MCUInit.c

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

L1823 error on all volatiles in MCUInit.c

跳至解决方案
2,390 次查看
rjmmusic
Contributor I
Hello, I have a strange problem that I'm encountering in a CW6.0 project. I'm building for an 9S08AW60 target, and I've had it working successfully for quite a while. I've added more code recently and now I get these linker errors:

L1823: External object _SOPT in [Long path deleted]\MCUInit.c.o created by default

This repeats for what looks to be every volatile register variable referenced in MCUInit.c.

What could cause this? This was just working a short while ago. The only modifications I made to MCUInit.c are to add some code in the isr routines and to add a few #includes to bring in function prototypes. The #include <MC9SAW60.h> statement is right at the top of the file where PE left it, and it seems like all of those volatile definitions are there in the file.

Can anyone help me figure out what I'm doing wrong? Thanks!




标签 (1)
标记 (1)
0 项奖励
回复
1 解答
778 次查看
bigmac
Specialist III
Hello,
 
The error message means that the definition of the _SOPT register cannot be found.  This and the other MCU registers are defined in the file MC9SAW60.c, so there would seem a problem with the visibility of this file to the project, during linking.
 
Others may be able to advise the possible reason for this problem.
 
Regards,
Mac
 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
779 次查看
bigmac
Specialist III
Hello,
 
The error message means that the definition of the _SOPT register cannot be found.  This and the other MCU registers are defined in the file MC9SAW60.c, so there would seem a problem with the visibility of this file to the project, during linking.
 
Others may be able to advise the possible reason for this problem.
 
Regards,
Mac
 
0 项奖励
回复
778 次查看
Inabensa
Contributor I
Similar case (error) is done if you don't include "smac_MC9S08GT60.c" and "smac_MC9S08GT60.h" in sources group when you work with MC1321x target projects.  I used PTFD and PTFDD references with saccessfully result thanks to including this files.
0 项奖励
回复
778 次查看
rjmmusic
Contributor I
Ah, I see... I had forgotten about that file. It was in my project, under the Libs folder. CW wouldn't even try to compile the file for some reason, so I deleted the file from the project and added it back under Sources. Now it compiles and links, and I'm all set. Thanks!

0 项奖励
回复