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

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

Postby pladnows » Tue Sep 13, 2016 2:59 pm

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 https://www.matrixtsl.com/mmforums/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
^ ^
(..)
These users thanked the author pladnows for the post:
Brendan (Wed Sep 14, 2016 1:46 pm)
Rating: 5.56%
 

User avatar
Benj
Matrix Staff
Posts: 14150
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4078 times
Contact:

Re: FC7 issues - UART MX_HARD_BAUD_5 undeclared

Postby Benj » Tue Sep 13, 2016 4:09 pm

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
(23.13 KiB) Downloaded 81 times


And this file needs to be placed into the "Flowcode 7/FCD/PIC32" folder which also provides the missing RXINT interrupts.

32MZ2048ECM064.fcdx
(55.23 KiB) Downloaded 73 times


Loads of PIC32 devices have this issue so I'll post all the updated chip definition files in the updates section this week.
These users thanked the author Benj for the post:
Brendan (Wed Sep 14, 2016 1:47 pm)
Rating: 5.56%
 

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

Postby pladnows » Tue Sep 13, 2016 4:19 pm

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: 14150
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4078 times
Contact:

Re: FC7 issues - UART MX_HARD_BAUD_5 undeclared

Postby Benj » Tue Sep 13, 2016 4:41 pm

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
(55.23 KiB) Downloaded 78 times


I'll post a new update set of files today to help bring everyone who needs it up to speed.
These users thanked the author Benj for the post (total 2):
pladnows (Wed Sep 14, 2016 10:36 am) • Brendan (Wed Sep 14, 2016 1:46 pm)
Rating: 11.11%