2007-10-26 04:28 AM
Porting memory test utility : target does not start anymore
2007-10-22 10:02 PM
Hi,
We were using Tasking EDE and we moved to Keil µVision3 and I am trying to port Memory test utility which can be foundhttp://www.tasking.com/support/c166-classic/AN019-12_v8.ZIP
from tasking to keil. I made the code assemble but my target does not start anymore. Some explanations : A _mem_test assembly routine (see attached memtest_keil.a66) is called from startup code (see attached STARTa66) to test RAM memory locations. When complete, this test stores the result code into _error_code and returns to startup normal path. Note that _error_code will be later accessed from C (Since _error_code is declared as const in my C file, startup ram clear won't affect it). What happens : - If my _mem_test call is commented in my STARTa66 file, my target starts as usual without any problem. - If I uncomment _mem_test call in my STARTa66 file, my target does not start or seems to reset. Here the code I comment/uncomment : MOV DPP0, #0 MOV DPP2, #PAG C166_DGROUP CALL _mem_test So, in fact, I think I may not configure ST10 as it has to be to make this _mem_test call pass... I am not so familiar with DDP configuration, I have tried to push/pop registers before/after calling this _mem_test routine but did not work... I have attached my STARTA66 and memtest_keil.a66 files. For TASKING original files, you will find themhttp://www.tasking.com/support/c166-classic/AN019-12_v8.ZIP
(same link as in top of this email) Any help from an St10 expert will be appreciated... Thanks for your time ! Pierre PS : My platform is an ST10276 home based mainboard. [ This message was edited by: pierre.roth on 23-10-2007 10:37 ] ________________ Attachments : memtest_keil.a66 : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0OK&d=%2Fa%2F0X0000000bYM%2FdVlfWU3VqFMGJBblxo6enlaW1A9ID.lSUSo_G1H9nGY&asPdf=falseSTART167.A66 : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0OF&d=%2Fa%2F0X0000000bYL%2FboTrtLpg38lL3LQmmiJuos_ZwitukPIKJApOHY.gtks&asPdf=false2007-10-26 04:28 AM
Hi again,
I made some corrections on my code : - added some push/pop before/after my mem_test call in my STARTa66 - Saved DDP2 register and configured it (DPP2 = 60) to access _error_code variable that I forced to be located at 0xF0000 (page 60) - refreshed my software WDOG regularly in my mem_test routine And the result is : - It seems to work on Keil IDE simulator (I can reach jump to main routine) without any ''access violation'' warning in the output... - It still does not work on my target which does not start. From the two attached files (which represent all the stuff before entering C routines : main, etc...),