This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430 Flasher Compile Problem



I am having problems with compiling the source code in the following download from TI: msp430.dll_developer_package_rev_3.02.01.009.zip.

There are several ApplicationExamples in the developer package and none of them compile.

In the ApplicationExample -- Example.vcproj -- the compiler complains at the following line in the MSP430.h:

                                     typedef void (* SYSTEM_NOTIFY_CALLBACK) (SYSTEM_EVENT_MSP MySystemEvent);

The "SYSTEM_NOTIFY_CALLBACK" appears not to be resolved. 

I am using the VSC++ Express Version 10 without much success.  This should version should compile console applications.

The solution file indicates the following...

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Example", "Example.vcxproj", "{38739C3E-6E67-40CC-BC67-03C7420A662D}"
EndProject

Does anyone have a idea how to set the project up to compile?

Thanks.

Dan

 

  • Dan Trembley said:
    The "SYSTEM_NOTIFY_CALLBACK" appears not to be resolved. 


    This typedef should create a type "SYSTEM_NOTIFY_CALLBACK" that is a function pointer to a function with a parameter MySystemEvent of type SYSTEM_EVENT_MSP.

    What is the exact error message?
    Perhaps you didn't include the file that defines the SYSTEM_EVENT_MSP type. Then the to be created function pointer type cannot point to a function with a parameter of this unknown type.

  • The SYSTEM_EVENT_MSP is defined in the file msp430.h file.

     // System events
    typedef enum SYSTEM_EVENT_MSP
    {
     /// System event FET connection is lost
        FET_CONNECTION_LOST,
     /// System event device connection is lost
        DEVICE_CONNECTION_LOST,
     /// System event FET restart needed
        FET_RESTART_NEEDED,
     /// System event device entered LPMx.5
        DEVICE_IN_LPM5_MODE,
     /// System event devices wakes up from LPMx.5
        DEVICE_WAKEUP_LPM5_MODE,          
    } SYSTEM_EVENT_MSP_t;

    typedef void (* SYSTEM_NOTIFY_CALLBACK) (SYSTEM_EVENT_MSP MySystemEvent);

     Here's the compiler data...

    1>------ Build started: Project: Example, Configuration: Debug Win32 ------

    1> Example.c

    1>c:\documents and settings\...\inc\msp430.h(442): error C2146: syntax error : missing ')' before identifier 'MySystemEvent'

    1>c:\documents and settings\...\inc\msp430.h(442): error C2061: syntax error : identifier 'MySystemEvent'

    1>c:\documents and settings\...\inc\msp430.h(442): error C2059: syntax error : ';'

    1>c:\documents and settings\...\inc\msp430.h(442): error C2059: syntax error : ')'

    1>c:\documents and settings\...\inc\msp430.h(463): error C2146: syntax error : missing ')' before identifier 'parSystemNotifyCallback'

    1>c:\documents and settings\...\inc\msp430.h(463): error C2061: syntax error : identifier 'parSystemNotifyCallback'

    1>c:\documents and settings\...\inc\msp430.h(463): error C2059: syntax error : ';'

    1>c:\documents and settings\...\inc\msp430.h(463): error C2059: syntax error : ')'

    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  • Dan Trembley said:
    syntax error : missing ')' before identifier 'MySystemEvent'


    Ah, so the compiler doesn't like a parameter name in the typedef.
    That's undestandable, the type of a function is determined by the type of its parameters alone, not their names (as the name can differ for different functions of the same function type).
    Simply delete the 'mySystemEvent' from the typedef.

  • The removing of the argument mySystemEvent appeared to be key but now it's on to the next issue.  This is now what I get from the build solution...

    1>------ Build started: Project: Example, Configuration: Debug Win32 ------

    1> Example.c

    1>c:\documents and settings\...\applicationexamples\example\example.c(228): warning C4101: 'errorNumber' : unreferenced local variable

    1>c:\documents and settings\...\applicationexamples\example\example.c(111): warning C4700: uninitialized local variable 'device' used

    1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Documents and Settings\...\ApplicationExamples\Example\.\Debug\Example.exe) does not match the Linker's OutputFile property value (C:\Documents and Settings\...\ApplicationExamples\Executables\Debug\Example.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).

    1>LINK : fatal error LNK1181: cannot open input file 'msp430v3.lib'

    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    I am not so interested in the warning as they can be dealt with.  The linker error is of more concern because the library that is being referenced does not exist in the developers kit that I downloaded from TI.  Also, I cannot find the msp430v3 library anywhere on the web or developer media.  I changed the library reference to msp430.lib which does come with the developers kit and believe it to be the 3 > version.  Compiling I got the following output...

    1>------ Build started: Project: Example, Configuration: Debug Win32 ------

    1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Documents and Settings\...\ApplicationExamples\Example\.\Debug\Example.exe) does not match the Linker's OutputFile property value (C:\Documents and Settings\...\ApplicationExamples\Executables\Debug\Example.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).

    1>Example.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_Error_String@4 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_Error_Number@0 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_Close@4 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_Reset@12 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_VerifyFile@4 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_ProgramFile@12 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_ReadOutFile@16 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_VerifyMem@12 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_Memory@16 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_EraseCheck@8 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_Erase@12 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_Configure@8 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_Identify@12 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_VCC@4 referenced in function _main

    1>Example.obj : error LNK2019: unresolved external symbol __imp__MSP430_Initialize@8 referenced in function _main

    1>..\Executables\Debug\Example.exe : fatal error LNK1120: 15 unresolved externals

    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    The unresolved external symbols do not exist in this library so I am a little confused as to how this is suppose to come together?  It appears first that I need the correct version of the library.

    Thanks.  Dan

  • It looks like the project settings are messed-up (hence the warnings about the path).
    The missing references are most likely in the missing V3 lib. It is even possible that the lib is built by the project (or has to be built by a different part of the package) and the path issue prevents this from happen.

    I never worked with this, so I cannot be of further help here. maybe someone related to this project (or someone who had this problem too and solved it) will join the thread.

  • I am using MS Visual Studio 2010 Premium. Here are some of my project settings:

    Under C/C++, Additional Include Directories

    ..\..\..\DLL430_v3\include;..\..\..\ThirdParty\include;..\..\..\INC;Inc

    Under Linker, Additional Library Directories

    ..\..\..\Release;..\..\..\Lib;Lib;%(AdditionalLibraryDirectories)

    And for reference...

    Under VC++ Directories:

    Executable Directories: $(VCInstallDir)bin;$(WindowsSdkDir)bin\NETFX 4.0 Tools;$(WindowsSdkDir)bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)\bin;$(MSBuildToolsPath32);$(VSInstallDir);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH);

    Include Directories: $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;

    Reference Directories: $(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib

    Library Directories: $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib

    Source Directories: $(VCInstallDir)atlmfc\src\mfc;$(VCInstallDir)atlmfc\src\mfcm;$(VCInstallDir)atlmfc\src\atl;$(VCInstallDir)crt\src;

    Exclude Directories: $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(MSBuildToolsPath32);$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;

    $(VCInstallDir)bin;$(WindowsSdkDir)bin\NETFX 4.0 Tools;$(WindowsSdkDir)bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)\bin;$(MSBuildToolsPath32);$(VSInstallDir);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH);
  • How closely does this related thread solve the problem?

    MSP430Flasher does not reset device after programming

**Attention** This is a public forum