I am using MCUXpresso to build an MK10 project. The startup file, startup_mk10d10.cpp, cannot find functions in other modules, for example interrupt service routines or utilities. The IDE gives , as an example, an undefined reference to `PIT1_DriverIRQHandler' error, although it is defined in an other file and a definition line is included. It links only main(). Clearly I have set something wrong! How should I define routines in other modules? Please note that all other files link properly.
Thank you,
Harry Koukoutos
Given that the file extension of your startup file is ".cpp", I suspect the issue is C vs C++ linkage. There is some information in the following FAQs (which although originally written for LPCXpresso IDE, still apply to MCUXpresso IDE):
Interrupt Handlers in C++ applications
https://community.nxp.com/message/630742
Regards,
MCUXpresso IDE Support
Hi Harry Koukoutos,
I highly recommend you to refer to the nxp official code, it will have the according startup file, and the according project.
Please download it from this link:
https://mcuxpresso.nxp.com/en/select
Select the processors as your K10D100M chip, then generate the MCUXpresso IDE project, and try it again.
If you still have question about it, please kindly let me know.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------