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.

CCS/IWR6843ISK: E_undefinedInstruction on Cortex R4F mss

Part Number: IWR6843ISK
Other Parts Discussed in Thread: MMWAVEICBOOST, , IWR6843, SYSBIOS

Tool/software: Code Composer Studio

Hi, I am trying to debug IWR6843ISK sensor board via MMWAVEICBOOST XDS 110 USB JTAG Probe.

Here is the device/environment.

Device: IWR6843ISK + MMWAVEICBOOST
OS: Ubuntu 16.04 x64
CCS version: 9.2.0
mmWave SDK: 3.3.0.3
mmWave Industrial toolkit: 4.0.1
bios: 6.73
target demo project: mmwave_industrial_toolbox_4_0_1/labs/people_counting/68xx_people_counting

Repro steps:
Rebuild both dss and mss projects in Debug configuration.
Launch iwr6843.ccxml target configuration & Test connection to the board
Connect dss (C674x) and Load program ~/ccs/iwr6843/68xx_pplcount_dss/Debug/68xx_pplcount_dss.xe674
Connect mss (Cortex) and Load program ~/ccs/iwr6843/68xx_pplcount_mss/Debug/68xx_pplcount_mss.xer4f

Error message:

[Cortex_R4_0] Exception occurred in ThreadType_Task.
Task handle: 0x801de38.
Task stack base: 0x801c508.
Task stack size: 0x800.
R0 = 0x00000000 R8 = 0xffffffff
R1 = 0x0801ccc4 R9 = 0xffffffff
R2 = 0x00000000 R10 = 0xffffffff
R3 = 0x05000010 R11 = 0xffffffff
R4 = 0x00000000 R12 = 0x17650300
R5 = 0x0001b2b8 SP(R13) = 0x0801ccd8
R6 = 0xffffffff LR(R14) = 0x00016779
R7 = 0xffffffff PC(R15) = 0x00012d50
PSR = 0x400c019f
DFSR = 0x00000000 IFSR = 0x00000000
DFAR = 0x00000000 IFAR = 0x00000000
ti.sysbios.family.arm.exc.Exception: line 209: E_undefinedInstruction: pc = 0x00012d50, lr = 0x00016779.
xdc.runtime.Error.raise: terminating execution

FYI, when the bin file, ~/ccs/iwr6843/68xx_pplcount_mss/Debug/pplcount_lab_xwr68xx.bin is flashed into the IWR6843ISK sensor board, then it can read/set the config and send back radar data correctly as expected.
So, there is no problem with building the demo program and working as expected via /dev/ttyACMx UARTs w/o using XDS110 probe.

  • Hi Jaeseok,

    Did you flash the board with the debug binary? If you did not, you need to use the CCS control to manually reset the board before flashing with the .xer4f and .xe674 files.

    Regards,

    Justin

  • Where to find the debug binary? Is it generated by the demo project or some debugging-only binary?

    Is it power off/on the same as CCS control to manually reset? If not, could you point which CCS menu to reset?

  • Thanks for sharing detailed instruction.

    All errors have gone and the program seems working.
    The initialization with configuration parameters via /dev/ttyACM0 seems to work, but it got stuck when receiving radar tracking data.
    Here is the python program to initialize and read data. While debugging through CCS, does UART via /dev/ttyACM1 also work? If not, any workaround to recv data via UART while debugging?

    import serial
    import argparse
    import time

    parser = argparse.ArgumentParser(description='mmwave_config')
    parser.add_argument('--port', type=str)

    args = parser.parse_args()

    cfg = serial.Serial('/dev/ttyACM' + args.port, 115200)

    chirp_config = (
    "Reset\r\n",
    "sensorStop\r\n",
    "flushCfg\r\n",
    "dfeDataOutputMode 1\r\n",
    "channelCfg 15 5 0\r\n",
    "adcCfg 2 1\r\n",
    "adcbufCfg 0 1 1 1\r\n",
    "profileCfg 0 60.6 30 10 62 0 0 53 1 128 2500 0 0 30\r\n",
    "chirpCfg 0 0 0 0 0 0 0 1\r\n",
    "chirpCfg 1 1 0 0 0 0 0 4\r\n",
    "frameCfg 0 1 128 0 50 1 0\r\n",
    "lowPower 0 1\r\n",
    "guiMonitor 1 1 0 0\r\n",
    "cfarCfg 6 4 4 4 4 16 16 4 4 55 67 0\r\n",
    "doaCfg 600 1875 30 1 1 0\r\n",
    "SceneryParam -6 6 0.5 8\r\n",
    "GatingParam 3 2 2 0\r\n",
    "StateParam 10 5 100 100 5\r\n",
    "AllocationParam 250 250 0.25 30 1 2\r\n",
    "trackingCfg 1 2 250 20 52 82 50 90\r\n",
    "sensorStart\r\n",
    "\r\n"
    )

    for x in chirp_config:
    cfg.write(x.encode())
    time.sleep(.2)

    cfg.close()

    data = serial.Serial('/dev/ttyACM' + str(int(args.port) + 1), 921600)
    print(data.read(500))  ## The program got stuck HERE.
    data.close()

  • I forgot attaching console output when sending configuration paramters.

    [Cortex_R4_0] **********************************************
    Debug: Launching the Millimeter Wave Demo
    **********************************************
    Debug: MMWDemoMSS Launched the Initialization Task
    Debug: System Heap (TCM): Size: 98304, Used = 4904, Free = 93400 bytes
    Debug: MMWDemoMSS mmWave Control Initialization was successful
    [C674X_0] Debug: Logging UART Instance @00817788 has been opened successfully
    Debug: DSS Mailbox Handle @0080e898
    Debug: MMWDemoDSS create event handle succeeded
    Debug: MMWDemoDSS mmWave Control Initialization succeeded
    Debug: MMWDemoDSS ADCBUF Instance(0) @00817770 has been opened successfully
    Debug: MMWDemoDSS Data Path init succeeded
    Debug: MMWDemoDSS initTask exit
    [Cortex_R4_0] Debug: CLI is operational
    Error: MMWDemoMSS mmWave Stop failed [Error code -203227134]
    Debug: Heap before creating a tracker
    Debug: System Heap (TCM): Size: 98304, Used = 29832, Free = 68472 bytes
    Debug: (GtrackModuleInstance *)0x8009390
    Debug: System Heap (TCM): Size: 98304, Used = 54904, Free = 43400 bytes
    Debug: Heap before creating a tracker
    Debug: System Heap (TCM): Size: 98304, Used = 55032, Free = 43272 bytes
    Debug: (GtrackModuleInstance *)0x8009390
    Debug: System Heap (TCM): Size: 98304, Used = 55032, Free = 43272 bytes