Microchip MDD Error upon Build

I say again, the error is dependent only on whether SPI_INTERRUPT_FLAG_ASM is defined or not. What it is defined as will not affect that error message.
I already addressed your comment and at this stage, I don't even care much, but It would be much more impressive if you actually had the solution, but you don't and that's really the point.
 

AlbertHall

Joined Jun 4, 2014
12,625
I already addressed your comment and at this stage, I don't even care much, but It would be much more impressive if you actually had the solution, but you don't and that's really the point.
No I don't know why it isn't being defined. I would be putting the define in the main file to see what happens because at least that way it would be defined.
 

Thread Starter

Sherri

Joined Mar 31, 2018
29
Hello all!
I have taken the time to reorganize this project and have compared my program to a sample project for sd cards that is included when you install the libraries. I have included here a zip file which includes the following:
1) The Demonstration.c program from the microchip sample program.
2) My code G_lives.c file to compare to demonstration.c file.
3) Hardwareprofile.h original from microchip.
4) My Hardwareprofile.h altered file to use my microcontrollers (primary microcontroller is PIC18F24k22, a second micro I included and changed in the hardwareprofile.h is a PIC18f26k22 as I use both microcontrollers at different times)
5) Screenshot Microchip is a screenshot of the project and will allow you to see the files I have loaded and the results of the build.
6) Screenshot_sherri is my project with files(same as microchip project except the main .c programs are different and hardwareprofile.h files are different.) and the build results.

I know that the toolchain paths are correct as I have changed the hardwareprofile.h file and the main.c (G_lives, and demonstration.c)files between each program and the microchip sample project builds either way and my project fails in both situations.

I believe the issue as you can see by the build failure is one of "defines" and one that I cant figure out. I have defined all my pins for the pic18f24k22 and pic18f26k22 in my hardware files. I have changed to my chosen PIC by taking the original known good hardwareprofile.h file and changing it to my pic18f24k22 needs.
I need some help analyzing this to find where the disconnect is with the build failing as I just cant find the mistake. I hope my revamped showing of my files will give a better understanding of what I cant seem to fix.

Thanks all for your continued help.

Sherri
 

Attachments

AlbertHall

Joined Jun 4, 2014
12,625
Your modified file expects 18F24K22 but you appear to be building for 18LF24K22.
Try building for the 18F24K22 and see what happens.
 

Thread Starter

Sherri

Joined Mar 31, 2018
29
Your modified file expects 18F24K22 but you appear to be building for 18LF24K22.
Try building for the 18F24K22 and see what happens.
Thank you AlbertHall for your reply.
I have made the changes to "LF24k22" in my project with the exact same results as before. I still receive the same failures at build.

Thanks again for your help.

Sherri
 

Thread Starter

Sherri

Joined Mar 31, 2018
29
Also your modified file does not #define SPI_INTERRUPT_FLAG_ASM
AlbertHall,
I have changed the part name to reflect the Upper case as I forgot it had to be case sensitive.
I have included here another current screen shot after the changes.

SherriScreenshot (8).png
 

AlbertHall

Joined Jun 4, 2014
12,625
In your modified file:
#define SPI_INTERRUPT_FLAG PIR2bits.SSPIF
Should be #define SPI_INTERRUPT_FLAG PIR2bits.SSP2IF

[EDIT] My bedtime now. See ya tomorrow.
 

Thread Starter

Sherri

Joined Mar 31, 2018
29
Also your modified file does not #define SPI_INTERRUPT_FLAG_ASM
AlbertHall,
I have updated the .h file to reflect the _asm define as I believe it is located correctly. I have also included a screenshot after build w/ latest changes. I believe we are close.

SherriScreenshot (9).png
 

Attachments

Thread Starter

Sherri

Joined Mar 31, 2018
29
Both of these should use SSP2IF:
#define SPI_INTERRUPT_FLAG PIR2bits.SSPIF
#define SPI_INTERRUPT_FLAG_ASM PIR2bits.SSPIF
AlbertHall,
As noted my project still fails build as shown in the latest uploaded files. I may need to look at this more.

Sherri
 

AlbertHall

Joined Jun 4, 2014
12,625
AlbertHall,
As noted my project still fails build as shown in the latest uploaded files. I may need to look at this more.

Sherri
Can you attach your SD-SPI.c, please.
Those errors and line numbers don't make sense for the version of that file which I have.
 

Thread Starter

Sherri

Joined Mar 31, 2018
29
At this point I have chosen to shelve this project as it has caused me undue stress and frustration. I am considering discontinuing my use of microchip and may begin to search other avenues in microcontrollers.

Sherri
 
Top