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/TM4C129ENCPDT: Execution getting terminated by itself

Part Number: TM4C129ENCPDT
Other Parts Discussed in Thread: SYSBIOS, UNIFLASH

Tool/software: Code Composer Studio

Hi All,

I am using ti rtos 2.16.1.14 and xdc tool v 3.32 and tm4c129encpdt microcontroller.

Previously I was using CCS6 and now I am using CCS9.1

In this CCS9.1, when I start debugging, the program goes into abort() function giving some exception which is -


Error:E_noIsr: id = 88, pc = 00044ec4
FSR = 0x0000
HFSR = 0x40000000
DFSR = 0x00000000
MMAR = 0xe000ed34
BFAR = 0xe000ed38
AFSR = 0x00000000
Terminating execution...

When I check into ROV>Hwi>Exception and copy the values of SP, PC, ir and put the values into the Registers> Core Registers > SP,PC,ir

I see this the current state in debug window here-


; ======== ti_sysbios_family_arm_m3_Hwi_initStacks__E ========
; set up dual stacks
; only called if tasking is enabled
; otherwise, msp = the only stack.
; msp = handlers (isr Stack)
; psp = threads (task Stacks)
;
ti_sysbios_family_arm_m3_Hwi_initStacks__E:
.asmfunc
push {lr}
mrs r2, xpsr
tst r2, #0xff ; check if we're in handler mode
beq $1
;
; Here if CPU was not reset before starting the program
; and the last
; program halted while in handler mode.
; must unwind from handler mode before
; configuring control register
;
mov r2, sp
sub r2, #(8*4) ; make room for dummy stack frame
msr psp, r2 ; update PSP
mvn lr, #2
str r0, [r2, #0] ; save passed R0 on ISR stack
mov r1, #0x01000000 ; dummy xPSR with T bit set
str r1, [r2, #28]
ldr r1, $1Addr
str r1, [r2, #24] ; return PC to $1 below
bx lr ; "return" from ISR

$1
pop {lr}              ////////////////////////////////////////////////////////// the debug shows this. 
mov r1, sp
msr psp, r1 ; psp = task stacks
msr msp, r0 ; msp = isrStack
mov r0, #2
mrs r1, control
msr control, r0 ; split stacks now.

.if __TI_VFP_SUPPORT__
ldr r0, fpccr ; clear APSEN and LSPEN
ldr r1, [r0] ; get current fpccr
bic r1, r1, #0xc0000000 ; clear upper 2 bits
str r1, [r0] ; save/restore manually
.endif
bx lr ; return on psp

$1Addr
.word $1

So, basically, ti_sysbios_family_arm_m3_Hwi_initStacks__E is throwing error. Am I right? 

What does that mean? Every time my code goes there.  Nothing anything like this occurred in the CCS6. But why in CCS9.1? What are the changes in CCS6 and CCS9.1?

 Help me in this.

Thanks

  • Akhilesh,

    What compiler are you using? Can you try using the same one you used in the older CCS or the one recommended in TI-RTOS release notes.

    Todd

  • Todd,

    With ccs9.1, compiler version 18.xx is there. So i am using this compiler version. In ccs6, i dont remember that much but compiler version was 5.6 ( if i am not wrong, will check too).

    Is this related to compiler version? I'll check recommended also.

    One more thing, my reset vector starts from 0x10000. I have set that in config file. Because i have bootloader also. I use both when i burn both the code using uniflash, bootloader at address 0, and program.bin at address 0x10000. But from which address does the code get flashed in debug mode?

  • Akhilesh,

    Did the application work properly with the older CCS setup? If so, I expect there is an incompatibility with the newer compiler. I know there has been some issues in this area. 

    Todd

  • Akhilesh Gangwar said:

    One more thing, my reset vector starts from 0x10000. I have set that in config file. Because i have bootloader also. I use both when i burn both the code using uniflash, bootloader at address 0, and program.bin at address 0x10000. But from which address does the code get flashed in debug mode?

    Todd, Do u like to comment on this? Is this something related to the error?

    And, 

    Yes, Todd,

    The application was working completely fine. We faced no issue like this before. This is occurring only in CCS9.1 and CCS9.2. 

    What are the changes there in both the versions, CCS6 and 9? 

  • From CCS, you would flash the code in the same manner.

    Did you use the older compiler?

  • Todd,

    Older compiler u mean older CCS? Yes, it is working fine.

  • Todd, 

    I am attaching 2 images. Both the times the program goes into somewhere else just after starting the debugging (it should go to the main program).

    Sometimes it goes to abort() just when BISOStart() calls. And, sometimes it runs completely fine also, without any exceptions at all. 

    Also, please see the debug window. Let me know if you found anything. I am stuck badly.

    Thanks

  • Akhilesh,

    Please install the older compiler into the new CCS's ccs\tools\compiler directory. The stand-alone compilers can be found in the link I gave you above. Start CCS and then in the Project Settings, set the older compiler. 

  • HI,

    I tried this. I am getting the same problem but my colleague is not getting this exception anymore. I once built the ti rtos. Will it make any difference?

  • Akhilesh Gangwar said:
    I once built the ti rtos

    Can you explain what you mean by this? Do you have the kernel in a separate project? If so, yes, you need to rebuild it with the older compiler.

    Todd

  • I have separate TI RTOS, not at the separate project. I rebuild that previously using the method given in the user guide when I was using CCS9.1. I'll try to rebuild as I am using the old compiler and will let you know.

    Thanks

  • Hi Todd,

    I tried to rebuild the RTOS using the old compiler, 5.2.5 using this-

    ..\xdctools_3_32_00_06_core\gmake.exe -f tirtos.mak all

    I am getting this error-

    C:\ti\tirtos_tivac_2_16_01_14>..\xdctools_3_32_00_06_core\gmake.exe -f .\tirtos.mak all
    building bios ...
    gmake[1]: Entering directory `c:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31'
    building bios packages ...
    c:\ti\xdctools_3_32_00_06_core\bin\stderr.exe: can't execute 'echo "making" ".interfaces:" "because:" "Invalid" "argument" "c:\ti\xdctools_3_32_00_06_core\bin\stderr.exe:" "can't" "execute" "'date" "'" "(exit" "status" "=" "-1)" "..." ' (exit status = -1) because: Invalid argument
    xdctools_3_32_00_06_core\gmake.exe: *** [_startime] Error 255
    gmake[1]: *** [all] Error 2
    gmake[1]: Leaving directory `c:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31'
    gmake: *** [bios] Error 2

    Paths have been specified in the make file. What error is this exactly?

    Thanks

  • Akhilesh,

    You don't have to rebuild the TI-RTOS product. It was built original with a validated version. You just need the older compiler when you rebuild the application. If the .cfg is part of the project, the necessary kernel source files will be recompiled.

    You said it is working for a co-worker. Can you compare the build output between the two setups? Do a clean and build on above. Copy the build output to files and do a BeyondCompare (or your favorite diff tool) and see what the differences are.

    Todd

  • Hi Todd,

    I'll do the compare once he is back. I once rebuilt the ti rtos while using the ccs9.2 with compiler version 18.xxx. Now I changed the compiler version to 5.2.5. I'll update you on this. 

    Thanks

  • Hi Todd, 

    I made some changes in the file system api that's why I had to rebuilt the TI RTOS components. Again I have to rebuld it and I am getting this error. 

    C:\ti\tirtos_tivac_2_16_01_14>..\xdctools_3_32_00_06_core\gmake.exe -f .\tirtos.mak all
    building bios ...
    gmake[1]: Entering directory `c:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31'
    building bios packages ...
    c:\ti\xdctools_3_32_00_06_core\bin\stderr.exe: can't execute 'echo "making" ".interfaces:" "because:" "Invalid" "argument" "c:\ti\xdctools_3_32_00_06_core\bin\stderr.exe:" "can't" "execute" "'date" "'" "(exit" "status" "=" "-1)" "..." ' (exit status = -1) because: Invalid argument
    xdctools_3_32_00_06_core\gmake.exe: *** [_startime] Error 255
    gmake[1]: *** [all] Error 2
    gmake[1]: Leaving directory `c:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31'
    gmake: *** [bios] Error 2

    All the paths are correct. Previously I did not get this error while building. Can you help me to resolve this? 

    Thanks

    AKhilesh

  • Ahkilesh,

    Do you have another shell in your path? That's been known to mess up commandline builds with TI-RTOS. CAn you do an "echo %PATH%" from a command prompt and look to see if you have another path. 

    Todd

  • Hi Todd,

    This is the result 

    C:\ti\tirtos_tivac_2_16_01_14>echo %path%
    C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files\Git\cmd;C:\ti\xdctools_3_32_00_06_core;"C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\windows\System32\Wbem"

    I added this C:\ti\xdctools_3_32_00_06_core by myself just to check if something works. It was throwing the same error without this also.

    What do you mean by any other shell? I am just using the command prompt on windows 10.

    Thanks

    Akhilesh

  • Can you remove MinGw as an experiment?

  • Todd,

    I removed it and it worked. Thanks a lot.  There might be some compiler problem happened. Can you explain what really happened here?

    Todd, I need 1 more help. Can you answer this post? https://e2e.ti.com/support/tools/ccs/f/81/t/868177  

    Thanks

    akhilesh

  • Both MingW and XDCtools, which is used for configuration of TI-RTOS, come with their own versions of Cygwin. When these versions of different, all kinds of problems can occur. I haven't seen before the error you are seeing, so I am not sure of the exact mechanism for that use case, but in some other use cases either two different versions of Cygwin DLL would be loaded and they would corrupt each other's resources that Cygwin keeps for sharing between different processes, or an executable built with one version of Cygwin would call an API that's not available in the version of the DLL found on the path.