Hello,
Im porting our code to a "8051" harware architecture where the external CODE is placed from 0x0000 to 0x7fff. XDATA RAM is placed from 0x8000 to 0x83ff. I have to use reentrant functions. Program is crashing when entering reentrant functions and having a look into the m51 listing, I realized that local variables ar linked as follows, for instance:
C:113AH PUBLIC _?Sum2EfitoRMS ------- PROC _?SUM2EFITORMS x:0021H SYMBOL au16Sum2Efi ------- DO x:0000H SYMBOL u32resultado x:0004H SYMBOL u32auxiliar x:0008H SYMBOL u32mascara x:000CH SYMBOL u32auxa
those "RAM" locations seem to access de C:0000 external code area. The architecture is sharing the bus for code and data. Anyway, there's no RAM in those external adresses.
Non-reentrant functions seems to link local variables in the right place:
------- PROC _SCREEN_METER X:8027H SYMBOL obis X:802BH SYMBOL valor X:802FH SYMBOL tarifa
right into the _XDATA_GROUP_
Please a would thank any idea, I don't know exactly the compiler/linker options I have to check to ensure that this linking is correct.
Thanks in advance,
S.
View all questions in Keil forum