Dear TI experts,
I have similar issue as described in following forum thread (http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/162759/728746.aspx#728746) with simple blinky example in IAR environment. Unfortunately the mentioned advices have not hepled - the code of sys_memory.asm compiled and linked by IAR EWARM works incorrectly - processor stays in mloop.
IAR EWARM installation:
IAR Assembler for ARM
6.40.2.53884 (6.40.2.53884)
IAR C/C++ Compiler for ARM
6.40.2.23884 (6.40.2.23884)
IAR ELF Linker for ARM
6.40.2.53884 (6.40.2.53884)
target:
TMS570LS3x HDK
code snippet:
;-------------------------------------------------------------------------------
; Initialize memory
PUBLIC _memoryInit_
_memoryInit_
ldr r12, regMinitGcr ; MINITGCR register pointer
mov r4, #0xA
str r4, [r12]
ldr r4, ramInitMask ; load RAM initialization mask
str r4, [r12, #4]
mloop
ldr r5, [r12, #12]
tst r5, #0x100
beq mloop
mov r4, #5
str r4, [r12]
bx lr
ramInitMask dcd 0x657F ; value copied from CCS project
regMinitGcr dcd 0xFFFFFF5C
A program built by TMS470 Code Generation Tools 4.9.1 is running properly, does not get stuck in _memoryInit_ function. By the way, the function _coreEnableRamEcc_() is not called.
IAR and TI compilers produce a different object code:
tst r5, #0x100
E3150F40 (IAR EWARM)
E3150C01 (CCSv5)
Dump of SYS1 registers in IAR debugger:
MINITGCR = 0xA
MSINENA = 0x657F
MSTCGSTAT = 0x0 (0x100 expected)
Please do you have any idea what could be wrong?
Many thanks in advance,
Cheers
Jiri