Cortex M3 / Codesourcery / Openocd Debugging Problem

Guest #2089392
Rate this post
• ▲ useful
▼ not useful
Hi, I have a little Problem with following setup:

- Stellaris LM3S6965Ethernet Eval Kit
- Eclipse Helios with CDT
- Gnu Arm C/C++ development Support for Toolchain selection and manaked 
Build
- gdb hardware debugging
- openOCD 0.4
- Codesourcery Toolchain

At first I imported the code, linkerscript and startup code for the led 
blinking sample and the hello world sample. they worked fine, build 
process as well as debuging.

Next I tried the same thing with the UIP ethernet sample, but this one 
was a lot harder. Build worked, flashing worked, but the debug process 
never hit the main function, it ended in the FaultISR. After a reset ( 
Button on Board ) the code worked ( without Debug ).

After some hours of trial and error the problem seems to be generated by 
the main file of the project. If there is any function definition before 
the main function the debug will jump in the FaultISR ( led blink and 
hello world have no functions before main ),
so:
void donothing( void ) {
}
int main(void){...}

will flash fine, will run after a reset, but debugging: no chance


On the other hand:

void donothing( void );
int main(void){
   ....
}
void donothing( void ){
}

will flash and work in debug


I would be grateful for any advice

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.