WICED API・BLE/WiFiのメモリリース削減方法について

Tip / ログイン to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KEKA_4568351
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

BLE/WIFI通信で、以下のWICED APIを使用していますが、メモリリソースが少ない状況です。

削減できる情報、ネタを探しています。

情報、ネタがありましたら、教えてください。

【WIFI/BLE API】

●WIFI

http_client_init

http_client_connect

wiced_aws_connect

wiced_aws_init

wiced_aws_create_endpoint

wiced_http_server_start

wiced_tls_init_identity

●BLE

wiced_bt_stack_init

0 件の賞賛
1 解決策

関数http_client_init()は関数wiced_rtos_create_worker_thread()をhttp_client.c内で定義されているHTTP_CLIENT_STACK_SIZE、HTTP_CLIENT_EVENT_QUEUE_SIZEと共に呼び出します。

このサイズを小さくすることは可能です。また、http_server.c内で定義されているHTTP_SERVER_CONNECT_THREAD_STACK_SIZE及び、wiced_defaults.h内で定義されているWICED_DEFAULT_APPLICATION_STACK_SIZEもサイズを小さくすることが可能です。

そのほかのマクロのサイズを小さくすることは容易ではございません。wiced_tls_identity_t 、wiced_aws_thing_security_info_tのようにStructureのサイズが固定されているからです。

また、ECDHE_ECDSAをTLSコネクションに使用することも、メモリ削減になるかと考えます。

ECDHE_ECDSA はDHE_RSAに比べパフォーマンスが良く、消費メモリも少ないからです。

一度、これに付きましてもご考慮ください。

<English>

The http_client_init() calls wiced_rtos_create_worker_thread() with HTTP_CLIENT_STACK_SIZE and HTTP_CLIENT_EVENT_QUEUE_SIZE defined in http_client.c.

You can reduce the above two values. Similarly the HTTP_SERVER_CONNECT_THREAD_STACK_SIZE defined in http_server.c and WICED_DEFAULT_APPLICATION_STACK_SIZE defined in wiced_defaults.h can also be reduced.

The other malloc sizes may not be easily reduced because of fixed size of structures such as wiced_tls_identity_t and wiced_aws_thing_security_info_t.

You can consider using ECDHE_ECDSA based cipher suites for TLS connection which would provide better performance at lower memory footprint compared to DHE_RSA based cipher suites.

元の投稿で解決策を見る

0 件の賞賛
7 返答(返信)