完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我使用_blockcksum160然后我们将代码大小增加到32K到64K
取决于代码大小的增加; 我们将内存模型+ modsl0更改为modsl。 我们将库列表libislo.sm8; libmo.sm8更改为libisl.sm8; libm.sm8 我们将启动文件crtsi0.sm8更改为crtsi.sm8。 当我们运行软件时,在运行时检查期间。 fails°失败。 _block_checksum160()返回CRC_ERROR。 然后我们开始使用_block_checksum161()但是,它返回错误; #error clnk Debug canli.lkf:1个符号_MSB_RunCrc16Chk未定义(Debug _block_cksum161.o) #error clnk Debug canli.lkf:1个符号_MSB_RunCrc16ChkInv未定义(Debug _block_cksum161.o) 据我所知,由ST家伙发送的stm8l_stl_classB_var.h应该更新。 哪里可以得到 stm8l_stl_classB_var.h文件,适合64K stm8l_stl_classB_var.h: #ifdef _COSMIC_ #pragma section @near [RUN_TIME_BUF] / *在运行时测试期间存储原始RAM内容的缓冲区* / EXTER NEAR u8 RunTimeRamBuf [RT_RAM_BUF_SIZE]; / *运行时测试的RAM指针* / 接近u8 * p_RunTimeRamChk; 接近u8 * p_RunTimeRamChkInv; #ifdef STL_VERBOSE EXTER NEAR s16 FreqDifDisplay; / *不是真正的B类变量,但对于调试很有用* / #endif / * STL_VERBOSE * / #pragma section @near [CLASS_B] 接近u16 MarchOverlayGap; / *因三月测试叠加导致内存空白* / EXTER NEAR u16 CtrlFlowCnt; / *启动时的程序流程执行* / 接近u8 LSI_HSIStartUpFreqkHz; / *首先测量存储在HSI上的LSI * / 接近u8 LSI_HSEStartUpFreqkHz; / *首先测量存储HSE的LSI * / 接近u16 LSI_StartUpPeriod; / * LSI的初始测量 - 运行时检查的参考* / EXTERN NEAR u16 LastCtrlFlowCnt; / *控制流量计数器从一个主循环到另一个主循环* / EXTER NEAR const u8 * p_RunCrc16Chk; / *用于crc16运行时测试的FLASH指针* / EXTER NEAR u16 CurrentCrc16; / *当前FLASH 16位Crc * / 接近u16 CurrentDesc; / *当前描述符地址* / EXTER NEAR u8 CRCBlockIndex; / *部分CRC测试所需的计数器* / 接近u16 MarchOverlayGap_; / *因三月测试叠加导致内存空白* / #pragma section @near [STACK_BOTTOM] / *此数组中堆栈溢出的魔术模式* / EXTER NEAR volatile u8 StackOverFlowPtrn [4]; #pragma section @near [CLASS_B_REV] 接近u16 MarchOverlayGapInv; EXTER NEAR u16 CtrlFlowCntInv; 接近u8 LSI_HSIStartUpFreqkHzInv; 接近u8 LSI_HSEStartUpFreqkHzInv; 接近u16 LSI_StartUpPeriodInv; 接近u16 TickCounterInv; EXTER NEAR u16 LastCtrlFlowCntInv; EXTER NEAR const u8 * p_RunCrc16ChkInv; EXTER NEAR u16 CurrentCrc16Inv; EXTER NEAR u16 CurrentDescInv; EXTER NEAR u8 CRCBlockIndexInv; 接近u16 MarchOverlayGapInv _;#endif / * _COSMIC_ * / 以上来自于谷歌翻译 以下为原文 i used _blockcksum160 then we increase code size 32K to 64K depends on code size increased; we changed memory model +modsl0 to modsl. We changed library list libislo.sm8;libmo.sm8 to libisl.sm8;libm.sm8 We changed startup file crtsi0.sm8 to crtsi.sm8. When we run software, during runtime check. Ä°t fails. _block_checksum160() return CRC_ERROR. Then we start to use _block_checksum161() however, it return error; #error clnk Debugcanli.lkf:1 symbol _MSB_RunCrc16Chk not defined (Debug_block_cksum161.o ) #error clnk Debugcanli.lkf:1 symbol _MSB_RunCrc16ChkInv not defined (Debug_block_cksum161.o ) As i understand that stm8l_stl_classB_var.h ,which sent by ST guys, should update. Where can be get stm8l_stl_classB_var.h file which suit for 64K stm8l_stl_classB_var.h : #ifdef _COSMIC_ #pragma section @near [RUN_TIME_BUF] /* Buffer to store original RAM content during run-time tests */ EXTERN NEAR u8 RunTimeRamBuf[RT_RAM_BUF_SIZE];/* RAM pointers for run-time tests */ EXTERN NEAR u8 *p_RunTimeRamChk; EXTERN NEAR u8 *p_RunTimeRamChkInv;#ifdef STL_VERBOSE EXTERN NEAR s16 FreqDifDisplay; /* Not really a Class B variable, but useful for debugging */ #endif /* STL_VERBOSE */ #pragma section @near [CLASS_B] EXTERN NEAR u16 MarchOverlayGap; /* gap in memory due to March test overlay */ EXTERN NEAR u16 CtrlFlowCnt; /* program flow execution at start */ EXTERN NEAR u8 LSI_HSIStartUpFreqkHz; /* First measure LSI over HSI stored */ EXTERN NEAR u8 LSI_HSEStartUpFreqkHz; /* First measure LSI over HSE stored */ EXTERN NEAR u16 LSI_StartUpPeriod; /* Initial measure of LSI - reference for run-time checks */EXTERN NEAR u16 LastCtrlFlowCnt; /* Control flow counter from one main loop to the other */ EXTERN NEAR const u8 *p_RunCrc16Chk; /* Pointer to FLASH for crc16 run-time tests */ EXTERN NEAR u16 CurrentCrc16; /* Current FLASH 16-bit Crc */ EXTERN NEAR u16 CurrentDesc; /* Current Descriptor Address */ EXTERN NEAR u8 CRCBlockIndex; /* Counter needed for partial CRC test */ EXTERN NEAR u16 MarchOverlayGap_; /* gap in memory due to March test overlay */ #pragma section @near [STACK_BOTTOM] /* Magic pattern for Stack overflow in this array */ EXTERN NEAR volatile u8 StackOverFlowPtrn[4];#pragma section @near [CLASS_B_REV] EXTERN NEAR u16 MarchOverlayGapInv; EXTERN NEAR u16 CtrlFlowCntInv; EXTERN NEAR u8 LSI_HSIStartUpFreqkHzInv; EXTERN NEAR u8 LSI_HSEStartUpFreqkHzInv; EXTERN NEAR u16 LSI_StartUpPeriodInv; EXTERN NEAR u16 TickCounterInv; EXTERN NEAR u16 LastCtrlFlowCntInv; EXTERN NEAR const u8 *p_RunCrc16ChkInv; EXTERN NEAR u16 CurrentCrc16Inv; EXTERN NEAR u16 CurrentDescInv; EXTERN NEAR u8 CRCBlockIndexInv; EXTERN NEAR u16 MarchOverlayGapInv_;#endif /* _COSMIC_ */ |
|
相关推荐
5个回答
|
|
我在下面添加部分;
在[CLASS_B]部分: EXTER NEAR u16 MSB_RunCrc16Chk; / * FLASH地址的当前MSB * / 那里有[CLASS_B_REV]部分: EXTER NEAR u16 MSB_RunCrc16ChkInv; / * FLASH地址的当前MSB * / 编译器没问题, 当我们运行软件时,在运行时检查期间。 fails°失败。 _block_checksum161()返回CRC_ERROR。 我怎样才能得到 _block_checksum16 X ()用于内存模型 modsl(64K闪存)? 以上来自于谷歌翻译 以下为原文 i add below parts; at [CLASS_B] section: EXTERN NEAR u16 MSB_RunCrc16Chk; /* Current MSB of the address at FLASH */ and [CLASS_B_REV] section there: EXTERN NEAR u16 MSB_RunCrc16ChkInv; /* Current MSB of the address at FLASH */ Compiler is ok however, When we run software, during runtime check. Ä°t fails. _block_checksum161() return CRC_ERROR. How can i get _block_checksum16 x () for memory model modsl (64K flash memory)? |
|
|
|
你好,
从Cosmic的角度来看,在移动到'far'(> 0xFFFF,即stm8的32k代码)内存模型后,你需要让校验和再次工作的是使用校验和验证程序的远程版本,这是在链接libi而不是libi0时自动完成的。 但是,对于您的情况,您似乎使用了我们未提供的一些校验和验证例程(_ block_checksum161() ),所以明显的答案是检查那些例程的提供者(我猜这是ST),因为我也看到你使用的一些头文件强制一些变量@near,所以我不确定是否有@你改变内存模型的同一个文件的远端版本,或者这些变量应该保留@near,即使代码的其他部分都是@ far ..如果你没有轻易摆脱它,你可以发送你的整个向我们投射,我们将看一看。 问候, 卢卡 以上来自于谷歌翻译 以下为原文 Hello, from the Cosmic point of view, all you need to make the checksum work again after moving to a 'far' (>0xFFFF, that is 32k of code for the stm8) memory model is to use the far version of the checksum verification routine, and that is done automatically when you link libi instead of libi0. For your case however, you seem to use some checksum verification routines that are not provided by us (_ block_checksum161() ), so the obvious answer would be to check with the provider of those routines (I guess that's ST) because I also see that some header files that you use force some variables @near, so I'm not sure if there is a @far version of the same file for when you change the memory model or if these variables are supposed to stay @near even when other parts of the code go @far..If you don't get out of it easily you can send your whole project to us and we'll take a look at it. Regards, Luca |
|
|
|
我做了另一项工作
。取决于这些工作。你能结果吗? 我们有一个segmet(代码和常量),它位于0x8080到0x17fff。 _block_checksum161()返回CRC_ERROR。 现在我们有2个细分市场。常量和代码的第一个段,其中定位0x8080到0xffff,秒段用于.text,其中定位0x10000到0x17ffff。 block_checksum161()返回OK 不幸的是我们不能将第一段用于.text。不使用.text,它位于0x8080到0xffff。 ?f。secons的文本溢出,它不使用.text的第一段。 ?t出现溢出错误。 以上来自于谷歌翻译 以下为原文 i have done another work . Depends on these work. May you result anything? We had one segmet(Code and constant) which locate 0x8080 to 0x17fff. _block_checksum161() return CRC_ERROR. Now we have 2 segment. First segment for constant and code where locate 0x8080 to 0xffff, seconds segment is for .text where locate 0x10000 to 0x17ffff. block_checksum161() return OK Unfortunately we can not use first segment for .text. .text which locate 0x8080 to 0xffff is not used. ?f .text of secons is overflow, it do not use .text of first segment. ?t gives overflow error. |
|
|
|
你能分享你的电子邮件地址吗?我会寄给你我的项目。
以上来自于谷歌翻译 以下为原文 Can you share your e-mail adress? i will send you my project. |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2655 浏览 1 评论
3216 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1790 浏览 1 评论
3619 浏览 6 评论
5997 浏览 21 评论
946浏览 4评论
1319浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
591浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1309浏览 3评论
1369浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-30 07:17 , Processed in 1.416678 second(s), Total 87, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号