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


Flash to RAM -()Executing From RAM

Posted by manoalex123 on November 25, 2016

Hi, I am Using STM32F4 serious Contoller. I want run my code from RAM Memory. (Here i want turn OFF Flash memory)

Without FreeRTOS code- I am able to RUN my code in RAM memory. But if i enable FreeRTOS code- 1.The task creation code got excuted but-the task is not created. "if(xTaskCreate(MainThread, "MainApp", 512, NULL, 3, &Handle) != pdPASS)" 2.After reaching "vTaskStartScheduler()"-Its going to"HardFault_Handler".

Note: i. I Given the Vector table in RAM. ii. And I checked in debugging mode- Its excuting from RAM only. iii. I am using Keil Compiler.

Is my way is right? If its worng Please guide me in correct way? If i missed any configuration-Please guide me in correct way?

Flash to RAM -()Executing From RAM

Posted by rtel on November 25, 2016

How are you telling the application to run from RAM? Are you using compiler extensions to mark functions as RAM functions, or are you using a linker script that only places code in RAM? Are you sure the ISRs are also in RAM?

Use the debugger to step into the xTaskCreate() function to see WHY the task is not being created. If you step through the source code that you are building it should be obvious.

That may also fix the problem with the scheduler starting, but if not, also use the debugger to find where the hard fault is triggering - if tasks are not being created the the idle task will also not be created (it should be created automatically when the scheduler is started).

Alternatively, if the crash is when the SVC instruction executes, check the function it is trying to jump to (the SVCall_Handler) is where you think it is.

[ 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