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

CORTEX_MPU_LPC1768_GCC_RedSuite Demo issue

Posted by JBlackArty on March 29, 2012
What version of gcc toolchain build this demo tested against ?
I tried LPCXpresso v3.6.3 [Build 317] [08/04/2011] (should be very similar to RedSuite as stated in demo name).

E:\lpcxpresso_3.6.3_317\Tools\bin>arm-none-eabi-gcc.exe --version
arm-none-eabi-gcc.exe (Code Red/Red Suite/2009_01_C) 4.3.3
...

Here is the fragment from RTOSDemo_RDB1768.map:

privileged_functions
0x000017980x5d4 ./src/FreeRTOS/portable/GCC/ARM_CM3_MPU/port.o
0x000018d8xPortStartScheduler
0x00001990xPortSysTickHandler
0x0000193cxPortPendSVHandler
0x00001930vPortEndScheduler
0x00001810vPortSVCHandler
0x00001798pxPortInitialiseStack
0x00001b8cvPortStoreTaskMPUSettings

.text0x00001d6c0x51d6
0x00004000. = (__privileged_functions_start__ + _Privileged_Functions_Region_Size)
*fill*0x00001d6c0x400000
*(.text*)
.text.Reset_Handler
0x00005d6c0x84 ./src/cr_startup_lpc17.o
0x00005d6cReset_Handler
0x00005d6cResetISR

Look at .text section start address. It's not 0x00004000, but shifted by 0x00004000 from end of privileged_functions section end.
Location counter assignments in linker script such as

/* Non privileged code kept out of the first 16K or flash. */
. = __privileged_functions_start__ + _Privileged_Functions_Region_Size;

doesn't work as expected.
The same results with Yagarto GNU toolchain (arm-none-eabi-gcc.exe (GCC) 4.6.0).
Although some tutorials doesn't recommend location counter assignments, GNU ld manual clearly describes this behavior and provides an example usage even.

RE: CORTEX_MPU_LPC1768_GCC_RedSuite Demo issue

Posted by JBlackArty on March 29, 2012
Hmm. I read again ld manual and found that it's correct behavior because location counter inside section block is relative. That line must be removed and line

/* Non privileged code kept out of the first 16K or flash. */
. = __privileged_functions_end__;

must be placed at end of privileged_functions block.
And it works as expected both in lpcexpresso and yagarto.

RE: CORTEX_MPU_LPC1768_GCC_RedSuite Demo issue

Posted by JBlackArty on March 29, 2012
I hurried again :) Final correct line:

/* Non privileged code kept out of the first 16K or flash. */
. = _Privileged_Functions_Region_Size;

Please, do fixes I mentioned. Although demo works fine (only because the LPC1768 flash luckily resides on 0x0, but this demo ported to STM32F2 with flash at 0x8000000 fails), these fixes must be done to get it linked correctly.

RE: CORTEX_MPU_LPC1768_GCC_RedSuite Demo issue

Posted by JBlackArty on April 1, 2012
Posted a bug report


[ 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