Quality RTOS & Embedded Software

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




Loading

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) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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