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

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

Valentí

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.

Regards.


[ 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