Hello
I try to run the 32MX150 and the 24FJ64GB002 as "SPI Slave".
Unfortunately I get the following error message during build.
C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\pic16_C30_comp.bat "SPI_Slave_Error" "D:\PR6751~1\" "24FJ64GB002"
D:\PR6751~1>xc16-gcc -c -mcpu="24FJ64GB002" -omf=coff -funsigned-char -fno-short-double -Os -I"C:\PROGRA~2\Flowcode\Common\COMPIL~1\pic16\BATCHF~1\..\support\h" -I"C:\PROGRA~2\Flowcode\Common\COMPIL~1\pic16\BATCHF~1\" -std=gnu99 "SPI_Slave_Error".c -o "SPI_Slave_Error".o
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\includes.c0,
from SPI_Slave_Error.c:570:
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_SPI.c: In function 'FC_CAL_SPI_Slave_Init_1':
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_SPI.c:698:2: error: 'tris' undeclared (first use in this function)
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_SPI.c:698:2: note: each undeclared identifier is reported only once for each function it appears in
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_SPI.c: In function 'FC_CAL_SPI_Slave_Uninit_1':
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/PIC16BIT\PIC16BIT_CAL_SPI.c:871:2: error: 'tris' undeclared (first use in this function)
SPI_Slave_Error.c: In function 'FCD_01531_cal_spi__Prv_SimShowWaveform':
SPI_Slave_Error.c:681:31: error: macro "SET_PORT_MASK" requires 3 arguments, but only 2 given
SPI_Slave_Error.c:681:6: error: 'SET_PORT_MASK' undeclared (first use in this function)
SPI_Slave_Error.c:736:31: error: macro "SET_PORT_MASK" requires 3 arguments, but only 2 given
Error returned from [xc16-gcc.exe]
C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\pic16_C30_comp.bat Hat den Fehlercode 1 gemeldet
Can someone tell me what I did wrong
PIC 32MX150 and 24FJ64GB002 SPI Slave Error
Moderator: Benj
-
- Posts: 89
- Joined: Wed Aug 31, 2016 4:48 pm
- Been thanked: 4 times
- Contact:
PIC 32MX150 and 24FJ64GB002 SPI Slave Error
- Attachments
-
- SPI_Slave_Error.c
- (49.34 KiB) Downloaded 136 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PIC 32MX150 and 24FJ64GB002 SPI Slave Error
Hello,
Please can you post your .fcfx Flowcode project file.
From the C file it looks like maybe the pin connection for the SCK pin is not assigned.
Please can you post your .fcfx Flowcode project file.
From the C file it looks like maybe the pin connection for the SCK pin is not assigned.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 89
- Joined: Wed Aug 31, 2016 4:48 pm
- Been thanked: 4 times
- Contact:
Re: PIC 32MX150 and 24FJ64GB002 SPI Slave Error
Hello,
the right file
the right file
- Attachments
-
- SPI_Slave_Error.fcfx
- (10.78 KiB) Downloaded 141 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PIC 32MX150 and 24FJ64GB002 SPI Slave Error
Hello,
In the properties for the SPI_Slave1 component the CLK remap pin property is blank. Assign a pin and hopefully it will start compiling correctly for you.
Your program will likely also need modification as it's not using the SPI slave interrupt etc to get the data from the master. See here for an example.
https://www.matrixtsl.com/wiki/index.ph ... Interface)
In the properties for the SPI_Slave1 component the CLK remap pin property is blank. Assign a pin and hopefully it will start compiling correctly for you.
Your program will likely also need modification as it's not using the SPI slave interrupt etc to get the data from the master. See here for an example.
https://www.matrixtsl.com/wiki/index.ph ... Interface)
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 89
- Joined: Wed Aug 31, 2016 4:48 pm
- Been thanked: 4 times
- Contact: