Hi Everybody!
I'm working on a project with a AT8C51RE2 and reached the maximum code size of 65K.
So i set up the code banking mechanism and split my programm to three banks.
Everythings works fine, only string handover between banks often give some chaotic results.
For example ive got an constant char code table in bank #1 like this one:
static const char code g_UnitDesignation[UnitDesignationId_LENGTH][MaxChar_UnitDesignation]= { {""}, {"s"}, {"min"}, {"days"}, {"mg/l"} }
if try to access over an function in common bank:
char* Log_GetLogText(UINT8 UnitDesignationId, float LogValue) { char outputString[Protocol_MaxOutputChars]; sprintf(outputString, "Log %s=%5.3f", Unit_getUnitDesignation(UnitDesignationId), LogValue); return outputString; }
the generated output is often mutilated badly. (".000Logä")
Does anybody have an idea how to handle this cross access over banks or have a hint whats going wrong?
Thanks a lot,
David
Then consider a change of processor.
You are fighting a fundamental limitation of the 8051 architecture - is that a battle worth fighting?
Could your time be better spent in switching to an architecture which does not have this fundamental limitation?