Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

optimization problem

Posted by Tom on April 3, 2012
Hello there,

i made the uIP Webserver DEmo run on a nxp lpc1758 using LPCxpresso and the Keil MCB1700! It works fine while optimization is -O0. If I change it to for example -O2 the programm stucks here:

if( uxTasksDeleted > ( unsigned portBASE_TYPE ) 0U )

this is line 2062 in tasks.c.

Has someone had the same problem or a equivalent? I think i need to change some variables to volatile but until now it does not work. Has someone an idea what to do?

Thanks and regards
Thomas

RE: optimization problem

Posted by Richard on April 3, 2012
The line of code you reference is in the idle task - so it is not getting stuck there, it just looks like the idle task is running. The idle task will run when there are no other tasks that are able to run.

I would expect the code to run at all optimisation levels. Have you changed any code from the provided examples (presumably so to interface to the PHY on the MCB hardware?).

Regards.

RE: optimization problem

Posted by Tom on April 4, 2012
These are the things i changed:

setupEMACHardware (// LPC_PINCON->PINSEL3 = ( LPC_PINCON->PINSEL3 & ~0x0000000F ) | 0x00000005;
LPC_PINCON->PINSEL4 &= ~0x000F0000;
LPC_GPIO2->FIODIR |= 0x00000100; )

prvwritePHY+readPHY (the software MII Management for LPC175x)

prvSetupHardware()


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


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner