-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Closed
Copy link
Labels
Arch: allIssues that apply to all architecturesIssues that apply to all architecturesArea: DriversDrivers issuesDrivers issuesOS: LinuxIssues related to Linux (building system, etc)Issues related to Linux (building system, etc)Type: BugSomething isn't workingSomething isn't working
Description
Description / Steps to reproduce the issue
In the spi_transfer.h header file,
nuttx/include/nuttx/spi/spi_transfer.h
Line 163 in c380429
| int spi_register(FAR struct spi_dev_s *spi, int bus); |
#ifdef CONFIG_SPI_DRIVER
int spi_register(FAR struct spi_dev_s *spi, int bus);
#endif
Therefore, when one tries to use spi_register() from within C++ source code file, linker does not find this function because it seeks for its mangled name, which is not present in the collection of nuttx object file which is provided to linker during link process. To reproduce, one can just create any C++ source file, add it to the CXXSRCS variable in Make file, and attempt to invoke spi_register() from it. It should be wrapped inside extern "C" directives
On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
Linux Debian
NuttX Version
master, 12.12, and previous versions
Issue Architecture
[Arch: all]
Issue Area
[Area: Drivers]
Host information
No response
Verification
- I have verified before submitting the report.
Metadata
Metadata
Assignees
Labels
Arch: allIssues that apply to all architecturesIssues that apply to all architecturesArea: DriversDrivers issuesDrivers issuesOS: LinuxIssues related to Linux (building system, etc)Issues related to Linux (building system, etc)Type: BugSomething isn't workingSomething isn't working