Other Parts Discussed in Thread: LM3S6965
Tool/software: TI C/C++ Compiler
Hello,
I'm using a LM3S6965 evaluation kit (with ethernet and oled display). I imported a project from stellarisware and compiled it, but when I try to debug it it doesn't do what it should.
At first I thought it was a screen bug, because the green line, that indicates which line is going to be executed next, kept on jumping back and forward and sometimes completely skipping lines. Bu then I noticed that the examples don't work. After trying to setup eclipse to work with this board, I decided to go through the generated assembly and noticed that the bug coes from the compiler and not code composer. In the generated assembly I can clearly tell that lines are being ignored, reordered and sometimes executed twice. For Example:
SysCtlPeripheralEnable(SYSCTL_PERIPH_ETH);
SysCtlPeripheralReset(SYSCTL_PERIPH_ETH);
First reset is executed, then enable and then reset again.
The above line simees that it shouldn't be a problem for the program, and it isn't. The problem is in functions like netif_add (I'm trying to compile enet_io example). In it there is a function called init(). And init is a function that returns a value, but the thing about this function, is that the way it was made it always returns ERR_OK so ... this line
if (init(netif) != ERR_OK) {
return NULL;
}
should never happen, but it still does. When I saw the generated assembly I noticed that it simply didn't compile the return ERR_OK.
Not only this happens, many more bizarre errors occur and I don't know how to fix it. I'm using CCS6.1 (I tried installing CCS7 but it failed installing most drivers). At the momento I'm download CCS 5.1 which was release before the final version of the last stellarisware, so it should work.
I noticed that the original program was made using TI compiler 4.9, but I had to change it to the latest compiler or else it would give me an error code and didn't compile.
What could be the problem? Is this a known bug? Is there a problem with my installation? I'll post my findings with CCS5.1, but it seems that this should never happen