Hello everyone, My application need to relocation the default stack. I programmed a small injection into the section GSFINAL. At first it worked, but suddenly stopped. Compilation information in the attachment.
For now, you can use the workaround of using the compiler option --codeseg, that one apparently works, unlike the pragma.
Also, for your special case, of setting the stack pointer at startup, the optin --stack-loc might be the better alternative, as it doesn't require any inline asm.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmm, I still don't understand what is happenign here. It seem shte segment name gets overwritten while on the stack.
Apparently this is about interaction between #pragma codeseg and pragma save / restore; #pragma codeseg by itself seems to work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
At first, it worked on. The error appears unpredictably, only when specifying a codeseg GSFINAL segment. The latest build of the compiler reproduce this error. This is reminiscent of an uninitialized variable error. The assembler text shows the spoiled name .area ??? I said true.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can reproduce the issue on current SDCC [r11453]: The section name is getting corrupted.
Ok. That would be good, for beauty of solution of the startup sections. Thanks in advance.
I'll look into it.
For now, you can use the workaround of using the compiler option --codeseg, that one apparently works, unlike the pragma.
Also, for your special case, of setting the stack pointer at startup, the optin --stack-loc might be the better alternative, as it doesn't require any inline asm.
Yes, I will does as it possible. I wanted to do a hidden, otherwise implicit, initialization of the kernel. Thanks again.
Hmm, I still don't understand what is happenign here. It seem shte segment name gets overwritten while on the stack.
Apparently this is about interaction between #pragma codeseg and pragma save / restore; #pragma codeseg by itself seems to work.
At first, it worked on. The error appears unpredictably, only when specifying a codeseg GSFINAL segment. The latest build of the compiler reproduce this error. This is reminiscent of an uninitialized variable error. The assembler text shows the spoiled name .area ??? I said true.