Hi all,
I am trying to debug a freertos-demo like ARM7_AT91SAM7X256_Eclipse, using eclipse + yagarto + j-link.
I followed instructions found in yagarto-site to create a new eclipse project. Compiling work fine, but I have some problems to debug firmware.
The gdb script used is the same provided by yagarto. It is:
#
# This config file was tested with J-Link GDB Server v4.04
#
# Listening for commands on this PC’s tcp port 2331
target remote localhost:2331
# Enable flash download and flash breakpoints.
# Flash download and flash breakpoints are features of
# the J-Link software which require separate licenses
# from SEGGER.
# Select flash device
monitor flash device = AT91SAM7X512
# Enable FlashDL and FlashBPs
monitor flash download = 1
monitor flash breakpoints = 1
# Set gdb server to little endian
monitor endian little
# Set JTAG speed to 30 kHz
monitor speed 30
# Reset the chip to get to a known state.
monitor reset 8
monitor sleep 10
#
# Disable the watchdog and setup the PLL
#
# WDT_MR, disable watchdog
monitor writeu32 0xFFFFFD44 = 0x00008000
# CKGR_MOR
monitor writeu32 0xFFFFFC20 = 0x00000601
monitor sleep 10
# CKGR_PLLR
monitor writeu32 0xFFFFFC2C = 0x00480a0e
monitor sleep 10
# PMC_MCKR
monitor writeu32 0xFFFFFC30 = 0x00000007
monitor sleep 10
# PMC_IER
monitor writeu32 0xFFFFFF60 = 0x00480100
monitor sleep 100
# Set JTAG speed in khz
monitor speed 12000
load
break main
continue
It flashes correctly the microP, but it crashes at/after the branch instruction:
Hi all and good morning
If someone have to give me any suggestion, thanks a lot, but for me is alse very useful to know if someone use the same confuguration used by me. It is:
IDE: ECLIPSE
COMPILER: GCC (Yagarto for win)
J-TAG: j-link Segger
Hm, don’t believe it’s a Zylin problem. If I debug with Insight the problem is the same. So Eclipse or Zylin can’t be the fault location.
I’m not sure. But I believe the Segger JTAG has no telnet interface.
Something else: I build the project without errors or warnings. But if I try to flash the device with J-Flash ARM (Segger) or SAM-BA (Atmel) both programmers tell me, the program doesn’t fit in the flash.
All eclipse is doing is running a series of command line commands, and displaying the results in the IDE. It should be possible to run these commands from the command line yourself - outside of the IDE. That might provide you with better feedback.
I have seen Eclipse hang indefinitely at certain percentages before. From memory it was something to do with the path setup, in that there was something it could not find - but I would not like to tell you that was what the problem was in case it takes you off in the wrong direction.
If you have a project that works, and one that doesn’t work I can only really suggest that you compare the compiler and linker options to see if the project that does work is adding something in that is assisting Eclipse.
I would also say that I have not used the Zylin tools in many years, have they been updated recently (within a year or two)? Also the Eclipse and CDT distributions on the Yagarto site used to be very, very, out of date. I have not looked recently so maybe this is no longer the case, but recent versions of Eclipse have their own cross debugging features rendering the Zylin plug-in obsolete. My information is probably out of date though!
I can give some information, if it is useful to someone …
First problem is related to the crash at ‘27%’. The problem is that master clock and pll fall in fault due to the previous initialization given by j-link during flashing. Comparing source code of freertos-demo and yagarto-demo, I substitude the pll initialization
Ok, perfect, I am very happy for you , but I am sad for me
I have the same problems too. One way to solve my problem could be to compare my project with yours. Could you send me by e-mail? So, if I find my problem then I can post solution for everyone.
Posting mail addresses is fine - but please obfuscate them so robots can’t pick them up. For example, write (at) instead of using the @ symbol, and instead of ’ . '. Thanks.
Hiii….I am trying to debug a FreeRTOS example for uIP stack on AT91SAM7X-EK board.I am using Eclipse indigo,Ygarto tool and J-link debugger. I am able to compile my code without any errors but when i am debugging it ,launching process stops in between saying “Internal error occured during launching” .
I am nt able to solve this problem…may be sm settings are not proper for debugging…i am not able to fix it…I have changed the PLL initialization as suggested…den also same error is popping up…
If anybody could provide me any salution……?
This is a set up you have put together yourself, and there are too many variables to be able to offer any helpful advice without being there. This is not a freeRTOS question, but a tools set up question.