完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
保持镇定的一种方法是看到乐趣;)下面的代码是为PIC16F1703生成BYMPLAB(C)代码配置器3.16。(我将它改为更短)。空In(IOCAFBITS.IOCAF0=1)IOCAF0IISR();/ /中断ICOCAF组(IOCANBITS.IOCAN0=1)IOCAN0IISR();/ /中断组IOCAN(IOCAPITS.IOCAP0==1)IOCAP0I ISR();IOCAP}空隙IOCAF0IOSISR(空隙){IOFAF0IX中断thand();IOCAFBITS.IOCAF0=0;} IOCAN0OSISR(空隙){IO(IOCAN0OxDebug),IOCAN0IX中断(),IOCANBITS.IOCAN0=0;} IOCAP0xISR(空隙){IF(IOCAP0IX中断HANDHANDANDER)IOCAP0A中断线程();IOCAP组IOCAP0=0;我怀疑MCC的东西不能识别这个生成的东西的乐趣。那么这就是我的问题:MCC的目的是什么?
以上来自于百度翻译 以下为原文 One way to stay calm is to see a fun ;). The following code is generated by MPLAB(c) Code Configurator - 3.16 for PIC16F1703. (I reformated it to be shorter for that post.) void PIN_MANAGER_IOC(void){ if(IOCAFbits.IOCAF0 == 1) IOCAF0_ISR(); // interrupt on change for group IOCAF if(IOCANbits.IOCAN0 == 1) IOCAN0_ISR(); // interrupt on change for group IOCAN if(IOCAPbits.IOCAP0 == 1) IOCAP0_ISR(); // interrupt on change for group IOCAP } void IOCAF0_ISR(void) { if(IOCAF0_InterruptHandler) IOCAF0_InterruptHandler(); IOCAFbits.IOCAF0 = 0; } void IOCAN0_ISR(void) { if(IOCAN0_InterruptHandler) IOCAN0_InterruptHandler(); IOCANbits.IOCAN0 = 0; } void IOCAP0_ISR(void) { if(IOCAP0_InterruptHandler) IOCAP0_InterruptHandler(); IOCAPbits.IOCAP0 = 0; } I suspect that MCC stuff do not recognize the fun in this generated stuff. Then that is my humble question - What is the purpose of MCC? |
|
相关推荐
19个回答
|
|
|
那是最新的MCC吗?它确实给你一个工作项目。而且XC8很可能清理干净。但可能不在自由模式下。
以上来自于百度翻译 以下为原文 Is that the Lastest MCC? It does give you a working project. And it is probable that XC8 would clean that up. But probably not in free mode. |
|
|
|
|
|
在调用函数之前,我有点喜欢这个序列。
以上来自于百度翻译 以下为原文 I kind of like this sequence if(IOCAF0_InterruptHandler) IOCAF0_InterruptHandler(); Test if the function exists before calling it. |
|
|
|
|
|
3.16不是最后一个。迁移到新的一个将需要额外的工作,至少用于测试以前的功能仍然有效。所以我不着急。新发行版本的发布说明并没有提到这一特定的问题。我相信最后一个版本是由同一个团队发布的,并且声明的方式和准备好了一样。我认为MCC可以给出一个工作项目。但事实并非如此。我不确定你的句子是否是MCC目的的精确定义。我想你说的是函数的自动内联,只调用一次。这个特性是伟大的,但对于项目“工作”并不重要。当一些用户说“可能”并且没有看到bug时,它是可以的。但即使是这个用户也需要一个工具来确定它所做的事情。当我看到那些让工具读取服务部分的数据表而不需要大量的理解的时候,我怎么能信任他们制造的仪器呢?
以上来自于百度翻译 以下为原文 3.16 is not the last. Migration to new one will require additional work at least for testing that previous functionality still work. So I do not hurry. Still release notes of fresh releases do not mention this particular issue. I believe that the last release was released by the same team and was stated the same way as ready for use. I'd say that it could be expected that MCC gives a working project. But it does not. And I am not sure that your sentence is a precise definition of purpose of MCC. I think you say about automatic inlining of functions that are called only once. That feature is great but not critical for project to be "working". It's ok when some user say "probable" and do not see a bug. But even this user needs a tool that is "certain" about what it does. When I see that people that make the tool read datasheets of serviced part without critical amount of understanding then how can I trust the instrument they make? |
|
|
|
|
|
|
|
|
|
|
|
这是动态图书馆的必由之路。所以我也喜欢。
以上来自于百度翻译 以下为原文 That is the only way for dynamic library. So I like it too. |
|
|
|
|
|
只是给出答案并不好玩,你不同意吗?;)
以上来自于百度翻译 以下为原文 It is not fun to just give the answer, don't you agree? ;) |
|
|
|
|
|
MCC以为你做什么?给你一个工作项目。替换AL示例代码和附注。让微芯片在Aurdio用户市场中得到提升。是吗?不是真的,但比和睦好。尽量依赖XC8来清理乱七八糟的东西。它可以做OK代码。假设它在自由模式下做一些清理。但是因为它没有被评论,清理混乱的速度比确定它是否有效更快。我给出答案了吗?我假设他们使用一些编译器技巧只调用用户定义的函数,但如果没有,则不给出错误。
以上来自于百度翻译 以下为原文 What is MCC supposed you do? Give you a working project. Replace al the sample code and appnotes. Give Microchip a boost in the Aurduino user market place. Does it? Not really, but better than Harmony. As far as depending on XC8 to clean up messes. It makes ok code. Assuming that it does some clean up in free mode. But since it is not commented it is quicker to just clean up the mess than to figure out if it works. Did I give the answer? I assumed they are using some compiler trick to only call if the user defined the function, but not give an error if they did not. |
|
|
|
|
|
NKurzman,我想你对零测试是正确的。
以上来自于百度翻译 以下为原文 NKurzman, I think you are correct about the NULL test. |
|
|
|
|
|
我确信,我所报告的特殊缺陷是MCC团队的最佳安排和工作程序的代表。程序员并不牢记,他们必须知道他们在“原始引用”的水平上服务的硬件。测试阶段较弱。一个有经验的嵌入式工程师在团队中是不存在的,也不是狗的。这是“免费”工具的标志,但是有一个合乎逻辑的步骤——迁移到开放的存储库,以允许简单的社区补丁。但这不是我喜欢的解决方案。我想相信这些东西。
以上来自于百度翻译 以下为原文 I am sure that the particular defect that I reported is a representative of not best arrangement of MCC team and it's work procedures. Programmers do not hold in mind that they have to know the hardware they serve at the level of "original reference". The testing stage is weak. An experienced embedded engineer is absent in team or is not dogfooding. These are the signs of "free" tool, but then there is a logical step - to migrate to open repository to allow easy community patches. That is not a solution I like though. I'd like to trust the stuff. |
|
|
|
|
|
HI是一个在8位PIC上玩大型计算机的尝试。它试图在运行时配置一个回调函数,通过调用一个函数来在应用程序代码中引入一个函数的指针,而不必改变生成代码中的任何东西。在比你在这里看到的更复杂的方法中,它也是一种燃烧更多处理器周期而不必再做更多工作的方法。如果你在运行时引入一个指针函数调用,我不确定XC8是否能够清理这个问题。我宁愿用一个“内联”说明符来写一个函数,ND直接从中断处理程序调用,并且据我所知,XC8也不在自由模式下执行内联。或者只写我想要的代码。在我编辑过的MCC再生代码时激活的合并工具已经变得更好。NK是MCC V3.16和PIC16库V1.25。Mysil,
以上来自于百度翻译 以下为原文 Hi, The construct is an attempt on playing Big Computer on a 8 bit PIC. It is an attempt to make a callback that may be configured in Runtime, by calling a function to introduce a pointer to a function in application code, without having to change anything in generated code. Harmony do similar things, in even more convoluted ways than what you see here. It is also a way to burn more processor cycles without getting any more work done. I am not sure if XC8 is able to tidy up this if you introduce a function call by pointer in runtime. I rather prefer to write a function with a 'inline' specifier, and call directly from interrupt handler, and as far as I understand, XC8 doesn't perform inlining in free mode either. Or just write the code I want where I want it to be. The merge facility that is activated when MCC regenerate code that I have edited, have become better with the current version. I think it is MCC v3.16 and PIC16 library v1.25. Regards, Mysil |
|
|
|
|
|
如果你确信它不是空的,你可以清理它,只是防止崩溃。
以上来自于百度翻译 以下为原文 You can clean it up if you sure it is not NULL. Just prevents crashing. |
|
|
|
|
|
问题是它是一个代码生成器“编写”代码。它必须根据检查的项目、CPU和其他因素来选择正确的代码和所有适当的依赖关系。它需要从PIC16工作到32毫米。考虑到这项任务,产量并不可怕。但是它对于许多用途来说是不合格的,而且会损害有经验的程序员的眼睛。程序员认为PIC16中断中的回传是成本损失。我没有花时间去查看编译器是否清理它。MCC Team看起来很有反应性,并且在论坛上做了bug报告。
以上来自于百度翻译 以下为原文 The Issue is it is a code generator "writing" the code. It must choose the correct code and all the proper dependencies based on the checked items, the CPU, and other factors. it needs to work from a PIC16 to a 32MM. Considering the Task, the output is not horrible. But it is substandard for many uses, and hurts the eyes of experienced programmers. Look at the I2C Master code. The Programmer thinks call backs in a PIC16 Interrupt are lost cost. I did not take the time to see if the Compiler cleans it up. The MCC Team does seem responsive and does take bug reports on the Forum. On the Plus side Computer Code Generators are still not taking your Job, Yet! |
|
|
|
|
|
你对MCC目的的回答——“给你一个工作项目”。我从你的第一次回复中看到它,虽然它太“普通”了,但我很好。更具体地说,你提到了ARDUNO用户,这改变了事情。你认为ARDUINO用户“只是工作”就足够了。我希望对于专业用途来说,代码的效率不低于编码效率。然后作为专业人员,我可以发现并修复MCC生成代码中的bug,这使得我的项目“不工作”,但“ARDUINO用户”将不满意。看到错配了吗?我关于MCC目的的问题是免费的被认为是修辞。尽管从开发者或他们的经理那里得到答案,他们如何想象目标观众还是不错的。
以上来自于百度翻译 以下为原文 Your answer about MCC purpose - "Give you a working project". I saw it from you first reply and I'm OK with it though it is too "in common". More specifically you mentioned Arduino users, that changes things. You suppose that for Arduino users "just work" is enough. I expect that for professional usage an efficiency of code is important not less than efficiency of coding. Then as a professional I can found and repair a bug in MCC generated code that made my project "just nonworking", but "Arduino user" will be not happy with it. See the mismatch? My question about MCC purpose is free to be considered as rhetoric. Although to take the answer from developers or theirs managers how they imagine target audience will be nice. |
|
|
|
|
|
输出只是不工作。我不是说风格和效率。它使程序运行不正确。仅仅因为它不适合真实的硬件,如果不阅读适当的部分数据表,你怎么能说代码是正确的?MCC的东西可以。另一个悲伤的故事。值得一提。我同意并非常感激。真正地。这就是我在这里的原因。
以上来自于百度翻译 以下为原文 The output is just non-working. I'm not saying about style or efficiency. It makes the program that operates incorrectly. Just because it is not adequate to real hardware. Without reading appropriate section of part's datasheet how can you say that the code is correct?! The MCC stuff can. Another sad story. Worth a separate thread. I agree and greatly appreciate that. Really. That is why I am here. |
|
|
|
|
|
我的陈述是我对这个问题的看法。Microchip希望或希望在MCC项目上实现的是我所不知道的。最后,您有一个可以清理的CODD项目。或者您可以制作样例项目来查看新的外设是如何编码的,然后将代码复制到您的项目中。
以上来自于百度翻译 以下为原文 My Statement, is My Opinion on the Subject. What Microchip hoped, or hopes to achieve on the MCC project is unknown to me. In the end you have a codded project that you can clean up. Or you can make sample projects to see how a new peripheral is coded, then copy the code to your Project. So it has it uses. |
|
|
|
|
|
很明显。但是当我们谈论MCC时,“清理”不是一个恰当的词。然而。
以上来自于百度翻译 以下为原文 Obviously. But "clean up" is not the right word when we talk about MCC. Yet. |
|
|
|
|
|
这是一个很好的解决方案。在当前的例子中,没有一个很大的开销。对于更复杂的任务,MCC生成的代码非常优雅,甚至可以工作,但在分析开始看起来毫无用处。
以上来自于百度翻译 以下为原文 It is a nice intention to make a flexible solution. In current example there is not a big overhead. For more complicated tasks MCC generates really elegant code that even works but after profiling starts looking as worthless. |
|
|
|
|
|
正如我看到的EnguleMeCC团队成员没有阅读我的职位之前的数据表,不会调查(松时间)后的问题,所以这是简短的答案,没有乐趣,但希望…IOCAF0是一个关于中断源的标志信号,对于正、负EDGEs都是通用的。IOCAP0 ANDICANBITI.IOCAN0不是标志-它们使适当的源-正和负边。讽刺的是,IOCAP0 ORICON0 0位是在PixMauner-SudialIZEIZE()中设置的。但是,IIOCAP00SET中断和(MCC)ANDICANAN0SESECTIONTHANDLE()在IOCAF00SET中断和()之后揭示了一个完全的误解。我是第一个使用IOC而给了MCC一个尝试的人吗?(似乎我有点喜欢修辞问题;)
以上来自于百度翻译 以下为原文 As I see the responsible MCC team member did not read the datasheet before my post and will not investigate (loose his time) the problem after, so that is the short answer without fun, but with hope on ... you know ;) IOCAFbits.IOCAF0 is a flag signalling about interrupt source, common for both positive and negative edges. IOCAPbits.IOCAP0 and IOCANbits.IOCAN0 are not flags - they enable appropriate sources - positive and negative edges. Ironically, IOCAP0 or IOCAN0 bits are set in PIN_MANAGER_Initialize() correctly. But then IOCAP0_SetInterruptHandler() and IOCAN0_SetInterruptHandler() right after IOCAF0_SetInterruptHandler() reveal a complete misunderstanding. Am I the first who used IOC while giving MCC a try? (It seems that I kind of like rhetorical questions;) |
|
|
|
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1123浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1095浏览 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-2 01:44 , Processed in 0.946855 second(s), Total 76, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1461