Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will ESP-IDF upgrade to the Amazon FreeRTOS? (IDFGH-875) #3231

Closed
maxgerhardt opened this issue Mar 28, 2019 · 9 comments
Closed

Will ESP-IDF upgrade to the Amazon FreeRTOS? (IDFGH-875) #3231

maxgerhardt opened this issue Mar 28, 2019 · 9 comments

Comments

@maxgerhardt
Copy link

maxgerhardt commented Mar 28, 2019

Currently ESP-IDF uses

/*
FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.
All rights reserved

Now the people at https://github.com/aws/amazon-freertos have released documentation and demos regarding Amazon FreeRTOS on the ESP32 (https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_espressif.html and demo code https://github.com/aws/amazon-freertos/tree/master/demos/espressif/esp32_devkitc_esp_wrover_kit).

This uses

https://github.com/aws/amazon-freertos/blob/5b2967a59ecf8b3a1385bca0797ad93842d9bee3/lib/include/FreeRTOS.h#L1-L4

/*
 * FreeRTOS Kernel V10.2.0
 * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
 *

The demo project seems kind of weird to me, because the components folder agains adds an freertos folder (that doesn't interfere with Espressif's built-in freertos component) and lots of other already existing components like tcpip_adapter etc., which apparently had to be adapted to work with Amazon FreeRTOS.

Will ESP-IDF switch to the Amazon FreeRTOS in the future or will it continue to use FreeRTOS V8 from 2015?

@github-actions github-actions bot changed the title Will ESP-IDF upgrade to the Amazon FreeRTOS? Will ESP-IDF upgrade to the Amazon FreeRTOS? (IDFGH-875) Mar 28, 2019
@negativekelvin
Copy link
Contributor

@maxgerhardt
Copy link
Author

@negativekelvin The documentation states that FreeRTOS v8.2.0 was used as a base with a few backported features from V9.0.0, and while this documentation of the implementation and designs is interesting it doesn't answer the question stated in the issue; thanks regardless.

@negativekelvin
Copy link
Contributor

The most important part is

The ESP-IDF FreeRTOS is a modified version of vanilla FreeRTOS which supports symmetric multiprocessing (SMP)

Currently, the Amazon FreeRTOS port for ESP32-WROVER-KIT and ESP DevKitC does not support the following features:
Lightweight IP.
Symmetric multiprocessing (SMP).

So unless you are using esp32-solo you lose dual core. If there is a specific feature you are looking for from V10 then it would be useful to mention it. You could also encourage Amazon to add support for SMP.

@mahavirj
Copy link
Member

@maxgerhardt

Now the people at https://github.com/aws/amazon-freertos have released documentation and demos regarding Amazon FreeRTOS on the ESP32

Port for ESP32 in Amazon FreeRTOS is maintained by Espressif.

The demo project seems kind of weird to me, because the components folder agains adds an freertos folder (that doesn't interfere with Espressif's built-in freertos component) and lots of other already existing components like tcpip_adapter etc., which apparently had to be adapted to work with Amazon FreeRTOS.

Extra freertos component directory is required because of compatibility with IDF,

  • IDF expects freertos header to have include path of sort freertos/task.h
  • Some extra stubs needs to be provided to work with vanilla freertos

Other duplicated components are for similar reasons. Regarding tcpip_adapter component, it is adapted to support FreeRTOS TCP stack (IDF uses lwIP networking stack).

Will ESP-IDF switch to the Amazon FreeRTOS in the future or will it continue to use FreeRTOS V8 from 2015?

This largely depends on SMP support in vanilla freertos. Interim, any specific requirement that your are looking for?

@ammaree
Copy link

ammaree commented Mar 29, 2019

Here is an example of the functionality missed... #1453

@maxgerhardt
Copy link
Author

Thanks @ammaree for the issue link, I think @projectgus has answered my question there already:

We've decided to stop backporting FreeRTOS features to our ESP-IDF fork of FreeRTOS V9, and instead we're focusing on updating to add SMP support to FreeRTOS V10.

So far we don't have an ETA for this update, I'm sorry. We will update this GitHub issue as soon as that work is done, though.

@ghost
Copy link

ghost commented Aug 14, 2019

Hi, is there any ETA for adding SMP support to FreeRTOS V10 yet?

Thanks,

@p0wl
Copy link

p0wl commented Sep 11, 2020

any updates on this?

@projectgus
Copy link
Contributor

projectgus commented Sep 14, 2020

Hi @p0wl,

There is a preview branch of ESP-IDF with FreeRTOS 10 here:
https://github.com/espressif/esp-idf/tree/feature/freertos_upstream_plus_tlsf_allocator_preview

You can read more about it here:
https://esp32.com/viewtopic.php?f=10&t=15322

There is still no upstream API for SMP in Amazon FreeRTOS, so this branch still relies on patches to add SMP to some APIs compared to the official FreeRTOS APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants