AnsweredAssumed Answered

STM8 _block_cksum161

Question asked by karazor.irfan on Apr 12, 2017
Latest reply on Apr 13, 2017 by Clive One

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 Debug\canli.lkf:1 symbol _MSB_RunCrc16Chk not defined (Debug\_block_cksum161.o )
#error clnk Debug\canli.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 */

/* RAM pointers for run-time tests */
EXTERN NEAR u8 *p_RunTimeRamChk;
EXTERN NEAR u8 *p_RunTimeRamChkInv;

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 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_ */