

move the original xclm.exe from the install folder somewhere else, like desktop.Ģ. It did happen to me once and since then what I do is:ġ. I tried to manually run the new xclm.exe from CMD console window as administrator, but still no chance. If i rename or delete original xclm.exe and then replace it by the medecine, compiler stays in FREE mode. With XC8 v1.40, i can't get the medecine working. I have found and read the paragraph you mentioned in the XC8 manual, and OOOPS ! that is !. I have asked tro Microchip support, expect some answer soor. ( I maintain some "keys" or block CRC to check the health of variables). Of course, if the reset is done by an power up, or from a switch off/on, these variables, will be set to zeroīy code. Not be touched, to remember some states of the machine. Thing, if I am working and an unexpected RESET, is done ( watch-dog, EMI noise, etc), I need some variables The bad new : this file are assembler, and if we are working in "C", is a troouble.Īssumed we have 1K of RAM memory, after the reset and before main is called, the compiler place some code toĬlear ALL ram, and I need a block without any changes.

This file, you can get a copy and insert in your project to do an initializAtion of the processor before the compiler call \xc8\v1.36\dat some *.dat files with informations about the processor configurationĪnd in the. In IAR compiler, normally has a lowlevel_init.c or similar function to do this. Metal has catch the exact sense of my question.Īfter the reset, some compilers, XC8 too, call some "lowlevel" function to initialize the processor internal I am not too instructed in this compiler, because normally I am using Renesas and some ARM devices under As mars01 noted, a good ide ais use the _persistent qualifier.ĪSAP I will check this behaviour in the compiler work. Which will place the variables in a different psect that is not cleared by the runtimeĪs for the registers, some will be hardware reset and that cannot be changed (maybe if you write the registers in EEPROM each time you change the registers and then if a reset is detected, some start-up code will restore them) and some will be not. Use the persistent qualifier (see Section 5.4.8.1 “Persistent Type Qualifier”), "3.5.12 How Can I Stop Variables Being Cleared at Startup? This can be overridden by using the _persistent attribute. Indeed XC compiler inserts some code to zero all RAM variables before calling main() function. Sorry!Īs far as I understand a software reset does not clear RAM in a hardware way (MCLR reset count as a pin-based software reset also). Maybe is something with me today, but I could not understand completely what he wanted.
