l.s., Has anyone experienced problems with declaring a local array and passing the first element of the array address as a parameter of a function? When this is done(sometimes....) the array is in C: memory. When the array is declared static globally the problem does not occur, the array is in X: mem. Used are RTX tiny and reentrant functions. ***.
1. What version of the tools are you using? 2. Have you configured the reentrant stack in the startup code and did you include the startup code in your project? I tried your example and it worked just fine. I'm using the latest tools (V7.01). Jon
Hi Jon, Below a part of the startup code. I'm using v.7.00 of uVision, however, this occurred in the previous version aswell. The problem is that this does not occur in every declaration. It happened that everything was just working fine, however after adding some code elsewhere this just came up. A collegue of mine had the same problem in different code. It is hard to reproduce but we will monitor this better in the future. Perhaps we can supply you then with a better problemdescription. thanks, regards, ***. ; Reentrant Stack Initilization ; ; The following EQU statements define the stack pointer for reentrant ; functions and initialized it: ; ; Stack Space for reentrant functions in the SMALL model. IBPSTACK EQU 0 ; set to 1 if small reentrant is used. IBPSTACKTOP EQU 0FFH+1 ; set top of stack to highest location+1. ; ; Stack Space for reentrant functions in the LARGE model. XBPSTACK EQU 1 ; set to 1 if large reentrant is used. XBPSTACKTOP EQU 01EFFH+1; set top of stack to highest location+1. ; ; Stack Space for reentrant functions in the COMPACT model. PBPSTACK EQU 0 ; set to 1 if compact reentrant is used. PBPSTACKTOP EQU 0FFFFH+1; set top of stack to highest location+1.
OK, Download V7.01 and see if you still have trouble. There were a couple of problems that were fixed in V7.01 that MAY be what you are experiencing. Jon