0

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. 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.

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

jordi
  • 1,157
  • 1
  • 13
  • 37

1 Answers1

1

Did you accidentally remove the mbed_app.json file? The COMMON_PAL feature is declared in there.

This works for me (with mbed CLI):

$ mbed import https://developer.mbed.org/teams/sandbox/code/coap-example/
$ cd coap-example
$ mbed compile -m K64F -t GCC_ARM
Jan Jongboom
  • 26,598
  • 9
  • 83
  • 120
  • That works on the example. When I try to use the library on my code, that includes threading i have to mix the mbed_app.json from the coap example and the one from the threading (including some reference to uvisor). Now I get an error where the missing file is "sn_nsdl.h". What I am missing now? – jordi Mar 09 '17 at 15:07
  • 1
    I guess you already fixed it, but make sure to have `COMMON_PAL` in your features list. – Jan Jongboom Mar 10 '17 at 11:50
  • Is there any reason why on this project I don't see the printf messages on the terminal? – jordi Mar 10 '17 at 12:09
  • 1
    Set your baud rate to 115,200. – Jan Jongboom Mar 17 '17 at 09:13