完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
1。如果(EEDATA=0x3FFF)EEDATA被定义为未签名的CHAR2.McCGROUGATED文件/存储器。C:62:警告:(752)转换为更短的数据Type Untu16 16Ft FLASH RADEDWord(Uti1616T闪存ADDR){UIT88T GiBITValue= InCONBITIs.GIE;//保存中断启用ItCONBITS。GEE=0;/ /禁用中断EEADRL=(FL)。AsAdDR & 0x000 FF);EEADRH=((Flash ADDR和0xFF00)& gt;8);它想要一个CAST编辑:这看起来像是编译器发行版3。跳转到应用程序需要设置StAcKoTobe和页面SEL吗?他们在同一页
以上来自于百度翻译 以下为原文 1. if (EEDATA == 0x3FFF) EEDATA is defined as unsigned char 2. mcc_generated_files/memory.c:62: warning: (752) conversion to shorter data type uint16_t FLASH_ReadWord(uint16_t flashAddr) { uint8_t GIEBitValue = INTCONbits.GIE; // Save interrupt enable INTCONbits.GIE = 0; // Disable interrupts EEADRL = (flashAddr & 0x00FF); EEADRH = ((flashAddr & 0xFF00) >> 8); It wants a cast EDIT:This looks like it is a compiler issue 3. Does the Jump to the Application require the StackPointer be set and a page sel? They are in the same page |
|
相关推荐
5个回答
|
|
4我知道它需要内存。h,但不是内存。C?我已经偏离了你的基数,不能再回去了。(3)我猜想在启动时寻找一个消息的串行引导加载程序是正确的。其他人可以检查EEPROM的标志。或者在我的例子中,CS的启动是低的。另外两个问题。NoP仍然需要在所有显示的地方,或者只是一些图片?我的数据表没有显示。和/或必须切换到汇编编译器不理解不需要银行交换机/ASM(“MOVF”STR({ EEKEYE1)”,“W”);//ASM(“MOVWF”STR(银行屏蔽(ECON2)));//ASM(“MOVF”STR(αEEKEYE2)”,“W”);//ASM(“MOVWF”STR(银行屏蔽(ECOE2)));//ASM(BSF)STR(BAF掩码)(ECON1)(“1”);//开始写入不是固定在当前编译器中吗?老虫子?我有一个适应靴子的梦想。
以上来自于百度翻译 以下为原文 #4 I see it needs memory.h, but not memory.c? I have deviated from your base and can't go back anymore. #3 I guess that is true for Serial Bootloaders that look for a message at boot. Others may check the EEPROM for a Flag. Or in My case look for the CS to be Low on Bootup. Two Additional questions. Are the NOPs still needed in all the place shown, or just some PICs? My Data sheet does not show them. And // had to switch to assembly - compiler doesn't comprehend no need for bank switch // asm ("movf " str(_EE_Key_1) ",w"); // asm ("movwf " str(BANKMASK(EECON2))); // asm ("movf " str(_EE_Key_2) ",w"); // asm ("movwf " str(BANKMASK(EECON2))); // asm ("bsf " str(BANKMASK(EECON1)) ",1"); // Start the write Isn't this fixed in the current compiler? Old Bug? I have dreams of fitting in to the Boot Block |
|
|
|
“4,我知道它需要内存。h,但不是内存。C?”正确。“NOPS仍然需要……”?年龄较大的PIC16需要它们,而新的PIC16则不需要。如果DS显示调用它们,则可以安全地移除它们。MCC还不知道区别。“/ /必须切换到汇编编译器不理解银行交换机的需要”……“这不是固定在当前编译器中吗?”老虫子?”这仍然是XC8 V1.40中的一个问题。我看到1.41是出,但我还没有安装它:EEYKEYG1(&;EEKEYGE2)小心地定位在未绑定RAM中,以避免额外的MOVLBS。因此,大会:“我有梦想融入靴子”你有多近?C将是一个紧密配合到0x200。我认为削减NOPS将节省10-12个字。因为您可以控制Bootloader的两面,所以可以从GETVEST命令中删除一堆东西。-D
以上来自于百度翻译 以下为原文 "#4 I see it needs memory.h, but not memory.c?" Correct. "Are the NOPs still needed..." ? Older PIC16's need them, newer ones do not. If the DS shows call for them, you can safely remove them. MCC doesn't (yet) know the difference. "// had to switch to assembly - compiler doesn't comprehend no need for bank switch" ... "Isn't this fixed in the current compiler? Old Bug?" It's still a problem in xc8 v1.40. I see 1.41 is out but I haven't installed it yet: EE_Key_1 (& EE_Key_2) are carefully located in unbanked RAM specifically to avoid the extra MOVLBs. Hence the Assembly. ! EECON2 = EE_Key_1; 0x2E2: MOVLB 0x0 0x2E3: MOVF EE_Key_1, W 0x2E4: MOVLB 0x11 <== This breaks the unlock sequence 0x2E5: MOVWF NVMCON2 ! EECON2 = EE_Key_2; 0x2E6: MOVLB 0x0 <== This breaks the unlock sequence 0x2E7: MOVF EE_Key_2, W 0x2E8: MOVLB 0x11 <== This breaks the unlock sequence 0x2E9: MOVWF NVMCON2 ! EECON1bits.WR = 1; // Start the write 0x2EA: BSF TMR0L, 0x1 "I have dreams of fitting in to the Boot Block" How close are you? C is going to be a tight fit into the 0x200. I think cutting the NOPs will save 10-12 words. Since you have control of both sides of the bootloader, you can cut a bunch of stuff out of the GetVersion command. -D |
|
|
|
引导加载程序可以包括代码来检查所有擦除和写入命令来保护引导加载程序,特别是因为它很难适应。如果将其安装到引导块中,则不需要代码,也可以删除代码。例如:在EraseSflash函数中有一个类似的测试。BTW.…238 W是一个很长的方式从拟合。原始的独立引导加载程序生成器生成汇编代码。Irc很容易安装在BooBoBok(~0x180W)内。它与MCC中C版本的工作方式相同。它仍然可以在www. McCudio.com / Bootloader上使用。$0.2-D
以上来自于百度翻译 以下为原文 The bootloader can include code to address check all erase and write commands to protect the bootloader, specifically because it's hard to fit. If you get it to fit within the boot block the code is not needed and can be removed. For example: uint8_t Write_Flash() { EEADRL = frame.address_L; EEADRH = frame.address_H; EECON1 = 0xA4; // Setup writes if ((EEADR & 0x7FFF) < NEW_RESET_VECTOR) < Can remove if within bootblock { < frame.data[0] = ERROR_ADDRESS_OUT_OF_RANGE; < return (10); < } < ... There is a similar test in the Erase_Flash function. BTW... 238 W is a long way from fitting. The original standalone bootloader generator generated assembly code. IIRC that easily fit within the bootlbock (~0x180W). It works the same way as the C version in MCC. It is still available at www.microchip.com/bootloader. $.02 -D |
|
|
|
是的,我会看到在它工作之后我能剥离什么。(下降到235瓦)我不认为PRO能拯救我,在这里。AN1302是C和适合。我不确定我想去ASM(也许混合)。我会看其他PIC16F1S,因为我必须旋转板。希望更新的靴子面积更大。
以上来自于百度翻译 以下为原文 Yes I will see what I can strip after it works. (down to 235 W) I do not think Pro can save me, here. AN1302 was in C and fit. I am not sure I want to go ASM (maybe mixed). I will look at other PIC16F1s since I have to spin the Board. Hopefully the newer ones have a bigger boot area. |
|
|
|
请看PIC16F15XXX或PIC16F18XXX系列。其中一些有较大的地址空间(16和32千瓦)。PIC16F1576是一个16KW的设备,它有更多的选择用于BooBug大小:0x200,0x400,0x800,0x1000,0x2000(最多一半的设备大小)。
以上来自于百度翻译 以下为原文 Take a look at the PIC16F15xxx or PIC16F18xxx families. Some of them have bigger address spaces (16 & 32KW). PIC16F15376 is a 16KW device with more choices for bootblock size: 0x200, 0x400, 0x800, 0x1000, 0x2000 (up to half the size of the device). |
|
|
|
只有小组成员才能发言,加入小组>>
5178 浏览 9 评论
2003 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3177 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
738浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
636浏览 0评论
533浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-27 06:22 , Processed in 1.170577 second(s), Total 52, Slave 46 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号