static variable __StackTop cannot be read at compile time even if extern?
Taylor Hillegeist via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Sun Mar 6 10:46:35 PST 2016
So I'm trying to get my FRDM-KL25Z (cortex-m0) board up and
running. I've got minimal c code running and trying to do a
direct conversion for a start. I'm using LDC for this project.
The linker Describes the symbol __StackTop
This is very nice and useful.
So i have this code:
extern(C) int __StackTop;
@attribute("section",".isr_vector")
shared ISR[3] g_pfnVectors =
[
__StackTop,
Reset_Handler,
....
However I keep getting:
start.d(62): Error: static variable __StackTop cannot be read at
compile time
I need the symbol to be ignored until linking. How do i do it?
More information about the digitalmars-d-ldc
mailing list