Page 1 of 1

Arduino compilation error (Windows Path problem)

Posted: Fri Jan 05, 2018 4:13 pm
by reedas
Hi I'm trying to use flowcode 7 with an arduino and can't get the compiler to launch, because of the way that windows doesn't like spaces in the directory address passed by flowcode. It's odd because windows doesn't mind the path when I compile the same code for a miac.

The compiler options are locked for avr/arduino and when I import a windows friendly path via an fcs file it is not saved but is overwritten with the default path.

Error messages from arduino compilation:

Target folder: C:\Users\areed.CCP\DOCUME~1\flowcode
Source name: C:\Users\areed.CCP\Documents\flowcode\arduino.fcfx
Title:
Description:
Device: AVR.ATMEGA.ATMEGA328P
Generated by: Flowcode v7.2.1.4
Date: Friday, January 05, 2018 14:54:13
Users: 1
Registered to: itservices
Licence key: NH8X5C
NOT FOR COMMERCIAL USE
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode 7\compilers\avr\batchfiles\avra.bat atmega328p "C:\Users\areed.CCP\DOCUME~1\flowcode\arduino.elf" "C:\Users\areed.CCP\DOCUME~1\flowcode\arduino.c" "C:\Users\areed.CCP\DOCUME~1\flowcode\arduino.lst"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files (x86)\Flowcode 7\compilers\avr\batchfiles\avra.bat reported error code 1



FINISHED

Success message from Miac compilation:

Target folder: C:\Users\areed.CCP\DOCUME~1\flowcode
Source name: C:\Users\areed.CCP\Documents\flowcode\arduino.fcfx
Title:
Description:
Device: PIC.18F.MIAC V2
Generated by: Flowcode v7.2.1.4
Date: Friday, January 05, 2018 14:50:57
Users: 1
Registered to: itservices
Licence key: NH8X5C
NOT FOR COMMERCIAL USE
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe --chip=18F4550 "arduino.c" --MSGDISABLE=359,1273,1388 --CODEOFFSET=800h --ROM=default,-0-7FF
Microchip MPLAB XC8 C Compiler (Free Mode) V1.41
Build date: Jan 24 2017
Part Support Version: 1.41
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

Employing 18F4550 errata work-arounds:
* Corrupted fast interrupt shadow registers
. . .


Memory Summary:
Program space used 11Ah ( 282) of 7800h bytes ( 0.9%)
Data space used 2Bh ( 43) of 800h bytes ( 2.1%)
Configuration bits used 7h ( 7) of 7h words (100.0%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
ID Location space used 0h ( 0) of 8h bytes ( 0.0%)
Data stack space used 0h ( 0) of 7A0h bytes ( 0.0%)


You have compiled in FREE mode.
Using Omniscient Code Generation that is available in PRO mode,
you could have produced up to 60% smaller and 400% faster code.
See http://www.microchip.com/MPLABXCcompilers for more information.


Launching the linker/assembler...
C:\Program Files (x86)\Flowcode 7\tools\DoNothing\DoNothing.exe

Launching the programmer...
C:\Program Files (x86)\Flowcode 7\tools\mLoader\mLoader.exe -miac "arduino.hex"

Thanks,

Andrew

Re: Arduino compilation error (Windows Path problem)

Posted: Fri Jan 05, 2018 4:21 pm
by Benj
Hi Andrew,

I believe this is linked to a common problem with the AVR compiler and the old legacy 8.3 Windows file path. You can find a fix for the problem here.
http://www.matrixtsl.com/faq/index.php? ... artlang=en

Let us know how you get on.

Re: Arduino compilation error (Windows Path problem)

Posted: Mon Jan 15, 2018 10:01 am
by reedas
Hi,

I followed the instructions and our IT services team have adjusted the 8dot3 file path key and deleted/recopied the Flowcode directory. But I'm still getting a launch error.

Target folder: C:\Users\areed.CCP\DOCUME~1\flowcode
Source name: C:\Users\areed.CCP\Documents\flowcode\arduino.fcfx
Title:
Description:
Device: AVR.ATMEGA.ATMEGA328P
Generated by: Flowcode v7.2.1.4
Date: Monday, January 15, 2018 08:44:44
Users: 1
Registered to: itservices
Licence key: NH8X5C
NOT FOR COMMERCIAL USE
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode 7\compilers\avr\batchfiles\avra.bat atmega328p "C:\Users\areed.CCP\DOCUME~1\flowcode\arduino.elf" "C:\Users\areed.CCP\DOCUME~1\flowcode\arduino.c" "C:\Users\areed.CCP\DOCUME~1\flowcode\arduino.lst"
ERROR: Can not launch process: The system cannot find the file specified.


C:\Program Files (x86)\Flowcode 7\compilers\avr\batchfiles\avra.bat reported error code -1



FINISHED


Ideas gratefully received.

Andrew

Re: Arduino compilation error (Windows Path problem)

Posted: Mon Jan 15, 2018 6:02 pm
by Benj
Hi Andrew,

You can use the Windows command line terminal to check the short path is in place.

Hold Windows key on keyboard and press R key, in the popup dialogue type CMD and then click OK.

In CMD start with the root of your C drive.

This command will send you to the root of the C drive.
cd c:\

This command lists files/folders in the current directory along with the 8.3 file path.
dir /x

Navigate to new folder using the CD command.
cd program files (x86)

Here you can see the Flowcode 7 folder has a 8.3 file entry. You need to keep checking directories until you find the folder that doesn't have the 8.3 file path or reach the Flowcode folder.

Filepath.jpg
Filepath.jpg (55.17 KiB) Viewed 2555 times


In the image you can see the Flowcode 7 folder has a 8.3 file path but the datasheets folder and Flowcode 6 folders do not.

Re: Arduino compilation error (Windows Path problem)

Posted: Tue Jan 16, 2018 10:30 am
by reedas
Hi Ben,

Thanks for your help.

The directory that is not concatenated to 8.3 is "Program Files (x86)" and our IT services team will not allow the moving and copying back of this directory. So I will ask them to reinstall flowcode 7 in a different directory, such as: "C:\flowcode". Do you know if this is an option allowed by the flowcode installer?

cheers,

Andrew

Re: Arduino compilation error (Windows Path problem)

Posted: Tue Jan 16, 2018 12:31 pm
by Benj
Hi Andrew,

Yes that should work fine and is supported by the installer. Strange that the Program Files directory doesn't have the 8.3 path.

Apparently there is a way to add the 8.3 version without having to delete the folder but it sounds like you maybe have to boot up in a special mode.
https://superuser.com/questions/129295/ ... -directory

Re: Arduino compilation error (Windows Path problem)

Posted: Sun Nov 18, 2018 9:10 pm
by claudemir
Hello
I had the same result when compiling a new project with pic18f4620.

Target folder: C:\Users\AUTOMA~1\Desktop
Source name: C:\Users\automacao\Desktop\PID_chocadeira.fcfx
Title:
Description:
Device: PIC.18F.18F4620
Generated by: Flowcode v7.3.0.5
Date: Sunday, November 18, 2018 17:35:34
Users: 1
Registered to: claudemir
Licence key: xxxxxxx
http://www.matrixtsl.com
Iniciando o compilador …
C:\Program Files\Flowcode 7\compilers\pic\bin\xc8.exe --chip=18F4620 "PID_chocadeira.c" --MSGDISABLE=359,1273,1388
Microchip MPLAB XC8 C Compiler (Free Mode) V1.41
Build date: Jan 24 2017
Part Support Version: 1.41
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

Employing 18F4620 errata work-arounds:
* Corrupted fast interrupt shadow registers
* Data in RAM location can be corrupted if async. reset occurs during write
PID_chocadeira.c: FCM_PID_Tempe_Umid()
8377: }
^ (350) unused label "FCC_PID_Tempe_Umid_L" (from line 0) (warning)
PID_chocadeira.c: FCM_SETTING()
10114: goto FCC_SETTING_A;
^ (345) unreachable code (warning)
.
PID_chocadeira.c: 3977: (1257) local variable "_FCR_RETVAL" is used but never given a value (warning)
PID_chocadeira.c: 4474: (1257) local variable "_FCR_RETVAL" is used but never given a value (warning)
PID_chocadeira.c: 6636: (1257) local variable "_FCR_RETVAL" is used but never given a value (warning)
.

Memory Summary:
Program space used 694Eh ( 26958) of 10000h bytes ( 41.1%)
Data space used 13Fh ( 319) of F80h bytes ( 8.0%)
Configuration bits used 7h ( 7) of 7h words (100.0%)
EEPROM space used 10h ( 16) of 400h bytes ( 1.6%)
ID Location space used 0h ( 0) of 8h bytes ( 0.0%)
Data stack space used 0h ( 0) of E28h bytes ( 0.0%)

You have compiled in FREE mode.
Using Omniscient Code Generation that is available in PRO mode,
you could have produced up to 60% smaller and 400% faster code.
See http://www.microchip.com/MPLABXCcompilers for more information.

Iniciando o linker/assembler…
C:\Program Files\Flowcode 7\tools\DoNothing\DoNothing.exe

TERMINADO


Because my fear is that I have popped the Configuration bits used 7h (7) of 7h words (100.0%) or am I sweating only 7 words? but also does not speak how many words I have right. What if it really compiled correctly?

I wondered, since I've compiled other projects before, but there was no compilation completion in that format,
In the doubt I compiled examples that I downloaded directly from the matrix, but the result was the same, I also read that there could have been an error in the 8.3 file entry, as I have access to other computers, I installed Flowcode v7.3.0.5 again, but it persists this compilation return.
Now it remains to know if this correct message or my license has changed?

Re: Arduino compilation error (Windows Path problem)

Posted: Sun Nov 18, 2018 9:19 pm
by kersing
Your code compiled correctly. No need to worry. The only thing you might want to check is the warnings regarding return values not being given values. That might indicate programming issues in your code.

Re: Arduino compilation error (Windows Path problem)

Posted: Sun Nov 18, 2018 11:11 pm
by claudemir
Something has changed in the software, since other projects previously compiled that did not generate this code are now generating this format.
Thanks for the feedback