Hello,
I've written a standard C66 assembly routine in C6678, which is tested without exceptions and provided expected results when no "Sys/Bios" is used.
Now, when I run it on a single task of Sys/Bios, where I repeat the call to the assembly routine over a loop, it shows the exception:
0x3dc8bcec
A20=0x10 A21=0xb
A22=0x3d720ec0 A23=0x3ccd40d0
A24=0x3dbeddf4 A25=0xbd44ecd2
A26=0x3d830037 A27=0x3cde2a2e
A28=0xbd801a79 A29=0x3d978654
A30=0x3cfb0dec A31=0x3cd43fab
B0=0x200 B1=0x827fb8
B2=0x0 B3=0x806de8
B4=0x15000103 B5=0x4003
B6=0x80010c B7=0x0
B8=0x10 B9=0xb
B10=0x4003 B11=0xe9dfdf6f
B12=0xbdc8bd31 B13=0xfb2a
B14=0x82bd94 B15=0x827fb8
B16=0xbf61c558 B17=0x3ef15aa7
B18=0xbf7fb0a2 B19=0xbd48fac8
B20=0xbc182488 B21=0x3cc96b7f
B22=0x400f B23=0x0
B24=0x3d9e27d4 B25=0xbd6bdc4f
B26=0x3d6b8c83 B27=0x3cb1ec0c
B28=0xbd720b5d B29=0x3d943eaa
B30=0x3c948898 B31=0x3c728413
NTSR=0x1020d
ITSR=0x400f
IRP=0x80010c
SSR=0x0
AMR=0x0
RILC=0x10
ILC=0xb
Exception at 0xe9dfdf6e
EFR=0x2 NRP=0xe9dfdf6e
Internal exception: IERR=0x12
Fetch packet exception
Resource conflict exception
ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0xe9dfdf6e, sp = 0x00827fb8.
To see more exception detail, use ROV or set 'ti.sysbios.family.c64p.Exception.enablePrint = true;'
xdc.runtime.Error.raise: terminating execution
Note that no errors are reported when repeating the call to the assembly routine over a smaller number of iterations (each iteration does the same processing [=inits buffers + asm call], on the same buffers !); for example, it just works fine for 50 iterations with correct data being computed, but shows this exception for 100 iterations or more ... the same processing executed without Sys/Bios works no matter how many iterations are made !
I just wander why it correctly runs the processing for first iterations, while exactly the "same processing" fails just a while after !
Apparently, the exception comes from the fact that the code just jumps into a region containing wrong instructions, jumping for "really unknown reasons"
I tried to debug my code, to know when the exception is raised, executing this code using the step-by-step feature (assembly step-into), when i do this, it just works fine !! i can't detect anything weird in the assembly and consequently runs fine for the entire range of iterations .. while it shows an exception when i run the whole code at once !
step-by-step execution (assembly step-into) -> works fine ; normal execution (resume button) -> exception !!
So, please first: is it normal that a code changes its behaviors (or won't work) when using SysBios ?
What might be the causes of this phenomenon ?
Is there a configuration to add in SysBios, to let it execute the assembly code as if there were no OS ?
Is it normal that the same processing works at times, and fails at times ? making a loop changes something ?
Additional information:
used buffers are in MSMC or L2SRAM
only 1 task is created, where i added the processing
i believe i got enough knowledge writing standard c66 assembly, therefore i won't plan to use the C version (for efficiency reasons)
in the .cfg file, there's only very basic configurations ...
Sys/Bios version: 6.34.2.18
I would appreciate your help
Thanks