Skip to content

Commit caf7fc8

Browse files
Update docs
1 parent 9d33d90 commit caf7fc8

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

docs/freertos.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,19 @@ To enable FreeRTOS, simply add
1515

1616
#include <FreeRTOS.h>
1717

18-
to your sketch and it will be included and enabled automatically.
18+
to your sketch and select ``Tools->Operating System->FreeRTOS SMP`` to enable it.
19+
20+
When using Platform.IO you need to add the following define to your .ini file:
21+
22+
.. code::
23+
24+
-D__FREERTOS=1
1925
2026
Configuration and Predefined Tasks
2127
----------------------------------
2228

2329
FreeRTOS is configured with 8 priority levels (0 through 7) and a process for
24-
``setup()/loop()``, ``setup1()/loop1()``, and the USB port will be created. The task
30+
``setup()/loop()``, ``setup1()/loop1()``, LWIP, and the USB port will be created. The task
2531
quantum is 1 millisecond (i.e. 1,000 switches per second).
2632

2733
``setup()`` and ``loop()`` are assigned to only run on core 0, while ``setup1()`` and ``loop1()``

docs/platformio.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ FreeRTOS support can be activated by adding
350350

351351
.. code:: ini
352352
353-
; Set the compiler flag. Still need to #include <FreeRTOF.h> in your application
354-
build_flags = -D__FREERTOS
353+
; Enable FreeRTOS Support
354+
build_flags = -DPIO_FRAMEWORK_ARDUINO_ENABLE_FREERTOS
355355
356356
to the ``platformio.ini``.
357357

docs/wifi.rst

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ Supported Features
2424
Important Information
2525
---------------------
2626

27-
Please note that WiFi on the Pico W is a work-in-progress and there are some important caveats:
28-
2927
* Adding WiFi increases flash usage by over 220KB
3028

3129
* There is a 220KB binary firmware blob for the WiFi chip (CYW43-series) which the Pico W uses, even to control the onboard LED.
@@ -34,17 +32,14 @@ Please note that WiFi on the Pico W is a work-in-progress and there are some imp
3432

3533
* LWIP, the TCP/IP driver, requires preallocated buffers to allow it to run in non-polling mode (i.e. packets can be sent and received in the background without the application needing to explicitly do anything).
3634

37-
* The WiFi driver is a little limited as of now, but fully functional for sending and receiving data
35+
* The WiFi driver has some limitations stemming from the upstream SDK:
3836

3937
* Extensible Authentication Protocol (EAP) is not supported
4038

4139
* Combined STA/AP mode is not supported
4240

43-
* Multicore is supported, but only core 0 may run ``WiFi`` related code.
44-
45-
* FreeRTOS is supported only on core 0 and from within ``setup`` and ``loop``, not tasks, due to the requirement for a very different LWIP implementation. PRs always appreciated!
41+
* Multicore is supported, but only core 0 may run ``WiFi`` related code when in bare metal. When using FreeRTOS, any Task on any core can perform networking operations.
4642

47-
* LEAmDNS (``MDNS``) is not supported in FreeRTOS due to internal IRQ-time memory allocations. Instead, use the SimpleMDNS library ( ``#include <SimpleMDNS.h>`` ) which has no such allocations.
4843

4944
The WiFi library borrows much work from the `ESP8266 Arduino Core <https://github.com/esp8266/Arduino>`__ , especially the ``WiFiClient`` and ``WiFiServer`` classes.
5045

tools/platformio-build.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ def is_pio_build():
9595
else:
9696
libpicow = File(os.path.join(FRAMEWORK_DIR, "lib", chip, "liblwip.a"))
9797

98+
if "PIO_FRAMEWORK_ARDUINO_ENABLE_FREERTOS" in flatten_cppdefines:
99+
env.Append(
100+
CPPDEFINES=[
101+
("__FREERTOS", 1)
102+
]
103+
)
104+
105+
98106
env.Append(
99107
ASFLAGS=env.get("CCFLAGS", [])[:],
100108
)

0 commit comments

Comments
 (0)