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.
I found out why the PC sometimes gets stuck at 0x0004. Halcogen made a function called "checkB0RAMECC". When this function casues a 2 bit ECC error, _dabort is supposed to be called, and supposed to return. Apparently something goes wrong, and it never makes it to _dabort. Setting a break point in _dabaort doesn't help. Here is a summary of the problems I'm having:
1) Intermittently get stuck at line 350 of sys_startup.c "for(;;)" - ESM group3 error
2) Intermittently get stuck at line 211 of system.c (see above for details)
3) PC always gets stuck at 0x0004 in checkB0RAMECC because _dabort never gets called (when these functions are removed, I can run the blinky code)
4) Edit/compile/debug cycle painfully slow because uploading to FLASH is very slow
5) Errors #1 and #2 go away if I cold boot the development board every time before debugging - but I'd prefer not to have to do that
The PC gets stuck at 0x0004 because Halcogen uses the section name ".intvecs", and the IAR linker file uses the section name ".intvec", which caused the interrupt vector table to be located in the wrong place.
After fixing that, checkB0RAMECC still hangs the system. In "sys_selftest" at line 860, the RAM failure test is executed, and _dabort is called. Both "ramErrorFound" and "flashErrorFound" checks are false, and the code falls through custom_dabort and then returns back to line 860, causing the RAM failure test to re-execute (forever). It looks like the ramErrorFound check should have been true, and the intentionally caused error should have been detected and ignored.
Hi Jeremy,
IAR provides a blinky sample project. It is located in ..\IAR Systems\Embedded Workbench 6.5\arm\examples\TexasInstruments\RM46L852\Hercules\
I can compile it without any error.
Regards,
QJ
Hi Spiller
Can you please share the HALCoGen Project ( HCG and DIL) with us.
Regards
Prathap
Problems #1 and #2 (from above) do not happen any more, and I'm not sure why. Problem #3 is still there, and I have the code "#if 0" out so I can bypass checkB0RAMECC until that gets resolved. I will send you my project code. Please let me know how I should send it to you.
There was a new problem that took me a while to resolve, that should be fixed. The blinky example (downloaded from IAR) is configured to use ram location 0x8000000 to 0x802FFFF. As soon as I used more than 4Kb of static RAM, the application would hang at the prefetchEntry interrupt vector (this happened before main(), while system code was clearing out the bss segment). I saw that Halocgen has an un-used region 11 at 0x8001000 to 0x80017FF. I changed the IAR linker file to use memory from 0x8002000 to 0x802FFFF, and the problem went away.