STM32CubeL4 icon indicating copy to clipboard operation
STM32CubeL4 copied to clipboard

B-L475E-IOT01A NFC Application

Open VVinter-melon opened this issue 4 years ago • 4 comments

Setup:

  • Board: B-L475E-IOT01A
  • STM32CubeIDE

Issue: I am trying to configure the NFC module and ultimately trying to run the WriteTag demo. I have imported the .h and .c libraries files from ../Common but faced several errors when building the project:

  1. In nfc_tt4_wrapper_template.h, line 31 #include "component.h", component.h file does not exist anywhere, having also searched the STM32CubeL4 repo
  2. nfc_tt4_wrapper_template.c creates a repeated definition of functions such as uint16_t NFC_TT4_Initialization ( uint8_t* CCBuffer, uint8_t size ). These functions have been defined in m24sr_wrapper.c

I would greatly appreciate any assistance with this matter. Thank you.

VVinter-melon avatar Oct 31 '21 19:10 VVinter-melon

+1 I found the same issue with audio and other drivers related to this board: https://github.com/STMicroelectronics/STM32CubeL4/issues/58

CIPop avatar Dec 16 '21 23:12 CIPop

Hi @VVinter-melon and @CIPop,

Thank you for this report. We will get back to you with a feedback as soon as possible. Please excuse the delay it may take us sometimes to reply. Thank you for your comprehension.

With regards,

ALABSTM avatar Jan 30 '22 08:01 ALABSTM

Hi @VVinter-melon,

Thank you for your report. An internal tracker has been logged and a fix will be implemented and made available in the frame of a future release.

Thank you again for you report.

With regards,

RKOUSTM avatar Feb 25 '22 11:02 RKOUSTM

ST Internal Reference: 123566

RKOUSTM avatar Feb 28 '22 10:02 RKOUSTM

Hi @VVinter-melon and @CIPop,

I hope you are doing well. Back to this question you asked. Actually, as templates, both nfc_tt4_wrapper_template.h and nfc_tt4_wrapper_template.c files are meant to be customized and renamed according to the application they are to be used into. Both m24sr_wrapper.h and m24sr_wrapper.c are examples of such a customization and renaming.

Mainly, the below line in nfc_tt4_wrapper_template.h that you mentioned above is not meant to be left "as-is"... https://github.com/STMicroelectronics/STM32CubeL4/blob/f327fd77ebcf3ce295dcd47ba10450169a93856a/Projects/B-L475E-IOT01A/Applications/NFC/Common/NDEF_TagType4_lib/nfc_tt4_wrapper_template.h#L30

... and has been replaced by an actual file inclusion in m24sr_wrapper.h as you can see. https://github.com/STMicroelectronics/STM32CubeL4/blob/f327fd77ebcf3ce295dcd47ba10450169a93856a/Projects/B-L475E-IOT01A/Applications/NFC/Common/M24SR/m24sr_wrapper.h#L32

This also explains why a function like NFC_TT4_Initialization() is defined both in nfc_tt4_wrapper_template.c and m24sr_wrapper.c. This is not repetition, rather redefinition.

The almost "empty" function body in nfc_tt4_wrapper_template.c... https://github.com/STMicroelectronics/STM32CubeL4/blob/f327fd77ebcf3ce295dcd47ba10450169a93856a/Projects/B-L475E-IOT01A/Applications/NFC/Common/NDEF_TagType4_lib/nfc_tt4_wrapper_template.c#L97-L100

... has been replaced by an actual implementation in m24sr_wrapper.c. https://github.com/STMicroelectronics/STM32CubeL4/blob/f327fd77ebcf3ce295dcd47ba10450169a93856a/Projects/B-L475E-IOT01A/Applications/NFC/Common/M24SR/m24sr_wrapper.c#L85-L140

I hope this answers your question. Please allow me to close this issue.

Thank you,

ALABSTM avatar Nov 29 '23 13:11 ALABSTM

I hope this answers your question. Please allow me to close this issue.

Thanks @ALABSTM for the detailed explanation!

Would it be possible to at least add some comments in your template code explaining the same things as above?

E.g. this is the file Doxygen comment right now:

  * @file    nfc_tt4_wrapper_template.h
  * @author  MCD Application Team
  * @brief   This file makes the bridge between middleware generic NCF TagType4 
  *          function calls and the component.

While the filename "template" is a good indication, there isn't sufficient documentation here for someone to infer your explanation above. Same goes for the m24sr_wrapper.c which could say that it is an implementation of the nfc_tt4_wrapper_template.c file.

CIPop avatar Nov 29 '23 20:11 CIPop

Hi @CIPop,

I understand your request. I'll see what can bee done.

With regards,

ALABSTM avatar Dec 12 '23 13:12 ALABSTM