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.

about exception

Other Parts Discussed in Thread: SYSBIOS

Hi, all !

    when bios get exception , we can use  below steps to see the root cause.

1.bios  using system_printf to print register through ICDI to CCS .

2. user copy  register SP, LR ,PC to register  window .

3 then the edit window may show the root cause line . 

I have question about the exception handler function . 

1.can sysbios send register status to UART instead of ICDI?

Brenden

  • Users can supply their own "hook" function that will be called as part of exception handling. The function is passed a structure with the exception context, which includes the registers. This function could then transfer the values out a UART.

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/sysbios/6_34_01_14/exports/bios_6_34_01_14/docs/cdoc/ti/sysbios/family/arm/m3/Hwi.html

    In the .cfg file:

    var Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');

    Hwi.excHookFunc = "&uartExcHandler";

    In a .c file:

    Void uartExcHandler(Hwi_ExcContext * context)
    {
        /* pseudo-code */
        UART_write(uart, context->r0, sizeof(context->r0));
        .... and other registers as desired
    }

    or they could use System_sprintf() or sprintf() to format to ascii string and send that out the UART.

    Mark

  • Hi Mark

    I have similar problem but if I do the same  proposal  I got error by the sysbios compilation.

    do you have any Idea why these can happen.

    I was also not able to find these package from xdc !!

    My setup!!

    Chip  DRA62x         ducati block core 0    " cortex m3"

    SYSBIOS_ROOT := c:/ti/bios_6_33_04_39
    XDC_ROOT := c:/ti/xdctools_3_23_03_53
    XDAIS_ROOT := c:/ti/xdais_7_21_01_07

     

    xdc.services.global.XDCException: xdc.PACKAGE_NOT_FOUND:

     

    kind regards

    Mesut

     

     

    :/ti/xdctools_3_23_03_53/xs --xdcpath="c:/ti/xdais_7_21_01_07/packages;c:/ti/bios_6_33_04_39/packages;c:/ti/xdais_7_21_01_07/examples;./sw/cfg/platform_configurations;" \ xdc.tools.configuro -o ./out/configPkg -t ti.targets.arm.elf.M3 -p ducati_M3 -r release \ -c "C:/ti/ccsv5/tools/compiler/tms470_4.9.1/" --compileOptions "" ./sw/cfg/sysbios_configurations/ducati_M3/sysbios.cfg making package.mak (because of package.bld) ... generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ... configuring sysbios.xem3 from package/cfg/sysbios_pem3.cfg ... js: "E:/ccm_wa/tck_inf/VAG_MIB20_STD_VIP/sw/cfg/sysbios_configurations/ducati_M3/sysbios.cfg", line 66: xdc.services.global.XDCException: xdc.PACKAGE_NOT_FOUND: can't locate the package 'ti.sysbios.family.m3' along the path: 'C:/ti/xdais_7_21_01_07/packages;C:/ti/bios_6_33_04_39/packages;C:/ti/xdais_7_21_01_07/examples;E:/ccm_wa/tck_inf/VAG_MIB20_STD_VIP/sw/cfg/platform_configurations;C:/ti/xdctools_3_23_03_53/packages;..;'. Ensure that the package path is set correctly. "./package/cfg/sysbios_pem3.cfg", line 186 "./package/cfg/sysbios_pem3.cfg", line 265 "./package/cfg/sysbios_pem3.cfg", line 173 gmake.exe: *** [package/cfg/sysbios_pem3.xdl] Error 1 js: "C:/ti/xdctools_3_23_03_53/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted. make: *** [out/configPkg/package/cfg/sysbios_pem3.oem3] Error 1 **** Build Finished ****

  • The error is reporting that it can't find "ti.sysbios.family.m3". The package name is "ti.sysbios.family.arm.m3"

    I believe you may have not used the correct package name for the Hwi module:

        var Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');

     Alan

  • Thanks Alan

    you are right was my mistake :(

    Mesut

  • Hi all

    My setup:

    Chip DRA62x ,  ducati block core 0,   "cortex m3"

    SYSBIOS_ROOT := c:/ti/bios_6_33_04_39

    XDC_ROOT := c:/ti/xdctools_3_23_03_53

    XDAIS_ROOT := c:/ti/xdais_7_21_01_07

    I forced a division by 0 by my code and expected a "Usage Fault" exception. But a "Hard Fault" occurs; Hwi_nvic.HFSR & 0x40000000 is set. Any idea what's going wrong?

    Thanks and regards

    Wolfgang