L1823 error on all volatiles in MCUInit.c

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

L1823 error on all volatiles in MCUInit.c

ソリューションへジャンプ
2,394件の閲覧回数
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 解決策
782件の閲覧回数
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 返答(返信)
783件の閲覧回数
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 件の賞賛
返信
782件の閲覧回数
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 件の賞賛
返信
782件の閲覧回数
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 件の賞賛
返信