I have an old product which needs a tune up. It's build with an old C51 UV3 compiler and has battery backed up RAM. I need to segment the battery backed up XDATA into zero initialized and not initialilzed data. There are are a few messages about which discuss modifying XDATASTART and XDATALENGTH in startupMX.a51 to zero init only part of XDATA and then locating variables that need to be preserved in the address range XDATASTART+XDATALENGTH range. Ok, I get that, but it appears one has to manually locate each preserved variable into that memory range with an __at__ keyword. As there are a large number of preserved variables, manually calcuating a ordered location for each one promises to be a hugely labor intensive process. In the ARM world, there's a NOINIT keyword which allows the linker to locate variables in the proper segment. Is there any equivalent in the C51 world?
Other embedded compilers (unfortunately none for 8051) which allow the creation of user defined segments, any one of which can be declared zero init or not. By declaring a variable as part of those segments, one can control it's initialization. Alas, now that I reflect those are all for ARM processors. Does such a linker definition capacity exist in Keil's C51 world?
Thanks for any help!
dlpaulsen said:I have an old product which needs a tune up. It's build with an old C51 UV3 compiler and has battery backed up RAM. I need to segment the battery backed up XDATA into zero initialized and not initialilzed data.
That description appears strange enough to be hard to believe..
Splitting up XRAM like that would never be just a "tune-up". Particularly not if it has you complaining about the amount of steps to do it being oh so cumbersome. If if this were really a tune-up, the majority of that work would be done already, and you'ld just be moving some variables from one side to the other of the divide.
Splitting up XRAM like that would never be just a "tune-up".
you missed that he is using battery backed RAM
View all questions in Keil forum