Re: [Openocd-development] Help needed for SAM3S4C

2010-12-21 Thread freddie_chopin
Are you absolutely sure that your code was loaded in the chip? Because Eclipse takes the instructions from the chip and these seem totally different than what you'd expect... You can verify the instructions at some address with OpenOCD via telnet with command arm disassemble address count thumb

[Openocd-development] Help needed for SAM3S4C

2010-12-20 Thread Kenan Özdemir
Hi, somehow my code is not working. Recently I tried to figure out, why there are these unexpected jumps in my programcode. After a look at the Disassembly, I found something strange.. My first lines in main are these: int a = 1; int i = 1; and the Disassembly says for these two

Re: [Openocd-development] Help needed for SAM3S4C

2010-12-20 Thread Michael Schwingen
Am 12/20/2010 02:32 PM, schrieb Kenan Özdemir: Hi, somehow my code is not working. Recently I tried to figure out, why there are these unexpected jumps in my programcode. After a look at the Disassembly, I found something strange.. My first lines in main are these: int a = 1; int

Re: [Openocd-development] Help needed for SAM3S4C

2010-12-20 Thread Kenan Özdemir
Subject: Re: [Openocd-development] Help needed for SAM3S4C Am 12/20/2010 02:32 PM, schrieb Kenan Özdemir: Hi, somehow my code is not working. Recently I tried to figure out, why there are these unexpected jumps in my programcode. After a look at the Disassembly, I found something strange.. My

Re: [Openocd-development] Help needed for SAM3S4C

2010-12-20 Thread Freddie Chopin
On 2010-12-20 15:58, Kenan Özdemir wrote: I already turned off the optimization, and there is no return in my main. my code looks like this: ... I reduced it a lot to find the error, but it always jumps to the same address. So as you can see I dont return from main... Show the whole

Re: [Openocd-development] Help needed for SAM3S4C

2010-12-20 Thread Michael Trensch
On 20.12.2010 15:58, Kenan Özdemir wrote: Hi, I already turned off the optimization, and there is no return in my main. my code looks like this: ** Any function will return if it reaches the end of scope, with or without return. The only difference is a compiler warning if a return

Re: [Openocd-development] Help needed for SAM3S4C

2010-12-18 Thread Andreas Fritiofson
On Fri, Dec 17, 2010 at 6:27 PM, Kenan Özdemir gla...@hotmail.de wrote: Hi, i start working with the SAM3S4C, but having trouble with openOCD. When I start debugging, the very first instructions are working fine, but after the 3rd instruction, its jumping acrross the code. This is my

Re: [Openocd-development] Help needed for SAM3S4C

2010-12-18 Thread Kenan Özdemir
Özdemir gla...@hotmail.de Cc: openocd-development@lists.berlios.de Subject: Re: [Openocd-development] Help needed for SAM3S4C On Fri, Dec 17, 2010 at 6:27 PM, Kenan Özdemir gla...@hotmail.de wrote: Hi, i start working with the SAM3S4C, but having trouble with openOCD. When I start debugging

Re: [Openocd-development] Help needed for SAM3S4C

2010-12-18 Thread Michael Schwingen
Am 12/18/2010 09:05 PM, schrieb Kenan Özdemir: Sorry I forgot to tell you that after a couple of steps, it is returning to the main routine and then keeps executing the rest of the code An embedded system has nowhere to go after you exit main, so it might crash, restart, and re-enter main from

[Openocd-development] Help needed for SAM3S4C

2010-12-17 Thread Kenan Özdemir
Hi, i start working with the SAM3S4C, but having trouble with openOCD. When I start debugging, the very first instructions are working fine, but after the 3rd instruction, its jumping acrross the code. This is my main.cpp int main(void) { int a, i = 0; a = 5; for(i = 0; i 10;