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

MDK ARM9 - it doesn't compile my main code at all.?!

I made a simple application for MCBSTR9 (ARM9 based demo board, but nvm really).
I have the startup and interrupt handler code included in the project (91x_it.c), it compiles and executes/sets up the processor properly, but when it comes to start up my code in the disassembly windows it's just rubish like:


0x000001D0  00000000  ANDEQ     R0,R0,R0
     8:   GPIO_DeInit(GPIO7);
0x000001D4  00000000  ANDEQ     R0,R0,R0
0x000001D8  00000000  ANDEQ     R0,R0,R0
     9:   GPIO_InitStruct.GPIO_Direction = GPIO_PinOutput;
0x000001DC  00000000  ANDEQ     R0,R0,R0
0x000001E0  00000000  ANDEQ     R0,R0,R0
    10:   GPIO_InitStruct.GPIO_Pin = GPIO_Pin_All;
0x000001E4  00000000  ANDEQ     R0,R0,R0
0x000001E8  00000000  ANDEQ     R0,R0,R0
    11:   GPIO_InitStruct.GPIO_Type = GPIO_Type_PushPull ;

- it doesn't seem to compile my code at all. There are no reported errors during the project build....What am I missing??

Parents
  • Dear Per,

    Thanks for Your reply.
    I've checked most of these things.
    First, I exclude the possibility that this is a debugger issue. The simple code that I wrote only initialises the GPIO7 port to be output, gives it a proper function then lits every 2nd LED connected to it (yes, they work :) ). None of this happens, that's why I'm sure it's not being executed at all, but then again the startup routine is being executed quite correctly.
    I've also checked the map file, it does point to the entry point if my code (which isn't there) from the startup routine.
    I'm also looking at the example projects given by the vendor for about a month now, they work absolutely correct, but I just can't tell the difference between the example projects and my own setup. If I delete the source from the example projects and insert my own, it also works properly.
    But I can't just leave it on that.
    I'd say that I'm missing one tiny, silly but major issue here that leads to the loss of my code between compiling and loading and I just can't tell what.
    I tripple (and more) checked the memory map setup, it should be fine, as declared by the chip vendor, and as I can tell it's the same setup as on the example projects - which actually drives me crazy, there isn't any difference except that my setup doesn't work.

    Regards,
    Istvan

Reply
  • Dear Per,

    Thanks for Your reply.
    I've checked most of these things.
    First, I exclude the possibility that this is a debugger issue. The simple code that I wrote only initialises the GPIO7 port to be output, gives it a proper function then lits every 2nd LED connected to it (yes, they work :) ). None of this happens, that's why I'm sure it's not being executed at all, but then again the startup routine is being executed quite correctly.
    I've also checked the map file, it does point to the entry point if my code (which isn't there) from the startup routine.
    I'm also looking at the example projects given by the vendor for about a month now, they work absolutely correct, but I just can't tell the difference between the example projects and my own setup. If I delete the source from the example projects and insert my own, it also works properly.
    But I can't just leave it on that.
    I'd say that I'm missing one tiny, silly but major issue here that leads to the loss of my code between compiling and loading and I just can't tell what.
    I tripple (and more) checked the memory map setup, it should be fine, as declared by the chip vendor, and as I can tell it's the same setup as on the example projects - which actually drives me crazy, there isn't any difference except that my setup doesn't work.

    Regards,
    Istvan

Children