Quality RTOS & Embedded Software

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




Loading

FreeRTOS for STM32 not workig

Posted by aruns06 on February 6, 2015

Hi Team, I am trying to run a demo application listed on the FreeRTOS demo folder. I'm using STM32 standard STM32 F1 discovery board. I was able to compile the project. When I try to debug the project, the program directly enters in to run mode(Normally the user should click on the run button to continue the execution). Then the execution stops at "HardFaultHandler". When I click on stop and the again click on the run button, the cursor remains at "HardFaultHandler" . The location of the file is "FreeRTOSv8.0.1FreeRTOSDemoCORTEXSTM32F103Keil".

Thanks Arun.S


FreeRTOS for STM32 not workig

Posted by rtel on February 6, 2015

I don't have the hardware in front of me, but I just tried opening that project from the FreeRTOS V8.2.0 distribution, in the latest version of the Keil tools (which requires the legacy libraries to be added as they have changed the tool since the project was created), switch the project to use the simulator rather than the hardware....after which it seems to be executing as expected.

From your description it sounds like something went wrong before the application started. You should be able to download the code at at least stop the debugger on program entry, but it sounds like you can't get that far as the debugger is not in control of the hardware.

Regards.


FreeRTOS for STM32 not workig

Posted by aruns06 on February 6, 2015

Hi, Thanks for the reply. I have edited the stm32f10x.s file. The HeapSize and StackSize were 0x00000000 and 0x00000200 respectively. I changed it to 0x00000800 and 0x00000500 respectively. Then the execution never halted in HardFaultHandler, instead it stopped at MemManageHandler. I don't know whether the previous issue was resolved or a new one is generated.

Before starting the debugging, I have unchecked the "Run to main" option. Then started the debugging. Control first comes to Line 122 (Please see the fig 1.), then to 123. As I continue, the execution stops at MemManage_Handler and doesn't go further. Keil is the IDE.

Regards, Arun

Attachments

fig1.JPG (85973 bytes)

FreeRTOS for STM32 not workig

Posted by aruns06 on February 11, 2015

Any Idea????


FreeRTOS for STM32 not workig

Posted by rtel on February 11, 2015

As before - this does not sound like a FreeRTOS issue because you are never even getting to main(). If you are receiving a memory management exception then it sounds like the MPU is on, which it shouldn't be, so it still sounds like your tools are not controlling, resetting and/or managing the hardware.

Regards.


FreeRTOS for STM32 not workig

Posted by aruns06 on February 11, 2015

May be that's correct. But i have used the project file I got from the FreeRTOS demo folder. There is another project file that works in IAR. I tried to run the project and that also stopped in a function "void HardFaultException(void)".

Thanks Arun


FreeRTOS for STM32 not workig

Posted by davedoors on February 11, 2015

There is another project file that works in IAR. I tried to run the project and that also stopped in a function "void HardFaultException(void)".

which makes it sound like a hardware or hardware configuration problem. Do you have the jumpers correctly on your dev board?


FreeRTOS for STM32 not workig

Posted by aruns06 on February 23, 2015

After running the program I opened the fault report window(Keil: Peripherals-->Core Peripherals-->Fault reports). The windows contains lot of parameters with check marks. Image is attached. In the report total three check box are enabled. There is an appnote from keil(http://www.keil.com/appnotes/files/apnt209.pdf) which indicates the errors and their description. But I don't understand the anything described in the doc. Any advice??? Regards, Arun

Attachments

Hardfault_report.JPG (40244 bytes)

FreeRTOS for STM32 not workig

Posted by davedoors on February 23, 2015

I guess the Keil docs will tell you how to interpret the information. If not then the ARM docs do. Have you tried this http://www.freertos.org/Debugging-Hard-Faults-On-Cortex-M-Microcontrollers.html


FreeRTOS for STM32 not workig

Posted by aruns06 on February 25, 2015

Hi, Yes I have gone through the docs. But none of the doc tells us about the solution. It mainly provide solution to address the error. Attached is the image of the error and the description. But I dont know how to do execute the STKERR (No 3) desription shown in the fig. Regards, Arun

Attachments


FreeRTOS for STM32 not workig

Posted by aruns06 on February 26, 2015

Hi, The issue is resolved. The problem is resolved now. Thanks for the replies which leads to fix the issue. The actual problem was related to selection of correct controller. We choose the wrong controller. The actual controller to be selected was STM32F100RBT6 the project was designed for STM32F103. We choose the correct controller and made some changes in main.c file and FreeRTOScofig.h file and now everything is ok. Once again thanks for the support.

Regards, Arun.S


[ 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