Quality RTOS & Embedded Software

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


lpc17xx update FW with RTOS via IAP

Posted by Valentí on October 23, 2012
Hello freeRTOS,

I need to do a firmware with RTOS, able to update itself. This FW would update flash memory with the new FW sent before via remote communications (saved temporally in a portion of flash memory). The FW would be composed with an custom bootloader, the RTOS and the user's firmware. The bootloader, on boot, would looking for a new FW valid on reserved flash memory. If so, it will update the actual firmware via IAP commands and then will delete the reserved flash memory.

I did that with more simple plataforms with 8 bits MCUs like PF81C51RD2 or P89LPC932 and without RTOS. But I'm newbie working with 32bits MCUs and also with RTOS. So any ideas or suggestions would be very appreciated.

Is there an easy way to do that? How could affect the RTOS in this process?
Thanks in advance.

PD: We use...
MCU: LPC1758
LPCXpresso: v4.2.3 [Build 292]
RTOS: FreeRTOS 7.2


RE: lpc17xx update FW with RTOS via IAP

Posted by Richard on October 23, 2012
Applications that use FreeRTOS are statically linked - they are just executable programs like any other program so there is no difference using a bootloader with FreeRTOS than without.

If you bootloader is always the first thing to run then the RTOS tick interrupt won't be installed, so you need do nothing to stop it. If the bootloader can run after the kernel has stared, then you will need to stop the tick interrupt first, to ensure the kernel does not attempt a context switch. The consideration is the same for all interrupts though, so again this is not FreeRTOS specific.

Other things you have to do are map the interrupt vectors correctly, so the bootloader has its vector table, then you remap the vector table when the application starts running so it has its own vector table (including the RTOS handlers). Again, that would need to be done with or without an RTOS though.


[ 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.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

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.


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


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