Thanks, I figured as much. I found a couple of examples to download from ARM and they did it like this: /* Setup the IRQ stack */ mov r0,#IRQ_MODE | I_Bit | F_Bit /* IRQ_MODE, No Ints */ msr cpsr_c,r0 /* Change the mode */ ldr r13,=IRQ_STACK /* End of IRQ_STACK */ I assume that "r13" is the same as "sp" ? They also have some RAM init code after stack setups. I guess they are zeroing memory. Do I need to zero RAM? Does it really matter to anything? Regarding IAR, I started out with that system and also MakeApp. After running into several bugs I am giving up and trying the GNU world. It would spit out bad ELF files at times that my JTAG debugger could not load. I ran into another bug where the compiler went into the weeds on a simple loop and then dropped every function call thereafter. Bugs in MakeApp too. They have a few nice extensions, such as the record structure into the bits of the regs. But all the bells, whistles, and optimizations in the world matter little when it keeps throwing bugs. I could not trust it anymore. Chris.
Message
Re: How to setup Stacks in GNU
2004-12-28 by sig5534
Attachments
- No local attachments were found for this message.