1

In this video https://youtu.be/D0VKuZuuvW8?t=259 .

You can see that flash address is beteen 0x0 to 0x3fff. and Data memory ( Io register and SRAM ) is between 0x0 to 0x8ff .

So in the video he ask how that can be passable? and he answer that AVR used Harvard architecture , and data and code in diffrent address (not like x86)

I don't understand the answer .

In ida , how can I parse this binary? what is the address of ram and what is the address of rom ? ( I must type it while I load binary file of avr ).

In 0x0 there is 32 registers (data) or code in flash?

2

So in the video he ask how that can be passable? and he answer that AVR used Harvard architecture , and data and code in diffrent address (not like x86)

Different means are used to access each.

In simple terms, only instructions and any operands embedded within the instruction stream would be read from program memory. Any "memory access" by code would go to data memory.

Of course that strict a boundary doesn't really make for a working computer. So there is a special instruction to inefficiently read data from program memory. And also a highly restricted one for writing data to program memory, which can only be run from code that is itself located in the bootloader region.

So in short, it works because accessing the memory uses a completely different mechanism for each type of memory.

In ida , how can I parse this binary? what is the address of ram and what is the address of rom ? ( I must type it while I load binary file of avr ).

A binary or hex file you load would probably go only into program memory. Some bootloaders might be able to be able to dump something into data RAM, but you'd need some out-of-band command to tell them to put the data there, or have to invent some private convention that a certain range of addresses in a HEX file would be shorthand for data vs. program memory. This likely isn't done, because there's no real need to preload data to data memory - rather, you talk to the running program and exchange data with it.

A debugger (for either virtual or emulated hardware) can of course typically allow you to change memory contents while a program is paused.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.