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.

MMWAVE-STUDIO: Startup.lua fails to run in mmWave studio

Part Number: MMWAVE-STUDIO
Other Parts Discussed in Thread: AWR2944EVM, AWR2944

Tool/software:

I am trying to run the startup.lua in mmwave studio and get this error 

[20:00:16] RSTD.SetAndTransmit ("/Settings/Scripter/Display DateTime" , "1")
[20:00:16] RSTD.SetAndTransmit ("/Settings/Scripter/DateTime Format" , "HH:mm:ss")
[20:00:16] RSTD.UnBuild()
[20:00:16] RSTD.Clients_UnBuild()
[20:00:16] GM: Waiting for thread termination
[20:00:16] GM: Done with GM close
[20:00:16] RSTD.ClearWorkSet()
[20:00:16] RSTD.AL_UnBuild()
[20:00:16] GM: Waiting for thread termination
[20:00:16] GM: Done with GM close
[20:00:16] RSTD.ClearWorkSet()
[20:00:16] RSTD.SetVar ("/Settings/Clients/Client 0/Dll" , "C:\\Users\\beamd\\Desktop\\Mohamed\\mmwave_studio_03_01_04_04\\mmWaveStudio\\Clients\\\\LabClient.dll")
[20:00:16] RSTD.SetVar ("/Settings/Clients/Client 0/Use" , "TRUE")
[20:00:16] RSTD.SetVar ("/Settings/Clients/Client 1/Use" , "FALSE")
[20:00:16] RSTD.SetVar ("/Settings/Clients/Client 2/Use" , "FALSE")
[20:00:16] RSTD.SetVar ("/Settings/Clients/Client 3/Use" , "FALSE")
[20:00:16] RSTD.SetVar ("/Settings/Clients/Client 4/Use" , "FALSE")
[20:00:16] RSTD.SetVar ("/Settings/AL Client/AL Dll" , "C:\\Users\\beamd\\Desktop\\Mohamed\\mmwave_studio_03_01_04_04\\mmWaveStudio\\RunTime\\SAL.dll")
[20:00:16] RSTD.SetVar ("/Settings/Clients/Client 0/GuiDll" , "")
[20:00:16] RSTD.SetVar ("/Settings/AutoUpdate/Enabled" , "TRUE")
[20:00:16] RSTD.SetVar ("/Settings/AutoUpdate/Interval" , "1")
[20:00:16] RSTD.SetVar ("/Settings/Monitors/UpdateDisplay" , "TRUE")
[20:00:16] RSTD.SetVar ("/Settings/Monitors/OneClickStart" , "TRUE")
[20:00:16] RSTD.SetVar ("/Settings/Automation/Automation Mode" , "false")
[20:00:16] RSTD.Transmit("/")
[20:00:16] RSTD.SaveSettings(): Settings saved to "C:\Users\beamd\AppData\Roaming\RSTD\config.xml"
[20:00:16] RSTD.Build()
[20:00:16] RSTD.SaveSettings(): Settings saved to "C:\Users\beamd\AppData\Roaming\RSTD\config.xml"
[20:00:16] RSTD.Transmit("/")
[20:00:16] RSTD.AL_Build()
[20:00:16] RSTD.AL_LoadXml()
[20:00:16] RSTD.Transmit("/")
[20:00:16] RSTD.AL_Init()
[20:00:16] RSTD.Clients_Build()
[20:00:16] GM: Init
[20:00:16] GM: Loaded 'C:\Users\beamd\Desktop\Mohamed\mmwave_studio_03_01_04_04\mmWaveStudio\Clients\\LabClient.dll'
[20:00:16] GM: 1 Guest (s) init
[20:00:16] GM: 1 Module(s) init
[20:00:16] GM: 2 Tab (s) init
[20:00:16] RSTD.Client_LoadXml()
[20:00:16] [RadarAPI]: ar1.GuiVersion()
[20:00:16] [RadarAPI]: ar1.selectRadarMode(0)
[20:00:16]
[20:00:16] &&&&&&&&&&&&&&&&&&&&
[20:00:16] ***Script FAILED!***
[20:00:16] &&&&&&&&&&&&&&&&&&&&
[20:00:16] Exception message is:
[20:00:16] Object reference not set to an instance of an object.

How can I fix this?

  • Which device are you running this on?

    E. Shareef

  • This is as soon as you start Studio correct? You have not yet sent any APIs to the device. 

  • Yes as soon as mmWave Studio is started. Ive made sure the versions match and the other lua scripts in the startup folder work. The Radar is flashed with the awr2944_TDM appimage. 

  • I realized that I tried to send the lua manually once mmWave studio was open. My goal is to make an automation.lua and I am having an error sending the .lua to mmWavestudio. Here is my lua script and MATLAB code. I have been following the mmwave_studio_user_guide.pdf sec 22 and 23

    Automation.lua

    RSTD_PATH = RSTD.GetRstdPath()
    dofile(RSTD_PATH .. "\\Scripts\\Startup.lua")

    capture_device = "DCA1000"
    sop_mode = 2
    com_port = 14
    baud_rate = 921600
    timeout = 1000

    bss_path = "C:\\ti\\mmwave_studio_03_01_03_01\\rf_eval_firmware\\radarss\\xwr29xx_radarss_rprc.bin"
    mss_path = "C:\\ti\\mmwave_studio_03_01_03_01\\rf_eval_firmware\\masterss\\xwr2xxx_masterss.bin"

    adc_data_path = "C:\\ti\\mmwave_studio_03_01_03_01\\mmWaveStudio\\PostProc\\adc_capture.bin"

    Matlab script:

    %% RSTD_Interface_Example.m
    % -------------------------------------------------------------------------
    % Example of driving mmWave Studio 3.x (AWR2944) from MATLAB via RSTD.NET
    % -------------------------------------------------------------------------
    addpath(genpath('.\')) % add this folder (and subs) to MATLAB path
    RSTD_DLL_Path = 'C:\ti\mmwave_studio_03_01_03_01\mmWaveStudio\Clients\RtttNetClientController\RtttNetClientAPI.dll';
    ErrStatus = Init_RSTD_Connection(RSTD_DLL_Path);
    if (ErrStatus ~= 30000)
    disp('X Error inside Init_RSTD_Connection');
    return;
    end
    disp('White check mark Connected to mmWave Studio.');
    strFilename ='C:\\ti\\mmwave_studio_03_01_03_01\\mmWaveStudio\\Scripts\\CustomAuto.lua';
    Lua_String = sprintf('dofile("%s")', strFilename);
    ErrStatus = RtttNetClientAPI.RtttNetClient.SendCommand(Lua_String);
    if (ErrStatus ~= 0)
    disp('X Error running Lua script');
    return;
    end
    disp('Lua capture script fired in Studio.');
    The MATLAB code successfully connects to RSTD and mmWave studio and fails to run the lua.
  • Without running any lua, can you connect RS232 and download firmware on the device? 

    SPI connectivity is also good?

    -E Shareef