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.

  • Resolved

TMS570LS0232: AUTOSAR_MCAL_TMS570LSx-05.30.00: SPI - Problems with configuration of callback header

Prodigy 150 points

Replies: 6

Views: 606

Part Number: TMS570LS0232

When does this issue occur:

First, the Notification is configured:

 

Then, the header file containing the correpsonding declaration is configured:

 

 

A) The content of the generated files Spi_PBcfg.c and Fls_30_Spi01_Cbk.h do not fit together which leads to the compiler error:

 Compiling file: GenData/src/Spi_PBCfg.c
"GenData/src/Spi_PBcfg.c", line 118: error: declaration is incompatible with "void Fls_30_Spi01_DrvSequenceCbk(void)"
(declared at line 37 of "../coremsr/bsw/fls_30_spi01/Fls_30_Spi01_Cbk.h")

 

B) Not configuring the Notification Header leads to the warning

Compiling file: GenData/src/Spi_PBCfg.c
"GenData/src/Spi_PBcfg.c", line 1234: warning: a value of type "int (*)()" cannot be used to initialize an entity of type "void (*)(void)"

 Two possible solutions for this issue:

1. Optionally configuring the notifications header Fls_30_Spi01_Cbk.h and manually adapting the generated declaration. This is not a good solution because, after regenerating the file, the adaption must be done again.

2. Configuring the header and deleting the unnecessary declaration from Spi_PBcfg.c

Would you please comment on that?

 

Please find the results of the two different configuration options A) and B) as well as the two solution options 1. and 2. in the attachment:

 MCAL_SPI_Config.zip

 

  • Guru 97375 points
    Hello Josef,

    I have forwarded your question to our MCAL developer. He will contact with you.

    Thanks and Regards,
    QJ Wang

    For more information: Hercules FAQ

  • Hi Josef,

    From what I see in your case B "Not configuring the Notification Header leads to the warning", the declaration in the header is int Fls_30_Spi01_DrvSequenceCbk (void);. If it's int func (void), please change it to void func (void) and build.

    It'd be more helpful for the e2e if you just paste the declaration of Fls_30_Spi01_DrvSequenceCbk () function as is from your Fls_30_Spi01_Cbk.h file.
  • Guru 97375 points

    In reply to chetan.ks@PP:

    We will check, then come back to you. Thanks

    Thanks and Regards,
    QJ Wang

    For more information: Hercules FAQ

  • In reply to QJ Wang:

    Hello Josef,

    We will go with option 2. We have done similar implementation for GPT.

    Regards,

    Vishwanath Reddy.

    If my reply answers your question, please click on Verify Answer.

  • In reply to Vishwanath Reddy:

    Hello,

    did I understand it well that this issue will be fixed in an upcoming MCAL version?
  • In reply to Josef Noebauer:

    Hello Josef,

    Your understand is correct. This issue will be fixed in upcoming release.

    Regards,

    Vishwanath Reddy.

    If my reply answers your question, please click on Verify Answer.

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.