@@ -64,41 +64,6 @@ template("bl_iot_sdk") {
64
64
}
65
65
}
66
66
67
- source_set (" ${ sdk_target_name } _code" ) {
68
- sources = [
69
- " ${ chip_root } /third_party/mbedtls/repo/library/aes.c" ,
70
- " ${ chip_root } /third_party/mbedtls/repo/library/asn1parse.c" ,
71
- " ${ chip_root } /third_party/mbedtls/repo/library/asn1write.c" ,
72
- " ${ chip_root } /third_party/mbedtls/repo/library/bignum.c" ,
73
- " ${ chip_root } /third_party/mbedtls/repo/library/ccm.c" ,
74
- " ${ chip_root } /third_party/mbedtls/repo/library/cipher.c" ,
75
- " ${ chip_root } /third_party/mbedtls/repo/library/cipher_wrap.c" ,
76
- " ${ chip_root } /third_party/mbedtls/repo/library/constant_time.c" ,
77
- " ${ chip_root } /third_party/mbedtls/repo/library/ctr_drbg.c" ,
78
- " ${ chip_root } /third_party/mbedtls/repo/library/ecdh.c" ,
79
- " ${ chip_root } /third_party/mbedtls/repo/library/ecdsa.c" ,
80
- " ${ chip_root } /third_party/mbedtls/repo/library/ecp.c" ,
81
- " ${ chip_root } /third_party/mbedtls/repo/library/ecp_curves.c" ,
82
- " ${ chip_root } /third_party/mbedtls/repo/library/entropy.c" ,
83
- " ${ chip_root } /third_party/mbedtls/repo/library/hkdf.c" ,
84
- " ${ chip_root } /third_party/mbedtls/repo/library/hmac_drbg.c" ,
85
- " ${ chip_root } /third_party/mbedtls/repo/library/md.c" ,
86
- " ${ chip_root } /third_party/mbedtls/repo/library/oid.c" ,
87
- " ${ chip_root } /third_party/mbedtls/repo/library/pk.c" ,
88
- " ${ chip_root } /third_party/mbedtls/repo/library/pk_wrap.c" ,
89
- " ${ chip_root } /third_party/mbedtls/repo/library/pkcs5.c" ,
90
- " ${ chip_root } /third_party/mbedtls/repo/library/pkwrite.c" ,
91
- " ${ chip_root } /third_party/mbedtls/repo/library/platform.c" ,
92
- " ${ chip_root } /third_party/mbedtls/repo/library/platform_util.c" ,
93
- " ${ chip_root } /third_party/mbedtls/repo/library/sha256.c" ,
94
- " ${ chip_root } /third_party/mbedtls/repo/library/sha512.c" ,
95
- " ${ chip_root } /third_party/mbedtls/repo/library/x509_create.c" ,
96
- " ${ chip_root } /third_party/mbedtls/repo/library/x509write_csr.c" ,
97
- ]
98
- configs += [ " :${ sdk_target_name } _config_freertos" ]
99
- public_configs = [ " :${ sdk_target_name } _config" ]
100
- }
101
-
102
67
source_set (" ${ sdk_target_name } _soc" ) {
103
68
defines = [ " BL602_MATTER_SUPPORT" ]
104
69
@@ -469,6 +434,84 @@ template("bl_iot_sdk") {
469
434
]
470
435
}
471
436
437
+ config (" ${ sdk_target_name } _config_mbedtls" ) {
438
+ include_dirs = [
439
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/include" ,
440
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port" ,
441
+ ]
442
+
443
+ defines = [ " MBEDTLS_CONFIG_FILE=\" bl602-chip-mbedtls-config.h\" " ]
444
+ }
445
+
446
+ source_set (" ${ sdk_target_name } _mbedtls" ) {
447
+ include_dirs =
448
+ [ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library" ]
449
+
450
+ sources = [
451
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/hw_acc/aes_alt.c" ,
452
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/hw_acc/bignum_hw.c" ,
453
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/hw_acc/ecp_alt.c" ,
454
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/hw_acc/ecp_curves_alt.c" ,
455
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/hw_acc/hw_common.c" ,
456
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/hw_acc/hw_common.h" ,
457
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/hw_acc/sha1_alt.c" ,
458
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/hw_acc/sha256_alt.c" ,
459
+ ]
460
+
461
+ sources += [
462
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/bignum_ext.c" ,
463
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/hw_entropy_poll.c" ,
464
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/mbedtls_port_mem.c" ,
465
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/net_sockets.c" ,
466
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/port/pkparse.c" ,
467
+ ]
468
+
469
+ sources += [
470
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/aes.c" ,
471
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/asn1parse.c" ,
472
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/asn1write.c" ,
473
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/bignum.c" ,
474
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/ccm.c" ,
475
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/cipher.c" ,
476
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/cipher_wrap.c" ,
477
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/constant_time.c" ,
478
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/ctr_drbg.c" ,
479
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/ecdh.c" ,
480
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/ecdsa.c" ,
481
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/ecp.c" ,
482
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/ecp_curves.c" ,
483
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/entropy.c" ,
484
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/hkdf.c" ,
485
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/hmac_drbg.c" ,
486
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/md.c" ,
487
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/oid.c" ,
488
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/pk.c" ,
489
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/pk_wrap.c" ,
490
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/pkcs5.c" ,
491
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/pkwrite.c" ,
492
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/platform.c" ,
493
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/platform_util.c" ,
494
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/sha256.c" ,
495
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/sha512.c" ,
496
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/x509_create.c" ,
497
+ " ${ bl_iot_sdk_root } /components/security/mbedtls_lts/mbedtls/library/x509write_csr.c" ,
498
+ ]
499
+
500
+ cflags_c = [
501
+ " -Wno-sign-compare" ,
502
+ " -Wno-implicit-function-declaration" ,
503
+ ]
504
+ configs += [
505
+ " :${ sdk_target_name } _config_BSP_Driver" ,
506
+ " :${ sdk_target_name } _config_hosal" ,
507
+ " :${ sdk_target_name } _config_freertos" ,
508
+ ]
509
+ public_configs = [
510
+ " :${ sdk_target_name } _config" ,
511
+ " :${ sdk_target_name } _config_mbedtls" ,
512
+ ]
513
+ }
514
+
472
515
config (" ${ sdk_target_name } _ble_config" ) {
473
516
include_dirs = [
474
517
" ${ bl_iot_sdk_root } /components/network/ble/blecontroller/ble_inc" ,
@@ -874,11 +917,11 @@ template("bl_iot_sdk") {
874
917
" :${ sdk_target_name } _bl602_freertos" ,
875
918
" :${ sdk_target_name } _blcrypto_suite" ,
876
919
" :${ sdk_target_name } _ble" ,
877
- " :${ sdk_target_name } _code" ,
878
920
" :${ sdk_target_name } _fs" ,
879
921
" :${ sdk_target_name } _hosal" ,
880
922
" :${ sdk_target_name } _libc" ,
881
923
" :${ sdk_target_name } _lwip" ,
924
+ " :${ sdk_target_name } _mbedtls" ,
882
925
" :${ sdk_target_name } _soc" ,
883
926
" :${ sdk_target_name } _stage" ,
884
927
" :${ sdk_target_name } _sys" ,
0 commit comments