Hi All,
I'm experiencing a strange behiver in the following flow:
code compiles ok and run ok: C:000000H C:000000H C:00FFFFH 000935H CODE I:000000H I:000000H I:0000FFH 000018H IDATA I:000000H I:000000H I:00007FH 000048H DATA C:000000H C:000000H C:00FFFFH 0002C0H CONST X:000000H X:000000H X:00FFFFH 000024H XDATA
Program Size: data=96.0 xdata=36 const=704 code=2357 LX51 RUN COMPLETE. 4 WARNING(S), 0 ERROR(S)
but adding only another char without even code (DATA incress to 49) results with stack problem that RET is jumping to unused address and programs fails.
C:000000H C:000000H C:00FFFFH 000935H CODE I:000000H I:000000H I:0000FFH 000018H IDATA I:000000H I:000000H I:00007FH 000049H DATA C:000000H C:000000H C:00FFFFH 0002C0H CONST X:000000H X:000000H X:00FFFFH 000024H XDATA
Program Size: data=97.0 xdata=36 const=704 code=2357 LX51 RUN COMPLETE. 4 WARNING(S), 0 ERROR(S)
Can someone tell me what could be wrong ?
u probly runnin outa stack so go chek it
DCD DP8051
.... which only has 128 bytes of (I)data
what is the EXACT chip you use ALL letters/numbers
Erik
IDE-Version: µVision V4.10 Copyright (C) 2010 KEIL, An ARM(R) Company
Tool Version Numbers: Toolchain: PK51 Prof. Developers Kit Version: 9.02 Toolchain Path: C:\Keil\C51\BIN\ C Compiler: C51.Exe V9.02 Assembler: A51.Exe V8.02 Linker/Locator: LX51.Exe V4.47a Librarian: LIBX51.Exe V4.24 Hex Converter: OHX51.Exe V1.38 CPU DLL: S8051.DLL V3.73 Dialog DLL: DCORE51.DLL V2.73 Target DLL: BIN\DCD_DoCD_USB.DLL V2.62 Dialog DLL: DCORE51.DLL V2.73
same code with less variables works fine. adding a variable will result a got compile but running to a RET back to main function will result a jump to non valid address.
anyone ??
Sorry OP - my response has nothing to do with your problem...!
It's the compiler! It's the compiler! It's the compiler!
u runnin outa stack?
View all questions in Keil forum