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

How to compile mbedtls library on Linux/Mac/Windows #46

Open
carloscn opened this issue Apr 11, 2022 · 0 comments
Open

How to compile mbedtls library on Linux/Mac/Windows #46

carloscn opened this issue Apr 11, 2022 · 0 comments

Comments

@carloscn
Copy link
Owner

How to compile mbedtls library on Linux/Mac/Windows

[Brief] mbedtls library is arm security suite for embedded device. It can be MAKE on multi-platform as host linux, mac os even windows OS. This paper guide you configuring and compiling the mbedtls library on Linux/Mac/Windows OS and link the output binary library files on your C project.

1 Code Prepare

MKDIR a path for saving your code. I named it work and cd work path. Using the git clone function to pull the newest mbedtls code as follows cmd.

git clone https://github.com/ARMmbed/mbedtls.git

2 Env Prepare

As a Linux user you need prepare gcc compiler.

As a Windows user I recommend you using the mingw compiler.

As a Mac user you can use same as linux gcc.

3 Compile Code

linux and mac user : make SHARED=1

and sudo make install

that is different from linux and mac user:

set WINDOWS=1 mingw32-make CC=gcc

windows mingw user: mingw32-make CC=gcc SHARED=1 -j8

4 Detail the Path

linux and mac user please find library files and include path in /usr/local/lib and /usr/local/include you can find

libmbedcrypto.so

libmbedtls.so

libmbedx509.so

and related .a file.

windows mingw user need copy the library and include path or files on compiled path.

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

No branches or pull requests

1 participant