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

Using Enumerations problem?

Hi,

I'm using the MCBSTM32E board with STM32F103ZE uC.

If I declare an enumeration type as 'static' in a function or as a global variable then the compiler signals no error or warning but the application simply does not run.

typedef enum{
first=1,
second=2
}TeMyEnum;

void vMyFunc(){
 static TeMyEnum eMyEnum=second;
}

Where do I go wrong?

Thanks
Henk

Parents
  • First things first:

    >Most likely, there is something wrong with your
    > memory setup (and/or Stack setup), and your program
    > is crashing due to invalid memory accesses...

    I think you could be right. It seems like a memory problem.
    I'm new to this ARM stuff.
    My project includes the STM32F10x.s and my main.c file only includes stm32f10x.h.

    I think that is sufficient for proper stack e.t.c. initialisation.

    I assume that when selecting the correct processortype in uVision that memory settings will be okay?

    I download using the ULINK-ME interface shipped with the board.

Reply
  • First things first:

    >Most likely, there is something wrong with your
    > memory setup (and/or Stack setup), and your program
    > is crashing due to invalid memory accesses...

    I think you could be right. It seems like a memory problem.
    I'm new to this ARM stuff.
    My project includes the STM32F10x.s and my main.c file only includes stm32f10x.h.

    I think that is sufficient for proper stack e.t.c. initialisation.

    I assume that when selecting the correct processortype in uVision that memory settings will be okay?

    I download using the ULINK-ME interface shipped with the board.

Children