L1823 error on all volatiles in MCUInit.c

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

L1823 error on all volatiles in MCUInit.c

Jump to solution
2,220 Views
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!




Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
608 Views
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
 

View solution in original post

0 Kudos
Reply
3 Replies
609 Views
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 Kudos
Reply
608 Views
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 Kudos
Reply
608 Views
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 Kudos
Reply