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.
Hi i try to use the debugger script in order to stimulate data into my ADC peripheral. this is the script i wrote:
/* Map the user specific memory space */ MAP S:0, S:0xFFFF READ WRITE /* Store the content of the S: Space */ LOAD INPUTDAT.HEX S:0, S:0xFFFF /* Define a global variable for indexing */ DEFINE unsigned int GetValIdx /* Define a breakpoint at specific location */ BS 0xff000449, 1, "G_Data= ((100*_RBYTE (S:0 + GetValIdx++)+10*_RBYTE (S:0 + GetValIdx++)+_RBYTE (S:0 + GetValIdx++))<<2" GetValIdx++
the problem is that although file "INPUTDAT.HEX" exists in the same folder where the project is located, the file is not loaded into the specific memory area S:
more than that, when i try to manually change the values in S: through the memory map window, my changes are ignored with the following error message: *** error 57: illegal address (C:0x0001)
as mentioned before i try to change S:0x0001, not C:0x0001
Your thread does not seem to contain any information telling us what C: or S: would be. A hex file normaly contains all address information needed to get the information stored at the correct location. The original records covers an 64kB address range while extensions allows support for much larger memory ranges by preceding data with specific records that may specify a long offset.
Do you have multiple memories that have overlapping address ranges in your non-specific (generic) processor (does such a beast even exist???)
Hi Per thnx for your response. regardless what exactly C: or S: are, my question is about the LOAD command. if there is no way to insert in the command parameters where i'd like the data to loaded, how does the system determine where to load this data? is there any rule for that? for example the SAVE command does include parameters for the memory section to be saved. i expect the LOAD command will also include such parameters, or there will be a rule definding that. as there are no parameters for the LOAD command i probably missed the rule.
When writing data to HEX format, you need to specify what address range to save.
When loading HEX format, the file already contains the address information captured during save.
So what kind of memory mapping do you have, where you can't use the address mapping already stored in your hex file?
With hex file I'm now assuming (which may be incorrect) that we are talking about an Intel-Hex file.
Note once more that you are randomly talking about some unknown "generic" beast.
thnx Per you indeed made your point. i'm using HEX format which is called (in the application i'm using to generate it) "Intel Hex Code-8 bit". it looks like this: :02000004F80002 :1000000031353031333131323731323831303731C7 :1000100032333133313132333132363132333132BE :1000200038313134313131313135313231313237AA :100030003133313132323131383131373131373199 . . . :090900003131343131343131342C :00000001FF
i can manage to find which header i should use in order to locate the file to the place in the memory i intend to.
i'm working with SiLab 8051F931 which has 64KB code and 4KB RAM
the mapping includes I:, C: and X:
can i use, when working in debug mode with USB debug adapter, the S: memory space? can the debugger work with virtual memory that is located outside the micro (i mean in the PC)?
i have plenty of free memory in C: in case it's required i can locate the data i need over there, but if possible i'd like to use S: (assuming it is indeed virtual, external to the chip).