We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi! For various reasons, I want to position the internal 167 stack so that it starts at the bottom of internal RAM (F600 on the C167CR), and extends 512 bytes up (i.e. to F7FF). This of course requires modification to the START167.ASM startup code. However, L166 still locates the stack at the default location of FA00..FBFF (as can be seen in the .map file). Looking at the linker SSKDEF directive definition, it implies that the linker indeed automatically puts the stack at these addresses when a 512 byte stack is selected. However, in the 167 chip manual, I can see no reason for not placing the stack anywhere in the internal RAM, as long as the appropriate registers are properly initialized (SP, STKUN, STKOV). So my question is ... how do you get the linker to allocate the stack where I want it? (I'm still using the old 3.xx tool series, perhaps this has been fixed in the 4.xx versions?) regards, /Ricard W
>I just tried the following using C166 V4.20. I'm CERTAIN this will work OK with version 3 as well. >http://www.keil.com/support/docs/1706.htm I tried doing this, but in the version I'm using (3.50c, yeah it's old) changing _BOS or _TOS did not have any effect. After thinking about it, I decided to do it "manually" and skip the SSKDEF definition altogether, by allocating a separate section for the stack. That seems to work well. /Ricard /Ricard
Did you set STKSZ to a 7. If this is not set to 7, the stack is in a fixed location (from what I recall). Jon