|
Re: Array Problems: Possible<stdio.h>
I had to change two things to make your code compile. First, I changed the array dimension to 256, since you have 256 initializer values. (Remember the range from 0 to 255 contains 256 values.)
I also had to change the array definition from "int speed_array" to "rom const int speed_array" as Mike suggested. Without the "rom const", the linker complained: "Error - section '.idata_user_routines.o' can not fit the section. Section '.idata_user_routines.o' length=0x00000208".
It would probably be possible to edit the .LKR file to make the data fit without making it "rom const", but this way is easier. There's no reason to sweat making data fit into RAM when the program will never change it.
|