This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Stack initialization with constant

Doe Keil IDE support initializing stack space with a constant? For example with a #define. If not, please does someone have ARM Cortex M3/M4 assembler code to do that and where should it be located? For example in startup*.s prior to the branch to main?

Parents
  • For example in startup*.s prior to the branch to main?

    Did you look at any of the Keil examples?

    Here is an extract from a startup file, taken from one of the cortex examples:

    ; <h> Stack Configuration
    ;   <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
    ; </h>
    
    Stack_Size      EQU     0x00000200
    
                    AREA    STACK, NOINIT, READWRITE, ALIGN=3
    Stack_Mem       SPACE   Stack_Size
    __initial_sp
    

Reply
  • For example in startup*.s prior to the branch to main?

    Did you look at any of the Keil examples?

    Here is an extract from a startup file, taken from one of the cortex examples:

    ; <h> Stack Configuration
    ;   <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
    ; </h>
    
    Stack_Size      EQU     0x00000200
    
                    AREA    STACK, NOINIT, READWRITE, ALIGN=3
    Stack_Mem       SPACE   Stack_Size
    __initial_sp
    

Children