EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

CCS device set to A, builds for device B!

Started by James Newton August 5, 2013
Ok, this one is just weird.

I have a project in CCS 5 for which I am setting the device to MSP430F5438 and it is compiling for the MSP430F5418A!

In the code, I have defines that setup different pin definitions depending on the processor. The client uses one of a few processors on their boards, they all run the same basic code, the only differences are which pin is assigned what function and a few other minor tweeks to account for chip differences. So, for example:

#ifdef __MSP430F5438__
#warn ("Building for MSP430F5438, Board A")
#define MOD5A
#include "msp430x54x.h"
#include "pinsetup.h" // Assign pins and functions
#endif

#ifdef __MSP430F5418A__
#warn ("Building for MSP430F5418a, Board B")
#define MOD5B
#include "msp430x54xa.h"
#include "pinsetupb.h" // Assign pins and functions
#endif

And in the code view, the highlighting shows that the code in the
#ifdef __MSP430F5438__
line will run and the other code will not.

But then I compile, and get this:

C:\progs\ti\ccsv5\utils\bin\gmake -k all
'Building file: ../main.c'
'Invoking: MSP430 Compiler'
"C:/progs/ti/ccsv5/tools/compiler/msp430/bin/cl430" -vmspx --abi=coffabi -O0 -g --include_path="C:/progs/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/progs/ti/ccsv5/tools/compiler/msp430/include" --define=__MSP430F5418A__ --diag_warning"5 --display_error_number --silicon_errata=CPU15 --silicon_errata=CPU18 --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal --asm_listing --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
"../main.c", line 175: warning #36-D: #warn ("Building for MSP430F5418a, MOD-5b Logger")

What. The. Heck?

I can go into the project properties, and /everything/ shows MSP430F5438. For example, the "Summary of flags set" under MSP430 Compiler shows this:

-vmspx --abi=coffabi -O0 -g --include_path="C:/progs/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/progs/ti/ccsv5/tools/compiler/msp430/include" --define=__MSP430F5438__ --diag_warning"5 --display_error_number --silicon_errata=CPU15 --silicon_errata=CPU18 --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal --asm_listing

Which is exactly right, and exactly what it doesn't do.

Help?

Beginning Microcontrollers with the MSP430

Nevermind.

If this ever happens to you, it's because you are using a version control system that sets the local files to read only when checked in, and when you checked OUT the project files, the .project and a few other files didn't get checked out for some ($@@#*%@@) reason and so the IDE was setting the correct values but couldn't write that out to the make config. So it made the old way, and looked like it was going to make the new way.

The interesting point there is that CCS never threw an error message when it failed to write the files.

Oh. My. Goodness. I love computers! :eyeroll:

--- In m..., "James Newton" wrote:
>
> Ok, this one is just weird.
>
> I have a project in CCS 5 for which I am setting the device to MSP430F5438 and it is compiling for the MSP430F5418A!
>
> In the code, I have defines that setup different pin definitions depending on the processor. The client uses one of a few processors on their boards, they all run the same basic code, the only differences are which pin is assigned what function and a few other minor tweeks to account for chip differences. So, for example:
>
> #ifdef __MSP430F5438__
> #warn ("Building for MSP430F5438, Board A")
> #define MOD5A
> #include "msp430x54x.h"
> #include "pinsetup.h" // Assign pins and functions
> #endif
>
> #ifdef __MSP430F5418A__
> #warn ("Building for MSP430F5418a, Board B")
> #define MOD5B
> #include "msp430x54xa.h"
> #include "pinsetupb.h" // Assign pins and functions
> #endif
>
> And in the code view, the highlighting shows that the code in the
> #ifdef __MSP430F5438__
> line will run and the other code will not.
>
> But then I compile, and get this:
>
> C:\progs\ti\ccsv5\utils\bin\gmake -k all
> 'Building file: ../main.c'
> 'Invoking: MSP430 Compiler'
> "C:/progs/ti/ccsv5/tools/compiler/msp430/bin/cl430" -vmspx --abi=coffabi -O0 -g --include_path="C:/progs/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/progs/ti/ccsv5/tools/compiler/msp430/include" --define=__MSP430F5418A__ --diag_warning"5 --display_error_number --silicon_errata=CPU15 --silicon_errata=CPU18 --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal --asm_listing --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
> "../main.c", line 175: warning #36-D: #warn ("Building for MSP430F5418a, MOD-5b Logger")
>
> What. The. Heck?
>
> I can go into the project properties, and /everything/ shows MSP430F5438. For example, the "Summary of flags set" under MSP430 Compiler shows this:
>
> -vmspx --abi=coffabi -O0 -g --include_path="C:/progs/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/progs/ti/ccsv5/tools/compiler/msp430/include" --define=__MSP430F5438__ --diag_warning"5 --display_error_number --silicon_errata=CPU15 --silicon_errata=CPU18 --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal --asm_listing
>
> Which is exactly right, and exactly what it doesn't do.
>
> Help?
>

Thank you for the heads up. I'm going to purposely try to cause your
problem to see if our CCS does the same thing.

We use SVN.

From: m... [mailto:m...] On Behalf
Of James Newton
Sent: Monday, August 05, 2013 9:57 PM
To: m...
Subject: [msp430] Re: CCS device set to A, builds for device B!

Nevermind.

If this ever happens to you, it's because you are using a version
control system that sets the local files to read only when checked in,
and when you checked OUT the project files, the .project and a few other
files didn't get checked out for some ($@@#*%@@) reason and so the IDE
was setting the correct values but couldn't write that out to the make
config. So it made the old way, and looked like it was going to make the
new way.

The interesting point there is that CCS never threw an error message
when it failed to write the files.

Oh. My. Goodness. I love computers! :eyeroll:

--- In m... , "James
Newton" wrote:
>
> Ok, this one is just weird.
>
> I have a project in CCS 5 for which I am setting the device to
MSP430F5438 and it is compiling for the MSP430F5418A!
>
> In the code, I have defines that setup different pin definitions
depending on the processor. The client uses one of a few processors on
their boards, they all run the same basic code, the only differences are
which pin is assigned what function and a few other minor tweeks to
account for chip differences. So, for example:
>
> #ifdef __MSP430F5438__
> #warn ("Building for MSP430F5438, Board A")
> #define MOD5A
> #include "msp430x54x.h"
> #include "pinsetup.h" // Assign pins and functions
> #endif
>
> #ifdef __MSP430F5418A__
> #warn ("Building for MSP430F5418a, Board B")
> #define MOD5B
> #include "msp430x54xa.h"
> #include "pinsetupb.h" // Assign pins and functions
> #endif
>
> And in the code view, the highlighting shows that the code in the
> #ifdef __MSP430F5438__
> line will run and the other code will not.
>
> But then I compile, and get this:
>
> C:\progs\ti\ccsv5\utils\bin\gmake -k all
> 'Building file: ../main.c'
> 'Invoking: MSP430 Compiler'
> "C:/progs/ti/ccsv5/tools/compiler/msp430/bin/cl430" -vmspx
--abi=coffabi -O0 -g
--include_path="C:/progs/ti/ccsv5/ccs_base/msp430/include"
--include_path="C:/progs/ti/ccsv5/tools/compiler/msp430/include"
--define=__MSP430F5418A__ --diag_warning"5 --display_error_number
--silicon_errata=CPU15 --silicon_errata=CPU18 --silicon_errata=CPU21
--silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40
--printf_support=minimal --asm_listing --preproc_with_compile
--preproc_dependency="main.pp" "../main.c"
> "../main.c", line 175: warning #36-D: #warn ("Building for
MSP430F5418a, MOD-5b Logger")
>
> What. The. Heck?
>
> I can go into the project properties, and /everything/ shows
MSP430F5438. For example, the "Summary of flags set" under MSP430
Compiler shows this:
>
> -vmspx --abi=coffabi -O0 -g
--include_path="C:/progs/ti/ccsv5/ccs_base/msp430/include"
--include_path="C:/progs/ti/ccsv5/tools/compiler/msp430/include"
--define=__MSP430F5438__ --diag_warning"5 --display_error_number
--silicon_errata=CPU15 --silicon_errata=CPU18 --silicon_errata=CPU21
--silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40
--printf_support=minimal --asm_listing
>
> Which is exactly right, and exactly what it doesn't do.
>
> Help?
>

[Non-text portions of this message have been removed]


The 2024 Embedded Online Conference