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.

MSP430F5438A: MSP Gang DLL LABWINDOWS CVI

Part Number: MSP430F5438A
Other Parts Discussed in Thread: MSP-GANG

Well I have been trying to load the lib and header file found in the examples folder under the Texas Instruments folder but no avail. It alawys shows that the function used are unidentified even though i can access their definition in the header file. This is the type of error I am getting when I use any functions in the .h file. 

Undefined symbol '_MSPGANG_GetProgressStatus@4' referenced in "MSP.c".

Undefined symbol '_MSPGANG_InitCom@8' referenced in "MSP.c".

  • MSP-GANG.h

    #include <windows.h>
    #include <userint.h>
    #include <utility.h>
    #include <formatio.h>
    
    #include "MSP.h"
    #include "MSP-GANG.h"
    
    static int panelHandle;
    //int64_t *State=NULL;
    
    int main (int argc, char *argv[])
    {
    	if (InitCVIRTE (0, argv, 0) == 0)
    		return -1;
    	
    	if ((panelHandle = LoadPanel (0, "MSP.uir", PANEL)) < 0)
    		 return -1;
    	     DisplayPanel (panelHandle);
    		 
    	RunUserInterface ();
    	DiscardPanel (panelHandle);
    	return 0;
    }
    
    
    int CVICALLBACK Program (int panel, int control, int event,
    		void *callbackData, int eventData1, int eventData2)
    {
    	char FinishedTaskMask[4]= "";
    	char ProgrammedGangMask[4]= "";
    	char VerifiedGangMask[4]= "";
    	char ConnectedGangMask[4]= "";
    	
    	int Status;
    	char Char_Status[5]="";
    	char *lpData="";
    	
    	switch (event)
    	{
    		case EVENT_COMMIT:
    			
    			//Main Process Command
    			MSPGANG_InitCom("COM8", 115200);
    			MSPGANG_GetProgressStatus(lpData);
    			//CopyString(ProgrammedGangMask,0,"",0,-1);
    			//CopyString(VerifiedGangMask,0,"",0,-1);
    			//CopyString(ConnectedGangMask,0,"",0,-1);
    			//Status= MainProcessProgrammer("COM8", ConnectedGangMask, FinishedTaskMask, ProgrammedGangMask, State, VerifiedGangMask, sizeof(ConnectedGangMask), sizeof(FinishedTaskMask), sizeof(ProgrammedGangMask), sizeof(VerifiedGangMask));
    			Delay(1);
    			
    			Fmt(Char_Status, "%i",&lpData);
    			SetCtrlVal (panelHandle, PANEL_STRING, Char_Status);  
    			
    
    			break;
    	}
    	return 0;
    }
    
    int CVICALLBACK QuitCallback (int panel, int control, int event,
    		void *callbackData, int eventData1, int eventData2)
    {
    	switch (event)
    	{
    		case EVENT_COMMIT:
    			QuitUserInterface (0);
    
    			break;
    	}
    	return 0;
    }
    
    MSP-Gang.lib

  • Hey Iheb,

    Based on the title, it sounds like you are trying to use the Gang dll to control the programmer via a labview program and are getting build errors in that program. Is that correct?

    I probably won't be able to help much on the labview side, but you could try their forums as well. I did find a thread from a while back where Katie gives some good debugging tips and resources for the Gang DLL here: e2e.ti.com/.../1990919

    The dll functationaly is described in the MSP-GANG user's guide, but I don't know of any labview examples available.

    Regards,
    JD
  • Well thank you JD, but my problem is a different issue from the one mentioned there. I am using the files from DLL API folder and loaded them to Labwindows/CVI and then it shows this
    Undefined symbol 'DLLFunctionName@0' referenced in "file.c".
    Which is a type of error "as mentioned in NI support" as a fail in loading the DLL file. And then after discussing the issue more i figured that the DLL provided by your company are not Labwindows/CVI compatible.

    Regards,
    Iheb
  • Hey Iheb,

    Thanks for sharing your findings. Where you discussing this on another forum? If so, can you please link it here incase future readers would like to understand your findings.

    Do you have any specific feedback on why this DLL is not compatible? I'm not sure what's possible, but I can funnel this feedback into out tools teams for the future.

    Thanks,
    JD
  • Hey, JD

    Well not really discussing it in another forum but communication with the NI support via email, and that was their last email sent to me. Well am not really sure but I do have a dll that is compatible but I do find its functions way too lacking and that's why I am working on an alternative.

    I will attach the dll, lib and header files.

    Thank you,

    Iheb

    MSPLib.rar

  • Thanks Iheb,

    I'll forward this feedback to our internal tools team. If they have any follow up questions, I'll point them to this thread.

    Thanks,
    JD
  • Hi Iheb,

    Are you using w LabVIEW 64 b application or 32-b application. The dll should works with LabVIEW 32b. Let me know if that helps.

    Best regards,
    Gregory CZajkowski
    Elprotronic Inc.
  • Well, thank you JD.

  • Hey Gregory,

    The DLL does indeed work with Labview but what we are using here is Labwindows/CVI, another NI platform. And it's showing this type of problem :
    Undefined symbol 'DLLFunctionName@0' referenced in "file.c"
    www.ni.com/.../
    I did try the solutions mentioned in that website but to no avail.

    Thanks,
    Iheb
  • Hey, 

    I found that for a DLL developped using C++, Labwindows/CVI needs each function to be precedented by:

    extern  "C"  __declspec(dllexport) 

    I am not sure if that's the reason of this issue. Hope this helps.

    Regards,

    Iheb

  • Hey Iheb,

    My tools team got back to me and unfortunantly the response is the same as your feedback from NI. Officially the dll supports Windows only.

    We do not officially support LabView or LabWindows and don't have a testing envirment to be able to support it's development.

    BR,
    JD
  • Well anyway, thank you for you effort JD.

**Attention** This is a public forum