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

LPC2478 and J-Link debugging

Posted by Jens Gydesen on April 13, 2013
Hi,

I have now FreeRTOS running on a LPC2478.
Please observe the following:

- I use IAR EW 5.4
- I use Segger J-Link Ultra JTAG debugger
- HW platform is "old", and is known for me. It is a subset of the Olimex LPC2478-STK with a QVGA color touch screeen. It runs normally the application, with a simple scheduler and my job is now to modify the application to run under FreeRTOS.

- I have started FreeRTOS with only one appTask and the idleHook,
- I can toggle port pins in the the timerISR, in the appTask and in the idleHook for observing on an oscilloscope where the CPU time is spent.

- When the FreeRTOS application runs without debugger, everything is perfect.

- When It runs from the EW, via the JTAG, the timing is corrupted. In the J-link Control Panel, I can see that when my FreeRTOS application runs, there are several hundred times more calls bewtween the J-Link and the CPU, than when the original old application is running. I guess these calls halts/blocks the CPU.
It seems that every time the FreeRTOS shall switch task, the CPU is halted/blocked for app. 8-10ms

I guess that it has something to do with the ARM operating mode or that the J-link and FreeRTOS both makes use of the "SWI" and therefore disrupts each other

Q1: Have you earlier seen similar behavior?

Q2: Can the "yieldfromApi" function be implemented in an other way than using the "SWI" if this is the reason for the halt/blocing the CPU?

Q3: Do you have a more simple solution?

Q4: Do you think the problem also exists if I replace the LPC2478 with the pincompaible CM-3 LPC1788?

I am not a novice in FreeRTOS, I have made several projects with AT-mega, STM32 and H8.


Best Regards,

Jens

RE: LPC2478 and J-Link debugging

Posted by Richard on April 13, 2013
I have no knowledge of the internal workings of the JLink, so can only offer general suggestions:

Do you use semi-hosting? Or have semi-hosting enabled? (it is one of the project options, and is used to allow printf() messages to be directed to the debugger). Semi hosting will cause a lot of debugger traffic and will definitely stall the CPU.

I think on those parts the pins used by the JTAG are multiplexed with other pin functions. Have you set up the CPU correctly for JTAG use (ensure the same pins are not being used for any other purpose).

Regards.


RE: LPC2478 and J-Link debugging

Posted by Jens Gydesen on April 13, 2013
Thank you for the quick answer!

The JTAG pins are reserved for only JTAG use.

I had no intentions for using semi-hosting, I don't know why this button was checked, but now I have checked the IAR-breakpoint instead, so it no seems to be working OK, thank you!

On my oscilloscope I can see that I have a spurious time interrupt now and then, but this shuold be possible to get rid of.

Have a nice weekend
/Jens


[ 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