0

I am writing software for a 80C51 chip and when I declared 2 arrays of 64 bytes I suddenly got me an errorcode 254. Meaning I used all my ram.

enter image description here

The chip has so called external memory but I don't know how to use it. I am programming it in C in the mcu 8051 IDE. I tried typing 'far' and 'xdata' in front of the variabeles,but that does not compile.

Must I include a separate header file or something?

Lundin
  • 195,001
  • 40
  • 254
  • 396
bask185
  • 377
  • 1
  • 3
  • 12
  • External memory typically means external memory circuits outside the chip, on the same board. – Lundin Sep 26 '17 at 06:32
  • "External memory" can mean many things. Is it supposed to be ROM (of some variant) or RAM? It's not mapped into the address-space? What does the documentation say? – Some programmer dude Sep 26 '17 at 06:35
  • Maybe this will help: https://stackoverflow.com/questions/2043888/when-do-i-use-xdata – 0x0C4 Sep 26 '17 at 06:42
  • @lkj This helped. I was right to use xdata. However googling some more I had to enable xdata by editing my project. I have done so, but the compiler still tosses me a syntax error when trying to use xdata and I have tried every every upper/lower case combo though it should be lower case only. – bask185 Sep 26 '17 at 06:57
  • @Someprogrammerdude The external memory is external ram and it is on-chip. – bask185 Sep 26 '17 at 06:58

1 Answers1

0

I had to type 2 underscores before xdata, this was almost nowhere to be found on the internet

bask185
  • 377
  • 1
  • 3
  • 12