坚持一两天,但我可能会错过一些明显的东西。任何提示赞赏!基本上,我无法获得动态变量回调函数来运行。在PIC32 MX795F512L上使用和声V1.0602使用我设计的自定义硬件。硬件是坚固的,并且通过以太网使用TCP和UDP运行许多项目。不过,我第一次尝试运行嵌入式Web服务器。我首先运行了一个示例应用程序,即“WebSyServInVMMMPFS”下的“PIC32 TythWebSoServer”。除了硬件特性不同之外,让一切正常工作。然后,我为这个演示项目在“index.html”中添加了自己的带有一些动态变量的html。运行mpfs2实用程序并生成适当的文件,即mpfs_img2.c、http_print.c、._http_app.c。--一切正常-检查-所以我相信我知道了让动态var工作的过程。现在,开始一个新的项目,配置适合我自己的硬件。请仔细确保MHC中的所有设置适合我的硬件或匹配演示应用程序。我可以让Web服务器处理静态html文件,所以我知道堆栈已经启动并正常工作。当我将动态变量添加到HTML中时,问题就发生了。我使用与上面相同的过程,并将回调函数添加到“._http_app.c”文件中,但是当我将浏览器指向嵌入设备所服务的页面时,得到的只是变量名的打印输出,而不是回调值,即blah blah~myVariable~blah blah blah...我在添加的示例应用程序回调中放置了一个断点,当我加载该页面时,我看到回调正在运行,并且我命中了断点。在我自己的项目中,回调函数中的断点从未命中,因此回调似乎从未运行。我已经浏览过每个文档片段,可以多次查找并比较这两个项目的所有MHC设置,但我想一定漏掉了某些设置。非常感谢任何知道动态变量回调功能的人,他们能详细地告诉我在哪里查找!提前感谢!
以上来自于百度翻译
以下为原文
Stuck on this one for a couple of days but think I might be missing something obvious. Any
tips appreciated!
Basically I cant get dynamic variable call back functions to run.
Using H
ARMony V1.06.02 on PIC32MX795F512L
Using custom hardware of my design. Hardware is solid and runs many projects using TCP and UDP over ethernet.
First time I have tried to run an embedded web server, though. I first ran an example app, the "pic32_eth_web_server" under "web_server_nvm_mpfs". Got everything there to work fine except for where hardware features differ.
Then I added my own html with some dynamic variables into the "index.html" for this demo project. Ran mpfs2 utility and generated the appropriate files i.e. mpfs_img2.c, http_print.c, custom_http_app.c. Added the appropriate call-back functions into the custom_http_app.c file. -- Everything works great - CHECK - so I believe I know the process for getting a dynamic var to work.
Now, start a new project with configuration appropriate for my own hardware. Try to carefully make sure all settings in MHC are proper for my hardware or match demo app. I am able to get the web server working with static html files so I know the stack is up and functioning. The problem occurs when I add in a dynamic variable into my html. I use the same process as above and add the callback functions into the "custom_http_app.c" file, but all I get when I point my browser onto the page being served by the embedded device is a printout of the var name instead of the callback value i.e blah blah ~myVariable~ blah blah...
SO, to be sure, I put a break point in the demo app callback that I added there, and when I load that page, I see the call back is run and I hit the breakpoint. In my own project a breakpoint in the callback function is never hit and thus it appears the callbacks are never run.
I've been through every scrap of documentation I can find and compared all the MHC settings for the two projects multiple times but I think I must be missing some setting somewhere.
Would greatly appreciate anyone who knows the dynamic variable callback functioning in detail to give me any hints on where to look!
THANKS IN ADVANCE!
0