This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-MSPM0G3519: eraseLoadFlashSize and eraseLoadFlashStart definition is missed as part of Fls Module for Clang Compiler

Part Number: LP-MSPM0G3519


Tool/software:

Hello team,

we are using MCAL : MCAL_MSPM0_00.02.04.00 package

SDK : mspm0_sdk_2_04_00_06 version

In Fls Module, the definition of eraseLoadFlashSize and eraseLoadFlashStart is missed and we are getting compilation error

#if defined CLANG
extern uint32 eraseLoadFlashSize;
extern uint32 eraseLoadFlashStart;
#else
uint32 eraseLoadFlashSize = (uint32) ((uint32*)__section_size(".eraseLoadSram"));
const uint32* eraseLoadFlashStart = ((const uint32*)__section_begin(".eraseLoadSram"));
#endif

Can you Please Provide Your feedback

Thanking you.

Regards,

Pradeep R

  • Hi Pradeep,

    Is this an standard type of the AUTOSAR 4.3.1?

    Maybe we used different type name inside FLS staic code, the example of the FLS is verified worked.

    B.R.

    Sal

  • Hello Sal,

    Can you please let us know how is this handled in the FLS example

    because we did not get the exact definition

    Regards,

    Pradeep R

  • Hi Pradeep,

    I haven't the test environment in my side, I see several customer used FLS example and works well.

    I will ask the expert in my team to help comment how it works. 

    By the way, is below variable the standard type of AutoSar? If is, I will also forwarded to MCAL team to be aware of.

    #if defined CLANG
    extern uint32 eraseLoadFlashSize;
    extern uint32 eraseLoadFlashStart;
    #else
    uint32 eraseLoadFlashSize = (uint32) ((uint32*)__section_size(".eraseLoadSram"));
    const uint32* eraseLoadFlashStart = ((const uint32*)__section_begin(".eraseLoadSram"));
    #endif

    B.R.

    Sal

  • Hello Sal,

    we are defining the macro CLANG, so only 

    extern uint32 eraseLoadFlashSize;
    extern uint32 eraseLoadFlashStart;

    will be declared

    Even we tested your Fls example we noticed that in linker file, the following line is added

    .eraseLoadSram  : palign(8) LOAD > FLASH SIZE(eraseLoadFlashSize) START(eraseLoadFlashStart)

    May i know if it is handled during linking

    Regards,

    Pradeep R

  • Hi Pradeep,

    I tested with the FLS example for MCAL 2.04.0 version, and the example could be well compiled with TICLANG compiler.

    Please check the guidance of FLS driver user guide in <MCAL_INSTALL_PATH>/mcal_docs/output/imports/user_guide/MSPM0G351x/modules/fls_user_guide.html.

    The ".eraseLoadSram  : palign(8) LOAD > FLASH SIZE(eraseLoadFlashSize) START(eraseLoadFlashStart)" need to be added in .cmd file to make the flash execution code run in SRAM.

    Regards,

    Penfei