When do I use xdata?

前端 未结 5 1434
借酒劲吻你
借酒劲吻你 2021-02-14 15:44

I am new at embedded system programming. I am working on a device that uses an 8051 chipset. I have noticed in the sample programs that when defining variables, sometimes they u

5条回答
  •  忘了有多久
    2021-02-14 16:39

    How and when to use xData memory area depends on the system architecture. Some systems may have RAM at this address while others could have ROM or Flash. In either case, access will be slower than accessing internal RAM, ROM or Flash.

    Generally speaking, large items, constant items and lesser used items should go into xData. There are no standard rules as to what goes in xData, as it depends on the architecture.

提交回复
热议问题