工具/软件:
您好!
我使用 WSMS 栈、并在 CoAP 节点示例上开发程序。 我想在端点函数中使用 MsgPack(我使用经过验证的库)。
我准备了一段简单的代码,用一个键创建基本对象。 当我把这段代码放到我的线程循环中时,它会很好地运行,但是当我把它放在端点函数(由“CoAP_service_register_uri"注册“注册)注册)中时,我有 faultISR。
我认为问题在于线程调用端点函数、可能是堆栈内存溢出。 您能帮我调试一下吗?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具/软件:
您好!
我使用 WSMS 栈、并在 CoAP 节点示例上开发程序。 我想在端点函数中使用 MsgPack(我使用经过验证的库)。
我准备了一段简单的代码,用一个键创建基本对象。 当我把这段代码放到我的线程循环中时,它会很好地运行,但是当我把它放在端点函数(由“CoAP_service_register_uri"注册“注册)注册)中时,我有 faultISR。
我认为问题在于线程调用端点函数、可能是堆栈内存溢出。 您能帮我调试一下吗?
是的丹尼尔,你 是对的。
我在“doc["test"]行“行中“中有故障= 64;“
JsonDocument doc; doc["test"] = 64; size_t bufferMaxSize = measureMsgPack(doc) + 16; uint8_t buffer[bufferMaxSize]; size_t bufferLen = serializeMsgPack(doc, buffer, bufferMaxSize);