Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Biancaa-R
Copy link

@Biancaa-R Biancaa-R commented Nov 10, 2025

Added optional support for mbedTLS that can be taken by passing arguments
Fixes issue: #18319

Summary

  • MicroPython’s UNIX port by default uses a bundled lib/mbedtls submodule.

  • This causes issues if the submodule is missing or you prefer the system-installed MbedTLS.

  • MICROPY_USE_SYSTEM_MBEDTLS=1 tells the Makefile to use the system-installed MbedTLS

Benefits:

No need for lib/mbedtls submodule.

Uses system-managed MbedTLS version.

Optional: can revert to bundled submodule by not setting the flag.

Portable: works on different Linux systems if pkg-config is available.

Testing

image It is successfully building after the change using MBED TLS.

Need to export the value before :
image

Signals to the ports/unix/Makefile that you want to link against the system-installed MbedTLS rather than the bundled lib/mbedtls submodule.

It’s a clean way to make the build optional — you can turn it off just by not exporting it.

Why it’s needed:

  • MicroPython’s UNIX port by default expects the bundled lib/mbedtls.

  • If you want to avoid downloading or maintaining the submodule, this variable instructs the Makefile to skip it.

Trade-offs and Alternatives

  • You could also hardcode the use of system MbedTLS in the Makefile by directly editing it, but that makes the build less flexible for others who might want the bundled version.

Note:
Ensure you have the necessary packages:
image

 Added optional support for mbedTLS that can be taken by passing arguments

Signed-off-by: Biancaa Ramesh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants