README for mbed TLS
===================
Configuration
-------------
mbed TLS should build out of the box on most systems. Some platform specific options are available in the fully documented configuration file `include/mbedtls/config.h`, which is also the place where features can be selected. This file can be edited manually, or in a more programmatic way using the Perl script `scripts/config.pl` (use `--help` for usage instructions).
Compiler options can be set using conventional environment variables such as `CC` and `CFLAGS` when using the Make and CMake build system (see below).
Compiling
---------
There are currently four active build systems used within mbed TLS releases:
- yotta
- Make
- CMake
- Microsoft Visual Studio (Visual Studio 6 and Visual Studio 2010)
The main systems used for development are CMake and Make. Those systems are always complete and up-to-date. The others should reflect all changes present in the CMake and Make build system, although features may not be ported there automatically.
Yotta, as a build system, is slightly different from the other build systems:
- it provides a minimalistic configuration file by default
- depending on the yotta target, features of mbed OS may be used in examples and tests
The Make and CMake build systems create three libraries: libmbedcrypto, libmbedx509, and libmbedtls. Note that libmbedtls depends on libmbedx509 and libmbedcrypto, and libmbedx509 depends on libmbedcrypto. As a result, some linkers will expect flags to be in a specific order, for example the GNU linker wants `-lmbedtls -lmbedx509 -lmbedcrypto`. Also, when loading shared libraries using dlopen(), you'll need to load libmbedcrypto first, then libmbedx509, before you can load libmbedtls.
### Yotta
[yotta](http://yottabuild.org) is a package manager and build system developed by mbed, and is the build system of mbed OS 16.03. To install it on your platform, please follow the yotta [installation instructions](http://docs.yottabuild.org/#installing).
Once yotta is installed, you can use it to download the latest version of mbed TLS from the yotta registry with:
yotta install mbedtls
and build it with:
yotta build
If, on the other hand, you already have a copy of mbed TLS from a source other than the yotta registry, for example from cloning our GitHub repository, or from downloading a tarball of the standalone edition, then you'll first need to generate the yotta module by running:
yotta/create-module.sh
This should be executed from the root mbed TLS project directory. This will create the yotta module in the `yotta/module` directory within it. You can then change to that directory and build as usual:
cd yotta/module
yotta build
In any case, you'll probably want to set the yotta target before building unless it has already been set globally. For more information on using yotta, please consult the [yotta documentation](http://docs.yottabuild.org/).
For more details on the yotta/mbed OS edition of mbed TLS, including example programs, please consult the [Readme at the root of the yotta module](https://github.com/ARMmbed/mbedtls/blob/development/yotta/data/README.md).
### Make
We intentionally only use the minimum of `Make` functionality, as a lot of `Make` features are not supported on all different implementations of Make or on different platforms. As such, the Makefiles sometimes require some manual changes or export statements in order to work for your platform.
In order to build from the source code using Make, just enter at the command line:
make
In order to run the tests, enter:
make check
The tests need Perl to be built and run. If you don't have Perl installed, you can skip building the tests with:
make no_test
You'll still be able to run a much smaller set of tests with:
programs/test/selftest
In order to build for a Windows platform, you should use `WINDOWS_BUILD=1` if the target is Windows but the build environment is Unix-like (for instance when cross-compiling, or compiling from an MSYS shell), and `WINDOWS=1` if the build environment is a Windows shell (for instance using mingw32-make) (in that case some targets will not be available).
Setting the variable `SHARED` in your environment will build shared libraries in addition to the static libraries. Setting `DEBUG` gives you a debug build. You can override `CFLAGS` and `LDFLAGS` by setting them in your environment or on the make command line; if you do so, essential parts such as `-I` will still be preserved. Warning options may be overridden separately using `WARNING_CFLAGS`.
Depending on your platform, you might run into some issues. Please check the Makefiles in `library/`, `programs/` and `tests/` for options to manually add or remove for specific platforms. You can also check [the mbed TLS Knowledge Base](https://tls.mbed.org/kb) for articles on your platform or issue.
In case you find that you need to do something else as well, please let us know what, so we can add it to the [mbed TLS knowledge base](https://tls.mbed.org/kb).
### CMake
In order to build the source using CMake, just enter at the command line:
cmake .
make
In order to run the tests, enter:
make test
The test suites need Perl to be built. If you don't have Perl installed, you'll want to disable the test suites with:
cmake -DENABLE_TESTING=Off .
If you disabled the test suites, but kept the programs enabled, you can still run a much smaller set of tests with:
programs/test/selftest
To configure CMake for building shared libraries, use:
cmake -DUSE_SHARED_MBEDTLS_LIBRARY=On .
There are many different build modes available within the CMake buildsystem. Most of them are available for gcc and clang, though some are compiler-specific:
- Release. This generates the default code without any unnecessary information in the binary files.
- Debug. This generates debug information and disables optimization of the code.
- Coverage. This generates code coverage information in addition to debug information.
- ASan. This instruments the code with AddressSanitizer to check for memory errors. (This includes LeakSanitizer, with recent version of gcc and clang.) (With recent version of clang, this mode also instruments the code with UndefinedSanitizer to check for undefined behaviour.)
- ASanDbg. Same as ASan but slower, with debug information and better stack traces.
- MemSan. This instruments the code with MemorySanitizer to check for uninitialised memory reads. Experimental, needs recent clang on Linux/x86\_64.
- MemSanDbg. Same as MemSan but slower, with debug information, better stack traces and origin tracking.
- Check. This activates the compiler warnings that depend on optimization and treats all warnings as errors.
Switching build modes in CMake is simple. For debug mode, enter at the command line:
cmake -D CMAKE_BUILD_TYPE=Debug .
To list other available CMake options, use:
cmake -LH
Note that, with CMake, if you want to change the compiler or its options after you already ran CMake, you need to clear its cache first, e.g. (using GNU find):
find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} +
CC=gcc CFLAGS='-fstack-protector-strong -Wa,--noexecstack' cmake .
### Microsoft Visual Studio
The build files for Microsoft Visual Studio are generated for Visual Studio 2010.
The solution file `mbedTLS.sln` contains all the basic projects needed to build the library and all the programs. The files in tests are not generated and compiled, as these need a perl environment as well. However, the selftest program in `programs/test/` is still available.
Example programs
----------------
We've included example programs for a lot of different features and uses in `programs/`. Most programs only focus on a single featur
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
STM32+NBIOT连接电信、华为平台 (2052个子文件)
EPL-v1.0 11KB
EDL-v1.0 2KB
keyfile.3des 981B
libarm_cortexM4l_math.a 3.04MB
libarm_cortexM4lf_math.a 3MB
keyfile.aes128 1004B
keyfile.aes192 1004B
keyfile.aes256 1004B
generate.bat 22B
router_adv.bin 118B
icmp_ping.bin 98B
neighbor_solicitation.bin 86B
tcp_syn.bin 74B
udp_port_5000.bin 50B
arp_req.bin 42B
arm_common_tables.c 868KB
arm_dct4_init_f32.c 786KB
arm_dct4_init_q31.c 417KB
arm_rfft_init_f32.c 362KB
arm_dct4_init_q15.c 272KB
ssl_tls.c 260KB
arm_rfft_init_q31.c 215KB
stm32l4xx_hal_tim.c 174KB
stm32l4xx_hal_i2c.c 160KB
ssl_srv.c 142KB
arm_rfft_init_q15.c 141KB
stm32l4xx_hal_adc.c 124KB
stm32l4xx_hal_rcc_ex.c 122KB
stm32l4xx_hal_spi.c 121KB
ssl_cli.c 119KB
stm32l4xx_hal_cryp_ex.c 118KB
stm32l4xx_hal_sd.c 112KB
stm32l4xx_hal_dfsdm.c 107KB
stm32l4xx_hal_smartcard.c 105KB
stm32l4xx_hal_hash.c 104KB
stm32l4xx_hal_usart.c 101KB
stm32l4xx_hal_uart.c 93KB
sockets.c 90KB
stm32l4xx_hal_adc_ex.c 90KB
stm32l4xx_hal_ospi.c 89KB
httpd.c 85KB
stm32l4xx_hal_irda.c 85KB
ssl_server2.c 83KB
ssl_ciphersuites.c 82KB
stm32l4xx_hal_tim_ex.c 80KB
stm32l4xx_hal_qspi.c 78KB
stm32l4xx_hal_smbus.c 77KB
lcp.c 77KB
stm32l4xx_hal_sai.c 76KB
stm32l4xx_hal_dsi.c 74KB
eap.c 74KB
x509_crt.c 72KB
dhcp.c 70KB
stm32l4xx_ll_usb.c 70KB
ecp.c 68KB
tcp_in.c 68KB
nd6.c 67KB
ipcp.c 66KB
tcp.c 66KB
auth.c 66KB
snmp_msg.c 66KB
stm32l4xx_hal_dma2d.c 65KB
stm32l4xx_ll_rcc.c 64KB
stm32l4xx_hal_rcc.c 64KB
stm32l4xx_hal_can.c 63KB
mdns.c 63KB
stm32l4xx_hal_ltdc.c 63KB
ssl_client2.c 61KB
stm32l4xx_hal_rtc_ex.c 60KB
api_msg.c 60KB
bignum.c 59KB
rsa.c 56KB
arm_cfft_radix4_q15.c 56KB
tcp_out.c 56KB
stm32l4xx_ll_tim.c 55KB
stm32l4xx_hal_cryp.c 55KB
stm32l4xx_ll_sdmmc.c 54KB
stm32l4xx_hal_lptim.c 53KB
ecp_curves.c 53KB
stm32l4xx_hal_rtc.c 52KB
stm32l4xx_hal_dac.c 52KB
los_task.c 51KB
ccp.c 50KB
aes.c 50KB
dns.c 50KB
stm32l4xx_hal_flash_ex.c 49KB
stm32l4xx_ll_adc.c 49KB
stm32l4xx_hal_pcd.c 48KB
los_memory.c 47KB
ppp.c 47KB
registration.c 47KB
stm32l4xx_hal_swpmi.c 47KB
pbuf.c 46KB
stm32l4xx_hal_pwr_ex.c 45KB
er-coap-13.c 45KB
observe.c 45KB
neul_bc95.c 45KB
etharp.c 44KB
stm32l4xx_hal_dcmi.c 44KB
los_memory.c 44KB
共 2052 条
- 1
- 2
- 3
- 4
- 5
- 6
- 21
资源评论
- ipman2020-08-13就是华为开发版的一个LitOS参考代码,没有硬件信息,30分不值
wxhsnoopy
- 粉丝: 0
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 407000001.fasset
- J-20240402998-HTE-HTE-2947110DA-D3_整车运动控制器-电压渐变(缓升缓降)-检测报告-XS-汽车及零部件检测中心.pdf.crdownload
- Excel表格VBA-获取文件夹内所有文件路径.zip
- 文件移动.zip
- 反射源代码,源代码,源代码,源代码
- CAJViewer 9.0_x64-setup.exe
- servant C++语言框架rpc的源码实现 tools C++语言框架IDL工具的源码实现 util C++语言.7z
- 使用pyqt创建一个登录具有动态背景的登陆界面
- 实验名称 调幅波信号的解调
- 实验名称 振幅调制器(利用乘法器)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功