Hi LeighM.
I've added the I2C program(FC v7.2.1.4) is connected, the port speed remains the same (50 kbits)
text data bss dec hex filename
27668 16 3240 30924 78cc ..Test(STM32F051C8T6).elf
Compilation successful
Iniciando el enlazador/ensamblador…
C:\Program Files (x86)\Flowcode 7\tools\DoNothing\DoNothing.exe
FINALIZADO
=================================================================
I've added new files, errors occur during compilation with te RTC (DS3231)
Device STM32F051x8
In file included from C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.c:38:0,
from C:\Program Files (x86)\Flowcode 7\CAL\includes.c:47,
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c: In function 'FC_CAL_I2C_Master_Init_1':
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:86:15: error: 'GPIOG' undeclared (first use in this function)
#define portg GPIOG
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:136:68: note: in definition of macro 'FC_CAL_Bit_In_DDR'
#define FC_CAL_Bit_In_DDR(Port, Tris, Pin) (FC_CAL_Bit_In_DDR__x((Port), (Pin)))
^
Test(STM32F051C8T6).c:252:27: note: in expansion of macro 'portg'
#define MX_I2C_SDA_PORT_1 portg
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_I2C_SDA_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:211:28: note: in expansion of macro 'CAL_APPEND'
#define MX_I2C_SDA_PORT_X CAL_APPEND(MX_I2C_SDA_PORT_, MX_I2C_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:257:21: note: in expansion of macro 'MX_I2C_SDA_PORT_X'
FC_CAL_Bit_In_DDR(MX_I2C_SDA_PORT_X, MX_I2C_SDA_TRIS_X, MX_I2C_SDA_PIN_X); //Configure SDA as Input
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:86:15: note: each undeclared identifier is reported only once for each function it appears in
#define portg GPIOG
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:136:68: note: in definition of macro 'FC_CAL_Bit_In_DDR'
#define FC_CAL_Bit_In_DDR(Port, Tris, Pin) (FC_CAL_Bit_In_DDR__x((Port), (Pin)))
^
Test(STM32F051C8T6).c:252:27: note: in expansion of macro 'portg'
#define MX_I2C_SDA_PORT_1 portg
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_I2C_SDA_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:211:28: note: in expansion of macro 'CAL_APPEND'
#define MX_I2C_SDA_PORT_X CAL_APPEND(MX_I2C_SDA_PORT_, MX_I2C_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:257:21: note: in expansion of macro 'MX_I2C_SDA_PORT_X'
FC_CAL_Bit_In_DDR(MX_I2C_SDA_PORT_X, MX_I2C_SDA_TRIS_X, MX_I2C_SDA_PIN_X); //Configure SDA as Input
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c: In function 'FC_CAL_I2C_Master_Uninit_1':
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:86:15: error: 'GPIOG' undeclared (first use in this function)
#define portg GPIOG
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:136:68: note: in definition of macro 'FC_CAL_Bit_In_DDR'
#define FC_CAL_Bit_In_DDR(Port, Tris, Pin) (FC_CAL_Bit_In_DDR__x((Port), (Pin)))
^
Test(STM32F051C8T6).c:252:27: note: in expansion of macro 'portg'
#define MX_I2C_SDA_PORT_1 portg
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_I2C_SDA_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:211:28: note: in expansion of macro
'CAL_APPEND'
#define MX_I2C_SDA_PORT_X CAL_APPEND(MX_I2C_SDA_PORT_, MX_I2C_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:281:21: note: in expansion of macro 'MX_I2C_SDA_PORT_X'
FC_CAL_Bit_In_DDR(MX_I2C_SDA_PORT_X, MX_I2C_SDA_TRIS_X, MX_I2C_SDA_PIN_X); //Configure SDA as Input
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c: In function 'FC_CAL_I2C_Master_Start_1':
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:86:15: error: 'GPIOG' undeclared (first use in this function)
#define portg GPIOG
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:136:68: note: in definition of macro 'FC_CAL_Bit_In_DDR'
#define FC_CAL_Bit_In_DDR(Port, Tris, Pin) (FC_CAL_Bit_In_DDR__x((Port), (Pin)))
^
Test(STM32F051C8T6).c:258:27: note: in expansion of macro 'portg'
#define MX_I2C_SCL_PORT_1 portg
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_I2C_SCL_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:214:28: note: in expansion of macro 'CAL_APPEND'
#define MX_I2C_SCL_PORT_X CAL_APPEND(MX_I2C_SCL_PORT_, MX_I2C_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:293:21: note: in expansion of macro 'MX_I2C_SCL_PORT_X'
FC_CAL_Bit_In_DDR(MX_I2C_SCL_PORT_X, MX_I2C_SCL_TRIS_X, MX_I2C_SCL_PIN_X); //Make Sure SCL is Set
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c: In function 'FC_CAL_I2C_Master_Restart_1':
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:86:15: error: 'GPIOG' undeclared (first use in this function)
#define portg GPIOG
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:136:68: note: in definition of macro 'FC_CAL_Bit_In_DDR'
#define FC_CAL_Bit_In_DDR(Port, Tris, Pin) (FC_CAL_Bit_In_DDR__x((Port), (Pin)))
^
REGULADOR(STM32F051C8T6_SYSCLK(HSE)-53mHz)-14.c:252:27: note: in expansion of macro 'portg'
#define MX_I2C_SDA_PORT_1 portg
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_I2C_SDA_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:211:28: note: in expansion of macro 'CAL_APPEND'
#define MX_I2C_SDA_PORT_X CAL_APPEND(MX_I2C_SDA_PORT_, MX_I2C_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:310:21: note: in expansion of macro 'MX_I2C_SDA_PORT_X'
FC_CAL_Bit_In_DDR(MX_I2C_SDA_PORT_X, MX_I2C_SDA_TRIS_X, MX_I2C_SDA_PIN_X); //Set SDA High
^
In file included from C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.c:38:0,
from C:\Program Files (x86)\Flowcode 7\CAL\includes.c:47,
from Test(STM32F051C8T6).c
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c: In function 'FC_CAL_I2C_Master_Stop_1':
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:86:15: error: 'GPIOG' undeclared (first use in this function)
#define portg GPIOG
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:46:47: note: in definition of macro 'FCP_SET_B'
#define FCP_SET_B(Port, Mask, Shift, Source) {Port->MODER = (Port->MODER & ~(3<<((Shift)*2))) | (1<<((Shift)*2)); Port->BSRR = 1 << (Shift + (Source?0:16));}
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:328:3: note: in expansion of macro 'FC_CAL_Bit_Low_DDR'
FC_CAL_Bit_Low_DDR(MX_I2C_SCL_PORT_X, MX_I2C_SCL_TRIS_X, MX_I2C_SCL_PIN_X); //Set SCL Low
^
Test(STM32F051C8T6).c:258:27: note: in expansion of macro 'portg'
#define MX_I2C_SCL_PORT_1 portg
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_I2C_SCL_PORT_1'
#define CAL_APD(a, b) a##b
^
C:
\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:214:28: note: in expansion of macro 'CAL_APPEND'
#define MX_I2C_SCL_PORT_X CAL_APPEND(MX_I2C_SCL_PORT_, MX_I2C_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:328:22: note: in expansion of macro 'MX_I2C_SCL_PORT_X'
FC_CAL_Bit_Low_DDR(MX_I2C_SCL_PORT_X, MX_I2C_SCL_TRIS_X, MX_I2C_SCL_PIN_X); //Set SCL Low
^
In file included from C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.c:38:0,
from C:\Program Files (x86)\Flowcode 7\CAL\includes.c:47,
from Test(STM32F051C8T6).c
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c: In function 'FC_CAL_I2C_Master_TxByte_1':
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:86:15: error: 'GPIOG' undeclared (first use in this function)
#define portg GPIOG
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:136:68: note: in definition of macro 'FC_CAL_Bit_In_DDR'
#define FC_CAL_Bit_In_DDR(Port, Tris, Pin) (FC_CAL_Bit_In_DDR__x((Port), (Pin)))
^
Test(STM32F051C8T6).c:252:27: note: in expansion of macro 'portg'
#define MX_I2C_SDA_PORT_1 portg
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_I2C_SDA_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:211:28: note: in expansion of macro 'CAL_APPEND'
#define MX_I2C_SDA_PORT_X CAL_APPEND(MX_I2C_SDA_PORT_, MX_I2C_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:355:23: note: in expansion of macro 'MX_I2C_SDA_PORT_X'
FC_CAL_Bit_In_DDR(MX_I2C_SDA_PORT_X, MX_I2C_SDA_TRIS_X, MX_I2C_SDA_PIN_X); //Set SDA High
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c: In function 'FC_CAL_I2C_Master_RxByte_1':
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:86:15: error: 'GPIOG' undeclared (first use in this function)
#define portg GPIOG
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_IO.h:136:68: note: in definition of macro 'FC_CAL_Bit_In_DDR'
#define FC_CAL_Bit_In_DDR(Port, Tris, Pin) (FC_CAL_Bit_In_DDR__x((Port), (Pin)))
^
Test(STM32F051C8T6).c:252:27: note: in expansion of macro 'portg'
#define MX_I2C_SDA_PORT_1 portg
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in expansion of macro 'MX_I2C_SDA_PORT_1'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:66:28: note: in expansion of macro 'CAL_APD'
#define CAL_APPEND(a, b) CAL_APD(a, b)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:211:28: note: in expansion of macro 'CAL_APPEND'
#define MX_I2C_SDA_PORT_X CAL_APPEND(MX_I2C_SDA_PORT_, MX_I2C_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_I2C.c:394:21: note: in expansion of macro 'MX_I2C_SDA_PORT_X'
FC_CAL_Bit_In_DDR(MX_I2C_SDA_PORT_X, MX_I2C_SDA_TRIS_X, MX_I2C_SDA_PIN_X); //Set SDA High
^
Error(s) in build
C:\Program Files (x86)\Flowcode 7\compilers\STARM\batch\stm32comp.bat notificado código de error 1