This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to define data in Flash/ROM?

I defined a array like this:
uchar *tuning_order[160]={};
or const uchar *tuning_order[160]={};

but Keil said: error C249: 'DATA': SEGMENT TOO LARGE

I do not konw why?I use the AT89S51.

Parents
  • Thank you.I will read the "bible" documents carefully.

    I just want to put my array in ROM.
    I defined a array two different ways.
    1. code uchar *tuning_order[160]={};
    2. uchar code *tuning_order[160]={};
    First one compled successful. But the second one was the same problem(Keil said: error C249: 'DATA': SEGMENT TOO LARGE)

    I do not know what is the differences between the two ways.

Reply
  • Thank you.I will read the "bible" documents carefully.

    I just want to put my array in ROM.
    I defined a array two different ways.
    1. code uchar *tuning_order[160]={};
    2. uchar code *tuning_order[160]={};
    First one compled successful. But the second one was the same problem(Keil said: error C249: 'DATA': SEGMENT TOO LARGE)

    I do not know what is the differences between the two ways.

Children