Compiler ERROR PIC18F57Q84

For general Flowcode discussion that does not belong in the other sections.
seokgi
Posts: 235
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 8 times
Been thanked: 8 times

Flowcode v11 Compiler ERROR PIC18F57Q84

Post by seokgi »

C:\Share_KDT2\!Project_Ing\Smart_Farm\260323-Motor_Feed_Back_Current_Dectect\V002_Motor_Feed_Back_ACS712\Program>REM DIR: FCD\PIC\batch\pic_xc8_comp.bat

C:\Share_KDT2\!Project_Ing\Smart_Farm\260323-Motor_Feed_Back_Current_Dectect\V002_Motor_Feed_Back_ACS712\Program>"C:\Program Files (x86)\Flowcode\Compilers\picv2\bin\xc8.exe" --chip=18F57Q84 "260502-18F57Q84-1.c" --double=32 --float=32 --msgdisable=359,1273,1388
C:\Program Files (x86)\Flowcode\Compilers\picv2\pic\bin\picc18 --chip=18F57Q84 260502-18F57Q84-1.c --double=32 --float=32 --msgdisable=359,1273,1388
Microchip MPLAB XC8 C Compiler V2.10
Build date: Jul 30 2019
Part Support Version: 2.10
Copyright (C) 2019 Microchip Technology Inc.
C:\Share_KDT2\!Project_Ing\Smart_Farm\260323-Motor_Feed_Back_Current_Dectect\V002_Motor_Feed_Back_ACS712\Program\260502-18F57Q84-1.h:
42: #pragma config FCMENP = 0
^ (1363) unknown configuration setting/register (FCMENP = 0) used
43: #pragma config FCMENS = 0
^ (1363) unknown configuration setting/register (FCMENS = 0) used
55: #pragma config XINST = 0
^ (1504) the PIC18 extended instruction set was enabled but is not supported by this compiler
63: #pragma config DEBUG = 0
^ (1363) unknown configuration setting/register (DEBUG = 0) used
. .

(908) exit status = -1073741819
(908) exit status = 1

Error returned from [xc8.exe]

C:\ProgramData\MatrixTSL\FlowcodeV11\FCD\PIC\batch\pic_xc8_comp.bat reported error code 0x1

Autoclose turned off


FINISHED




MCU : PIC18F57Q84(This is supported by FC11.)

After looking into it through various methods, I learned that the compiler version must be supported. It is said that this version does not properly support register values. Microchip's latest version is XC8 3.10. The FC11 supports XC8 2.1. Several versions exist in between.

Thank you.

medelec35
Valued Contributor
Posts: 2300
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 715 times
Been thanked: 775 times

Re: Compiler ERROR PIC18F57Q84

Post by medelec35 »

Hello.
Flowcode v11 does indeed support PIC18F57Q84, but the default compiler does not.
I believe PIC18F57Q84 was added in xc8 2.20 and the default xc8 used in Flowcode is 2.10

It is very easy for you to fix this.
Follow the top section (option 1) of this wiki page.
Martin

seokgi
Posts: 235
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 8 times
Been thanked: 8 times

Re: Compiler ERROR PIC18F57Q84

Post by seokgi »

The program compiles successfully with the help of ai(Gemini). However, it does not run.

If you could tell me how to proceed, I will try following your instructions.

I ask for your help.
Attachments
260604-18F57Q84-1.fcfx
(16.06 KiB) Downloaded 42 times

Steve-Matrix
Matrix Staff
Posts: 1928
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 286 times
Been thanked: 448 times

Re: Compiler ERROR PIC18F57Q84

Post by Steve-Matrix »

Have you got a simple LED flasher project to work on your hardware? That would be the first step.

Then, try to isolate the exact issue that is not working. For example, is it just the interrupt firing that is a problem, or is there something else?

medelec35
Valued Contributor
Posts: 2300
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 715 times
Been thanked: 775 times

Re: Compiler ERROR PIC18F57Q84

Post by medelec35 »

Hello.
If the simple flasher is working as the expected speed, then we can assume the configuration settings are correct.
Looking at your project, the interrupt is triggered every 4.096 ms.
The LED will only be on for 5 counts = 5 x 4.096 ms = 20.48 ms and off for 251 * 4.096 ms = 1.027096 s.
Therefore you will net see the LED light.
The only way of testing is with a logic analyser or a scope.
For testing the interrupt, what about toggling the port pin every 1000/1.024 ~244 ~1 second?
Martin

medelec35
Valued Contributor
Posts: 2300
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 715 times
Been thanked: 775 times

Re: Compiler ERROR PIC18F57Q84

Post by medelec35 »

You will need to take into account the default internal osc will be running at 4HMHz.
If you entered a different frequency in the clock speed within configuration settings then there will be a mismatch.

Search Flowcode components (use the magnifying glass)
Search for intosc, then add the Intosc helper to your 2D panel.
Look at the properties of Intosc helper, It will show you the name of the register used to set the hardware speed.
Make sure the correct frequency is selected e.g. 64 MHz
You can copy and paste the correct register name and value within a C code block at the start of Main, within your project.
Martin

seokgi
Posts: 235
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 8 times
Been thanked: 8 times

Flowcode v11 Re: Compiler ERROR PIC18F57Q84

Post by seokgi »

I adjusted the register values ​​in the project options. As you advised, I also used IntOscHelper to match the clock speed.

However, although I programmed it to repeat turning on and off every second, the signal is output once at the beginning, and the program does not execute.

I ask for your help.

Thank you.
Attachments
스크린샷 2026-06-09 오후 6.24.46.png
스크린샷 2026-06-09 오후 6.24.46.png (241.39 KiB) Viewed 189 times
260608-18F57Q84-3.fcfx
(18.92 KiB) Downloaded 14 times

Steve-Matrix
Matrix Staff
Posts: 1928
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 286 times
Been thanked: 448 times

Re: Compiler ERROR PIC18F57Q84

Post by Steve-Matrix »

It sounds like the clock is too slow. What happens if you remove the call to your "Initialize" macro? And also, try reducing the delays in the main loop (maybe to 10ms or less) to see if the flashing is happening, but very slowly.

seokgi
Posts: 235
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 8 times
Been thanked: 8 times

Re: Compiler ERROR PIC18F57Q84

Post by seokgi »

I reduced the delay to 10uS and removed the Initialize macro.

The results are the same.

Steve-Matrix
Matrix Staff
Posts: 1928
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 286 times
Been thanked: 448 times

Re: Compiler ERROR PIC18F57Q84

Post by Steve-Matrix »

Then perhaps there is a hardware issue?

Post Reply