I have a program in C51 that I waned to port to ARMC specifically the Cortex_M3 namely LPC17xx micros, however the locating of the variables is not happening correctly, namely:
In C51, the memory areas; bdata, idata, xdata, code.
Attempting to use "const" for lookup tables that were in ROM does NOT place the variables in ROM (as expected) but in RAM.
Likewise the use of "static" for variables in RAM does work (the indirectly addressed area or XRAM areas are non existant in the ARM architecture so that's fine).
For bit variables I have typedef'ed a structure and added the "__attribute__((bitband))" to use bit banding (that is one way).
I have searched here at "Keil" and the "ARM infocenter" considerably for a guide or tutorial for all like myself that are attempting to transition to ARM but have not found this information in specific form.
So how are variables located in different memory areas in the ARM processors, any help will be appreciated.
Regarding the Bit type of the C51, I completely agree with "Per" that a structure of 32 bit integers is perfectly acceptable, and in my case (porting from C51 to ARMC) functionally identical/equivalent.
I believe replacing bit with bool should be functionally identical, and simpler, and within the realm of standard C (C99 at least.)
As for idata and xdata, just drop these (as you did.) They don't make sense on an ARM, and they will do you no good.
As for code, replacing it with const is correct.