2024-07-21 06:02 AM - edited 2024-07-21 06:03 AM
Hi,
I write my own 'void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi)', intend to override the default weak one. But when debug, my version is never called, it always steps into the 'weak' one. I'm new to CubeIDE, the version is 1.16.0, any suggestions?
Thanks.
Solved! Go to Solution.
2024-07-21 06:33 AM
Using .cpp ?
Double check spelling/capitalization
Perhaps use objdump to inspect generated object from your source file.
2024-07-21 06:33 AM
Using .cpp ?
Double check spelling/capitalization
Perhaps use objdump to inspect generated object from your source file.
2024-07-21 06:40 AM - edited 2024-07-21 07:27 AM
Hi,
My project is created as C++ project indeed. But my 'strong' version is defined in a ".c" file. Even I convert the project to 'C' project, my strong version won't be called. And I'm sure they have same signatures.
BTW: does CubeIDE support 'objdump'? I'm on Windows system, not Linux.
2024-07-21 10:07 AM
I'm running GNU/GCC on Windows and have objdump and objcopy, and on Keil I have fromelf
Y:\STM32\GNU>objdump
Usage: objdump <option(s)> <file(s)>
Display information from object <file(s)>.
At least one of the following switches must be given:
-a, --archive-headers Display archive header information
-f, --file-headers Display the contents of the overall file header
-p, --private-headers Display object format specific file header contents
-P, --private=OPT,OPT... Display object format specific contents
-h, --[section-]headers Display the contents of the section headers
-x, --all-headers Display the contents of all headers
-d, --disassemble Display assembler contents of executable sections
-D, --disassemble-all Display assembler contents of all sections
-S, --source Intermix source code with disassembly
-s, --full-contents Display the full contents of all sections requested
-g, --debugging Display debug information in object file
-e, --debugging-tags Display debug information using ctags style
-G, --stabs Display (in raw form) any STABS info in the file
-W[lLiaprmfFsoRt] or
--dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,
=frames-interp,=str,=loc,=Ranges,=pubtypes,
=gdb_index,=trace_info,=trace_abbrev,=trace_aranges,
=addr,=cu_index]
Display DWARF info in the file
-t, --syms Display the contents of the symbol table(s)
-T, --dynamic-syms Display the contents of the dynamic symbol table
-r, --reloc Display the relocation entries in the file
-R, --dynamic-reloc Display the dynamic relocation entries in the file
@<file> Read options from <file>
-v, --version Display this program's version number
-i, --info List object formats and architectures supported
-H, --help Display this information
Y:\STM32\GNU>objdump -v
GNU objdump (GNU Tools for ARM Embedded Processors) 2.24.0.20141128
Copyright 2013 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
Not sure what CubeIDE brings in, but I'm not limited by that
2024-07-21 10:17 AM
Temporarily rename the weak one to something else, see if it compiles and links. Could be a misspelling in your strong version, or the string version isn't being compiled.