完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
坚持一两天,但我可能会错过一些明显的东西。任何提示赞赏!基本上,我无法获得动态变量回调函数来运行。在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 HARMony 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! |
|
相关推荐
12个回答
|
|
|
“使用和声V1.0602”他们今天发布了V1.10。你在做一个老产品吗?
以上来自于百度翻译 以下为原文 "Using Harmony V1.06.02" They released V1.10 today. Are you working on an old product? |
|
|
|
|
|
嗨,请确保使用最近的Harmony版本v1.10或v2.02b。
以上来自于百度翻译 以下为原文 Hi, Make sure to use a recent Harmony version v1.10 or v2.02b. Many SW fixes have been done since v1.06.02 Regards |
|
|
|
|
|
感谢到目前为止的答复。我使用的是Harmony 1.06.02,因为当我尝试移植到新版本时,一些关键的特性中断了。最值得注意的是,我无法让WiFi驱动程序在最新版本中正常工作。原来的硬件和软件实际上只有约一年的时间1.0602是当前的。尽管建议使用最新版本是合理的,但我并不认为这是问题,因为演示应用程序工作正常,我可以毫无问题地在其中添加自己的动态变量。我怀疑我遗漏了某些配置选项,这显然看起来并不重要。“能否再次检查回调函数(TCPIP_HTTP_Print_xxx)是否存在于http_print.c中?”是的,函数原型存在于HtpPyPrime.c.以及适当的case语句中。此外,动态变量似乎以与case语句相同的顺序列在文件“http_pint.idx”中。应该退出默认情况,得到“!如果输出是枚举或回调定义的问题,则输出。它就像一个钩子,它告诉HTTP服务器在html中命中~.~时激活函数调用,但在我的配置中不起作用。
以上来自于百度翻译 以下为原文 Thanks to the replies so far. I'm using Harmony 1.06.02 because when I tried to port to a newer version, some critical features break. Most notably, I can't get the WIFI driver to work properly in the latest versions. The original hardware and software are actually only about a year old when 1.06.02 was current. Although it is reasonable to suggest to go to the latest version, I don't really think that is the problem since the demo app works fine and I can add my own dynamic variables there with no problem. I suspect there is some configuration option I am missing that wouldn't obviously seem critical. " can you double check if your callback function (TCPIP_HTTP_Print_xxx) exists in http_print.c?" Yes, the function prototype exists in http_print.c. as well as the appropriate case statement. In addition, the dynamic variables appear to be listed in a file "http_pint.idx" in the same order as the case statement. My function definition is in custom_http_print.c . I'm assuming the main switch statement in the TCPIP_HTTP_Print(...) function (in http_print.c) isn't even being called since I would fall out to the default case and get "!DEF" output if it were a problem with enumeration or definition of the callback. It's like the hook that tells the HTTP server to activate a function call when it hits a ~variable~ in the html is just not working in my configuration. |
|
|
|
|
|
你应该考虑更新你可能想一次做一个Rev。你可以看看我的帖子中的一些变化。WiFi在V1.09上运行。至于你的问题。确保你有1.06个版本的MHC。比较项目和工作示例的设置。确保没有遗漏。然后在比较中确保代码中的所有设置都是正确的。
以上来自于百度翻译 以下为原文 You should consider updating you may want to do it a rev at a time. You can look at my posts for some of the changes. The wifi does work on v1.09. As far as your issue. Make sure you have the 1.06 version of MHC. Compare the settings for you project and the working sample. Make sure there is nothing missing. Then during the compare insure all the settings are correct in the code. |
|
|
|
|
|
我同意最好的方法是将项目迁移到一个较新版本的和声。我试过1.09,但是当我添加WIFI驱动程序时,我遇到了一个主要问题,它是以前运行得很好的非常基本的代码,刚刚停止工作。事实上,我记得我好像从来没有碰到过App_Tasks()函数。我注意到了关于在WIFI驱动程序中使用RTOS的警告,并决定WIFI驱动程序可能不再真正兼容了。因为我现在不想迁移到RTOS,所以我想最好回到Harmony的已知工作版本。其他与我的硬件一起工作的驱动程序是UART、I2C、控制台、定时器等等。当我使用1.0602增加WiFi时,没有任何中断。但是,当我使用Harmony 1.09添加WIFI驱动程序时,相同的代码停止运行(显然这是两个完全不同的项目——我不会在和谐版本之间来回移动一个项目)。您认为即使没有RTOS,WIFI驱动程序也应该在1.09中正常工作吗?谢谢你的回复。
以上来自于百度翻译 以下为原文 I do agree the best way to proceed is to migrate the project to a newer version of Harmony. I tried this with 1.09 but the main problem I ran into was when I added the WIFI driver, very basic code that ran fine before, just stopped working. In fact, as I recall I never seemed to be even hitting my App_Tasks() function. I noticed the warning about using a RTOS with the WIFI driver and decided maybe the WIFI driver is not really compatible anymore. Since I don't want to migrate to an RTOS at this point, I figured best to go back to a known working version of Harmony. I have the WIFI driver up and running well in 1.06.02 (with the correct SPI interface for my hardware). Other drivers that are working with my hardware are UART, I2C, Console, Timer and more. Nothing breaks when I add the WIFI in using 1.06.02. but the same exact code stops running when I add in the WIFI driver using Harmony 1.09 (obviously these are two completely different projects - I'm not moving one project back and forth between harmony versions). Do you believe the WIFI driver should work well in 1.09 even without an RTOS? Thanks for the reply. |
|
|
|
|
|
有一个以上的WiFi驱动程序。其中一个需要RTOS,而另一个则不需要。我不确定哪一个是我的头顶。出口商16EVE板的那一个没有。但我花了一点时间把它添加到我的项目中。我想我也发表了这篇文章。
以上来自于百度翻译 以下为原文 There is more than one wifi driver. One of them requires an rtos the other does not. I am not sure which is which off the top of my head. The one for the exporer16 eval board does not. But it did take me a bit of time to get it added to my project. I think I posted about that too. |
|
|
|
|
|
我使用来自MHC的WIFI驱动程序,这是和谐框架配置-驱动程序部分中的最后一项。在我的硬件中的设备是微芯片MRF24WG。使用1.06.02工作正常,并为我使用的SPI接口定义了正确的管脚。当在Harmony 1.09中添加相同的驱动程序时,我必须确认我已被警告应该使用RTOS。当应用程序失败后,这样做,这足以吓唬我回到1.0602。如果我认为没有RTOS是可行的,我可能会尝试回到那个方法。
以上来自于百度翻译 以下为原文 I use the WIFI driver from MHC that is the last item under the Harmony Framework Configuration - Drivers section. The device in my hardware is the Microchip MRF24WG. Works fine with 1.06.02 with the correct pins defined for the SPI interface I use. When adding the same driver in Harmony 1.09 I have to confirm I've been warned I should use an RTOS. When the app failed to work after doing that, it was enough to scare me back to 1.06.02. sad: I may try going back to that approach if I think it's doable without an RTOS. |
|
|
|
|
|
驱动程序很可能是来自WiFi G EVE板的相同的黑客代码。你可以在1.09和1.06之间进行比较。我看到警告并用我的F.A.E.检查模块不需要RTOS。代码是另一个故事。初始化等待驱动程序。它需要被重写。在我的例子中,WiFi是可选的,但是代码不允许这个选项。但是我在V1.09中没有RTOS,它工作得很好。
以上来自于百度翻译 以下为原文 The driver is most likely that same hacked code from the wifi G eval board. You can do a compare between 1.09 and 1.06. I saw the warning and checked with my F.A.E. the module is does not require the rtos. The code is another story. The initilazation waits for the driver. It needs to be rewritten. In my case the wifi is optional , but the code does not allow that option. But I have it working without an rtos in v1.09 and it works fine. |
|
|
|
|
|
好啊。谢谢你的答复。我可能会回过头来看看1.09作为解决方案,并努力让WIFI驱动程序在那里工作。
以上来自于百度翻译 以下为原文 OK. Thanks for the reply. I may go back to looking at 1.09 as a solution and hammer away at getting the WIFI driver working there. |
|
|
|
|
|
你有没有解决这个问题?我的项目遇到了同样的问题。
以上来自于百度翻译 以下为原文 Did you ever get a resolution to the issue my project is suffering the same problem. |
|
|
|
|
|
我不认为下面是您的问题,但您应该知道:HTTP模块中有一个bug(Bug不是在新的HTTPNET中),这可能导致框架调用动态变量的错误回调。它取决于文件的文件名和路径,其中包含动态变量。原因如下:在MPFS生成器中有一个用于路径+文件名的哈希值。框架还计算它,并使用哈希值来访问动态变量回调。但是,如果有哈希冲突,框架只会访问错误的动态变量回调。除此之外,散列是非常糟糕的,并且在不同目录中创建相同文件名的概率很高。在线程中详细描述了“HTTP中的bug由于MPFS哈希冲突而提供错误的动态变量”(http://www. MyCHIP.COM/FUMMS/FUNDSPE/934 946)。
以上来自于百度翻译 以下为原文 I don't think the following is your problem, but you should be aware of it: There is a bug in the http module (bug is not in new http_net), which can cause the framework to call the wrong callback for the dynamic variables. It depends on the filename and path of your files, which contain the dynamic variables. The reason is the following: There is a hash value which is calculated for path+filename in the MPFS generator. The framework also calculates it, and is using that hash value for accessing the dynamic variable callbacks. But if you have hash collisions, the framework simply accesses the wrong dynamic variable callback. In addition to this, the hash is really bad, and has a high probability to create collisions for same file names in different directories. Details are described in thread "Bug in http delivers wrong dynamic variables because of MPFS hash collisions" ( http://www.microchip.com/forums/FindPost/934946 ) |
|
|
|
|
|
我们的问题的根源是当将动态变量更改为25时最大同时文件访问设置为1。
以上来自于百度翻译 以下为原文 The source of our problems was the Maximum Simultaneous File Access was set to 1 when changed to 25 the Dynamic Variables worked. |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475 浏览 0 评论
5795 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1126浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1098浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-3 13:01 , Processed in 0.733493 second(s), Total 66, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
3675