Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

freeRTOS w/ Eclipse and JLink

Posted by Georg Bauerfeind on February 3, 2010
Hi

I want to use freeRtos with Jlink-Debugging. Is anyone outthere who uses the same setup? The standard environment wont work as delivered in the freertos package...

thanx
shorsh

RE: freeRTOS w/ Eclipse and JLink

Posted by MEdwards on February 3, 2010
I think you would have to get the GDB server from Segger to do that, unless anybody knows of any open source implementations?

RE: freeRTOS w/ Eclipse and JLink

Posted by Georg Bauerfeind on February 4, 2010
hi

i have the gdb debug server from segger -thats not the problem.
the real issue is that the freertos debug config is setup for openocd and i dont know what to change to get it working with j-link
what do i habe to change, or has anyone this configuration done thereselves?

greatings
shorsh

RE: freeRTOS w/ Eclipse and JLink

Posted by Dave on February 4, 2010
I don't think this is FreeRTOS specific. You are better off asking the people who supplied you the debug server.

RE: freeRTOS w/ Eclipse and JLink

Posted by Lawrence Song on February 4, 2010
Hi, I got j-link working with eclipse in linux yesterday. I'll explain quick while it's still fresh in memory:

I followed the instructions provided by Stefano from here: http://developers.stf12.net/linux-demo (if ur a windows user a similar then go here http://developers.stf12.net/eclipse-demo) Be sure to download the latest OpenOCD (I'm using 0.4.0) and use the jlink.cfg and 'target'.cfg that came with the new version (old version .cfg files wont work...) This will be perfect if you're using an STM32 microcontroller. However you are not, then get a demo project that is specific to your core and configure the debugger and openocd Stefano's way.

Hope this helps

RE: freeRTOS w/ Eclipse and JLink

Posted by Quack on March 3, 2010
@spotdott:

can you please post your config files? I followed the linked instructions as you too. I've compiled openocd 0.4.0rc2 with "--enable jlink" (i don't know the command exactly any more) as the only configuration option. Then I replaced the jtag config with the jlink version and the smt32_mdb (or something like that) with the stm32 config file.

Now Eclipse reports an error, it doesn't know the commands "halt" and "poll halt" in the eclipse program config. I've played a while around but i didn't work :)

Thanks for your help
Greetz Simon

RE: freeRTOS w/ Eclipse and JLink

Posted by Lawrence Song on March 4, 2010
Of course. Here are my config files
jlink.cfg:

#
# Segger J-Link
#
# http://www.segger.com/jlink.html
#

interface jlink


stm32.cfg:

# JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz
jtag_khz 565

jtag_nsrst_delay 100
jtag_ntrst_delay 100

#jtag scan chain
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
# See STM Document RM0008
# Section 26.6.3
set _CPUTAPID 0x3ba00477
}
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID

if { [info exists BSTAPID ] } {
# FIXME this never gets used to override defaults...
set _BSTAPID $BSTAPID
} else {
# See STM Document RM0008
# Section 29.6.2
# Low density devices, Rev A
set _BSTAPID1 0x06412041
# Medium density devices, Rev A
set _BSTAPID2 0x06410041
# Medium density devices, Rev B and Rev Z
set _BSTAPID3 0x16410041
# High density devices, Rev A
set _BSTAPID4 0x06414041
# Connectivity line devices, Rev A and Rev Z
set _BSTAPID5 0x06418041
}
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \
-expected-id $_BSTAPID2 -expected-id $_BSTAPID3 \
-expected-id $_BSTAPID4 -expected-id $_BSTAPID5

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME

$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0

set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME stm32x 0 0 0 0 $_TARGETNAME

# For more information about the configuration files, take a look at:
# openocd.texi


stm32_gdb.cfg:

# default ports
telnet_port 4444
gdb_port 3333
tcl_port 6666


init
jtag_khz 565
reset init
verify_ircapture disable



Also, please make sure that you have libusb installed and running Eclipse as root.

In the External Tools Configurations you should have OpenODB Programmer and OpenODB Server pass in arguments of "-f jlink.cfg -f stm32.cfg -f stm32_program_eclipse.cfg" and "-f jlink.cfg -f stm32.cfg -f stm32_gdb.cfg", respectively. Make sure that Eclipse knows where you installed OpenODB. This is also done in the External Tools Configurations' Main tab under Location (for me it's /usr/local/bin/openocd).

In Debug Configurations make sure that under the Debugger tab only GDB Command has a value (for me it's /home/lsong/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-gdb) and under the Startup tab only Initialize Commands is filled as follows:

target extended-remote localhost:3333
b main
monitor soft_reset_halt
monitor sleep 500
continue
clear main


Hope this will get rid of your error messages.

Spotdott


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists