We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Since using xdata, there is used for external RAM. The program file is hex. then, the part of xdata, where is located?
XDATA is used by your program to store data as it runs; The HEX file contains only your program code - it does not contain data.
Exactly, fully agreed with Mr.Neil. That's what, i want to say in my previous message.
hi, The HEX file contains only your program code - it does not contain data Hmm, in theory, HEX file may contain any data types. For example, HEX file may contain data loaded into EEPROM. Regards, Oleg
"Hmm, in theory, HEX file may contain any data types. For example, HEX file may contain data loaded into EEPROM." Yes, that's true - but I think you're jumping way ahead of the original questioner! What you describe requires specific ISP (In-System Programming) functions, or support in a device programmer. Note that the Keil tools also support placing Constants into XDATA, for systems that can map ROM into the XDATA space
"The HEX file contains only your program code - it does not contain data." But it does contain the values for initializing those static duration data objects that are defined with initializers.
"But it [the Hex file] does contain the values for initializing those static duration data objects that are defined with initializers." Yes, but that is code that the processor has to execute to copy the values from CODE space to XDATA space each time it runs. Apart from the special cases already noted, XDATA is not loaded direct from the Hex file.