I am wondering if anyone could help me with my 'Undefined Reference' error using XC16 please?
I am including my dsPIC.h file into my main .h file to be brought in to define my chips registers. However when I try and build my code I get the 'Undefined Reference' error on the Registers I try to write to in my .c file.
From searching this sub I have seen that it is a linker issue that usually causes this. I am wondering if there is anything obvious I am missing or if anyone has any experience on where I am going wrong!
Any help would be greatly appreciated, thanks!
Here are the compiler and chip options I am given on Simulink from MPLAB blocks:
Gitlab Repository:
https://gitlab.com/poley1/dspic_can.git
If you need the model saving in any other MATLAB release then let me know and I'll add it!
I have also added a build log of a successful build to show what my linker is calling. I think it is:
-Wl,--script="F:\Users\Matt\Documents\MATLABworking\dsPIC33EV_CAN_TEST\p33EV256GM106.gld",-t,--report-mem,-Map=info.map,-cref,-lq-dsp,--memorysummary,memoryfile.xml
Thank you for the help!