简体   繁体   English

臂mbed os CoAP缺少ns_types.h

[英]arm mbed os CoAP missing ns_types.h

I am trying to build the CoAP protocol example for ARM mbed ( https://developer.mbed.org/teams/sandbox/code/coap-example/file/0681e205d0e9/ ) on a K64F board. 我正在尝试在K64F板上为ARM mbed构建https://developer.mbed.org/teams/sandbox/code/coap-example/file/0681e205d0e9/的CoAP协议示例。 I am getting this error on compiling: 我在编译时遇到此错误:

Compile [  0.3%]: sn_coap_header_check.c
[Fatal Error] sn_coap_header_check.c@27,22: ns_types.h: No such file or directory
[ERROR] .\mbed-coap\source\sn_coap_header_check.c:27:22: fatal error: ns_types.h: No such file or directory
 #include "ns_types.h"
                      ^
compilation terminated.

How can I obtain the missing dependency? 如何获得缺少的依赖关系? I tried mbed sync and mbed update but I get the same error. 我尝试了mbed syncmbed update但遇到了同样的错误。

Any idea? 任何想法?

UPDATE 更新

I am searching through the project and I can see that the file is present but not found by the compiler in this route: mbed-os\\features\\FEATURE_COMMON_PAL\\nanostack-libservice\\mbed-client-libservice 我正在搜索项目,并且可以看到该文件存在,但编译器在以下路径中找不到该文件:mbed-os \\ features \\ FEATURE_COMMON_PAL \\ nanostack-libservice \\ mbed-client-libservice

Did you accidentally remove the mbed_app.json file? 您是否意外删除了mbed_app.json文件? The COMMON_PAL feature is declared in there. 在那里声明了COMMON_PAL功能。

This works for me (with mbed CLI): 这对我有用(使用mbed CLI):

$ mbed import https://developer.mbed.org/teams/sandbox/code/coap-example/
$ cd coap-example
$ mbed compile -m K64F -t GCC_ARM

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM