FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [December 2013 Threads]
Hi, I'm using cortex-m4 cpu and freertos. I'm using latest stable version - 7.5.2. For some time everything were fine, but at one moment my cpu begans to fail with HardFault at different points, such as calling printf(...), taskYIELD(), calling some local functions, allocations, etc.
Hours of horrible debug shows me, that problem in stack corruption of process "Tmr Svc". Hardware breakpoint triggered at task allocation and, next, at context switch, that normal, but stack have been already corrupted.
Now I'm using freertos-7.4.2 with the same code of my program, and everything works fine. I can suppose, that problem in freertos.
And this bug appears when .bss section becomes large.
I'm using heap_3.c and all allocations works fine, i've modified linker script so, that memory for heap is after .stack section.
This bug appears also, if I'm using any other heap, that uses .bss section memory and if I create my own tasks restricted. I supposу cause of this bug is a dense memory organization, but i can't tell exactly.
I'm using latest stable version - 7.5.2.
The latest version if 7.6.0. Try that with configASSERT() defined and look through all the points on http://www.freertos.org/FAQHelp.html
Hi,
Have you set the stackoverflowcheck ?
http://www.freertos.org/Stacks-and-stack-overflow-checking.html
This can help debugging this kind of problem.
Jonathan
Le 2013-12-19 06:51, Dmitriy a écrit :
>
> Hi, I'm using cortex-m4 cpu and freertos. I'm using latest stable
> version - 7.5.2. For some time everything were fine, but at one moment
> my cpu begans to fail with HardFault at different points, such as
> calling printf(...), taskYIELD(), calling some local functions,
> allocations, etc.
>
> Hours of horrible debug shows me, that problem in stack corruption of
> process "Tmr Svc". Hardware breakpoint triggered at task allocation
> and, next, at context switch, that normal, but stack have been already
> corrupted.
>
> Now I'm using freertos-7.4.2 with the same code of my program, and
> everything works fine. I can suppose, that problem in freertos.
>
> And this bug appears when .bss section becomes large.
> I'm using heap_3.c and all allocations works fine, i've modified
> linker script so, that memory for heap is after .stack section.
>
> This bug appears also, if I'm using any other heap, that uses .bss
> section memory and if I create my own tasks restricted. I supposу
> cause of this bug is a dense memory organization, but i can't tell
> exactly.
>
> ------------------------------------------------------------------------
>
> Cortex-M4 Hard Fault. Tmr Svc thread stack corruption.
> https://sourceforge.net/p/freertos/discussion/382005/thread/f9b1bb09/?limit=25#7bc0
>
> ------------------------------------------------------------------------
>
> Sent from sourceforge.net because you indicated interest in
> https://sourceforge.net/p/freertos/discussion/382005/
>
> To unsubscribe from further messages, please visit
> https://sourceforge.net/auth/subscriptions/
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner http://www.mailscanner.info/, and is
> believed to be clean.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.