DueFreeRTOS icon indicating copy to clipboard operation
DueFreeRTOS copied to clipboard

Hardfault on scheduler start

Open Sylensky opened this issue 1 year ago • 8 comments

Hello,

Iam getting a hardfault interrupt as soon as the scheduler is startet and trying to execute the first task with the most recent version of your freertos port. The freertos configuration is the same as yours except the total heap size beeing increased to 10000.

In my application i do not create any tasks in the setup() and just call the scheduler start to let it create the idle and timer task which are created successfully. But as said as soon as the first task is getting called the hardfault hook triggers.

Any idea where to look at to solve the issue?

Sylensky avatar Mar 11 '23 00:03 Sylensky

Hi,

My port is using heap_3 so your config change has no effect: https://www.freertos.org/a00111.html#heap_3 Have you checked the examples? Are they running?

BR, Mihai

bdmihai avatar Mar 11 '23 08:03 bdmihai

Oh i see. i normally use heap_4 and was used to allocate the heap size in the config. However i tried the blink example and it ended up in the same behaviour as described before.

Sylensky avatar Mar 11 '23 09:03 Sylensky

Can you verify that it the examples are running on your side? Just to eliminate the chance of mismatching IDEs.

Sylensky avatar Mar 14 '23 21:03 Sylensky

Rigt now I have no board available... If i do manage to get one i will give this a try.

bdmihai avatar Mar 14 '23 21:03 bdmihai

I also have the same problem as described above.

Got a hard fault using the heap_4.c. Using the heap_3.c file, I was not able to have anything working and the LED is always ON.

I've used FreeRTOS V10.5.1. Once I used the version you provided, it worked.

nguterresn avatar May 10 '23 13:05 nguterresn

Is there an update on this issue?

Sylensky avatar Feb 03 '24 23:02 Sylensky

I checked again the example on my board.

  • Arduino IDE 2
  • Imported *.zip file library from this repo

The Blink example works as expected: image

bdmihai avatar Feb 04 '24 17:02 bdmihai

Did you try to update the FreeRTOS to 10.5.1 too? This was the version i was working on and received the hardfault.

Sylensky avatar Feb 18 '24 21:02 Sylensky