FC7 issues - UART MX_HARD_BAUD_5 undeclared

A forums to allow resolved bugs and problems with Flowcode v7 to be stored and marked as resolved.

Moderator: Benj

Post Reply
pladnows
Posts: 11
Joined: Thu Sep 08, 2016 1:27 pm
Has thanked: 6 times
Been thanked: 6 times
Contact:

FC7 issues - UART MX_HARD_BAUD_5 undeclared

Post by pladnows »

After declaring and configuring 6 uart channels on 32MZ2048ECM064 I'm getting the error message listed below. All parameter fields are filled, including the baud rate of course. I've tried setting the baud rate manually using component macros but that didn't help either. I'm sure the project did compile previously (with software SPI set), before applying the SPI update from this viewtopic.php?f=63&t=18092 topic however it seems to be a completely separate issue. The project has 6 uart channels, 5 pwm's, one SPI channel and 5 analog inputs declared and initiated.

As usual, any help will be appreciated.
Launching the compiler...
C:\Program Files (x86)\Flowcode 7\compilers\pic32\bin\xc32-gcc.exe -mprocessor=32MZ2048ECM064 -O1 -o "C:\prj\SMM\SMM.out" "C:\prj\SMM\SMM.c"
In file included from C:\prj\SMM\SMM.c:83:0:
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_UART.c: In function 'FC_CAL_UART_Init_5':
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_UART.c:173:36: error: 'MX_HARD_BAUD_5' undeclared (first use in this function)
#define MX_UART_BAUD_X CAL_APPEND(MX_HARD_BAUD_, MX_UART_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in definition of macro 'CAL_APD'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_UART.c:173:25: note: in expansion of macro 'CAL_APPEND'
#define MX_UART_BAUD_X CAL_APPEND(MX_HARD_BAUD_, MX_UART_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_UART.c:339:11: note: in expansion of macro 'MX_UART_BAUD_X'
U4BRG = MX_UART_BAUD_X; // Set the baud rate
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_UART.c:173:36: note: each undeclared identifier is reported only once for each function it appears in
#define MX_UART_BAUD_X CAL_APPEND(MX_HARD_BAUD_, MX_UART_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\internals.c:65:26: note: in definition of macro 'CAL_APD'
#define CAL_APD(a, b) a##b
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_UART.c:173:25: note: in expansion of macro 'CAL_APPEND'
#define MX_UART_BAUD_X CAL_APPEND(MX_HARD_BAUD_, MX_UART_NUM)
^
C:\Program Files (x86)\Flowcode 7\CAL\PIC32BIT\PIC32BIT_CAL_UART.c:339:11: note: in expansion of macro 'MX_UART_BAUD_X'
U4BRG = MX_UART_BAUD_X; // Set the baud rate
^ ^
(..)

User avatar
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: FC7 issues - UART MX_HARD_BAUD_5 undeclared

Post by Benj »

Hello,

Yes sorry this was also fixed when you pointed out the last bug.

This file needs to be placed into the "Flowcode 7/CAL/PIC32" folder.
PIC32BIT_CAL_UART.c
(22.34 KiB) Downloaded 290 times
And this file needs to be placed into the "Flowcode 7/FCD/PIC32" folder which also provides the missing RXINT interrupts.
32MZ2048ECM064.fcdx
(54.75 KiB) Downloaded 255 times
Loads of PIC32 devices have this issue so I'll post all the updated chip definition files in the updates section this week.

pladnows
Posts: 11
Joined: Thu Sep 08, 2016 1:27 pm
Has thanked: 6 times
Been thanked: 6 times
Contact:

Re: FC7 issues - UART MX_HARD_BAUD_5 undeclared

Post by pladnows »

Hi,
thanks for your reply. The error is gone, but after applying the patch I'm unable to set the SPI pins when its in hardware mode.

User avatar
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: FC7 issues - UART MX_HARD_BAUD_5 undeclared

Post by Benj »

Hi

Sorry about that, I have just done a massive SPI change which is causing you problems because you don't have all the latest components yet.

Rather then try and post everything here, here is an FCD with the SPI mod temporarily removed.
32MZ2048ECM064.fcdx
(54.75 KiB) Downloaded 257 times
I'll post a new update set of files today to help bring everyone who needs it up to speed.

Post Reply