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

Keil + gcc

I am trying to get started using arm gcc from CodeSourcery within Keil.

Although my projects compile, run correctly, and will even debug up to the size limits of the debugger it seems that the debugger has no idea where variables are located. A simple

int k=0;
while (1)
{
    k++;
}

loop does not show k changing (optimisation is off and the asm seem to be doing the right thing). When looking at the asm another sram location contains the changing k value, but not the one the Keil debugger believes is k. Why does this happen ?

Also within the IDE when I switch to gcc I can no longer "go to definition" (the option in the right click menu is completely gone).

It almost seems like Keil and the linker don't know about one another. Are these limitations of the Keil IDE with gcc or am I doing something wrong (is there a secret "make Keil work good with gcc" button hidden in some super nest GUI menu)?

If not it seem Keil + gcc is of very limited use, how do others get around this ?

Parents
  • yes I have tried the Keil compiler. It works correctly under that it terms of debug and in terms of browse information in navigating the sources.

    Ideally we would like to keep our options open as far as tool chains; we are writing a set of libraries that may be reused for different targets and projects, being able to compile and develop/debug in Keil with both real view and gcc would be convenient.

    If it is not possible we will make other arrangements, however I was wondering if other Keil users had seen and solved these issues?

    As far as CodeSourcery is concerned I believe gcc is compiling, linking and doing all that it should be as the code does run correctly on the device, just the debugging is at issue.

    I think Keil is unable to locate variables from the output of the linker file (this may also be why it cannot jump to definition). Perhaps Keil needs me to produce some kind of "browse information" from the linker but what does it want? If I know what Keil wants as output from the linker then I can ask CodeSourcery if their toolchain can produce it.

Reply
  • yes I have tried the Keil compiler. It works correctly under that it terms of debug and in terms of browse information in navigating the sources.

    Ideally we would like to keep our options open as far as tool chains; we are writing a set of libraries that may be reused for different targets and projects, being able to compile and develop/debug in Keil with both real view and gcc would be convenient.

    If it is not possible we will make other arrangements, however I was wondering if other Keil users had seen and solved these issues?

    As far as CodeSourcery is concerned I believe gcc is compiling, linking and doing all that it should be as the code does run correctly on the device, just the debugging is at issue.

    I think Keil is unable to locate variables from the output of the linker file (this may also be why it cannot jump to definition). Perhaps Keil needs me to produce some kind of "browse information" from the linker but what does it want? If I know what Keil wants as output from the linker then I can ask CodeSourcery if their toolchain can produce it.

Children