AVR Compiler issues
Moderator: Benj
AVR Compiler issues
Hi to all,
I purchased the AVR chip pack license for Flowcode 6 today as I would like to try my hand at using an Arduino board for some of my projects, but am experiencing compiler problems. I have tried this link: https://www.matrixtsl.com/faq/index.php ... artlang=en to no avail.
I followed the posting step by step but it has not cured the problem.
I am running FC6 on Windows 7 32 bit computer.
I need some advice from anyone that has had this problem as well please. I have edited the registry as suggested etc but it does not find the file specified when trying to compile to Hex, however, the C file is perfect.
Any help would be greatly appreciated.
Thank you
Kind regards
Ted
I purchased the AVR chip pack license for Flowcode 6 today as I would like to try my hand at using an Arduino board for some of my projects, but am experiencing compiler problems. I have tried this link: https://www.matrixtsl.com/faq/index.php ... artlang=en to no avail.
I followed the posting step by step but it has not cured the problem.
I am running FC6 on Windows 7 32 bit computer.
I need some advice from anyone that has had this problem as well please. I have edited the registry as suggested etc but it does not find the file specified when trying to compile to Hex, however, the C file is perfect.
Any help would be greatly appreciated.
Thank you
Kind regards
Ted
- 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: AVR Compiler issues
Hi Ted,
The fix is known to work so let's take a minute to confirm the fix was applied correctly.
Which option from the FAQ did you try? Did you uninstall (easy way) or did you copy the folder (quick way)?
With both options can you confirm you manually deleted the Flowcode installation folder?
Did you find the 8dot3 registry key and switch this to 0? Was it set to 1 or another value to begin with?
Finally are you running any type of registry optimisation software e.g. system mechanic? If you are then it could be setting the registry back and breaking the compiler again? We strongly recommend against using optimisation software like this as they usually cause far more problems then they solve. If you are not running this type of software then do you have any firewall or antivirus running which might be doing this type of thing?
As a sanity check you can check if there is a valid short path to your Flowcode folder by using cmd and the command here.
https://superuser.com/questions/348079/ ... ctory-file
Make sure that all the folders from the root of the drive have valid short paths.
for example if you installed Flowcode in the default location then check the following folders all have valid short paths.
C:\Program Files (x86)
C:\Program Files (x86)\Flowcode 6
C:\Program Files (x86)\Flowcode 6\compilers
C:\Program Files (x86)\Flowcode 6\compilers\avr
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles
The fix is known to work so let's take a minute to confirm the fix was applied correctly.
Which option from the FAQ did you try? Did you uninstall (easy way) or did you copy the folder (quick way)?
With both options can you confirm you manually deleted the Flowcode installation folder?
Did you find the 8dot3 registry key and switch this to 0? Was it set to 1 or another value to begin with?
Finally are you running any type of registry optimisation software e.g. system mechanic? If you are then it could be setting the registry back and breaking the compiler again? We strongly recommend against using optimisation software like this as they usually cause far more problems then they solve. If you are not running this type of software then do you have any firewall or antivirus running which might be doing this type of thing?
As a sanity check you can check if there is a valid short path to your Flowcode folder by using cmd and the command here.
https://superuser.com/questions/348079/ ... ctory-file
Make sure that all the folders from the root of the drive have valid short paths.
for example if you installed Flowcode in the default location then check the following folders all have valid short paths.
C:\Program Files (x86)
C:\Program Files (x86)\Flowcode 6
C:\Program Files (x86)\Flowcode 6\compilers
C:\Program Files (x86)\Flowcode 6\compilers\avr
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: AVR Compiler issues
Hi Ben
I tried both fixes as per your FAQ posting but had no joy, the following was how I did the "Easy way":
(1) I edited the NtfsDisabled8dot3NameCreation file to read value: 0 It was originally at 2
(2) I copied the FC6 installer program and pasted it in my Documents folder under: "FlowCode6.1.4.0 Copy"
(3) I uninstalled the FC6 program and deleted the FC6 folder completely
(4) I restarted the computer to make sure that the new setting in the registry would be active
(5) I installed the FC6 program afresh and activated it with the new license settings
(6) Wrote a small program with 2 flashing leds utilizing the Atmega 168 chip, it creates the "C" file OK but will not create the HEX file.
* After reinstalling FC6 I checked the registry once more to check whether my antivirus (Avast) was changing the value, but found it to still be at 0.
I ran the CMD command in DOS and entered the complete path: c:\Program Files\Flowcode 6\compilers\avr\batchfiles and ENTER and was able to get into the batchfiles DIR with no problem.....am a bit baffled!!
I tried FC8 for 30 days and when this problem arose I thought that maybe there was a conflict between FC6 and 8 so I uninstalled FC8 with no luck.
Something that I also noticed was that I have a completely separate program called: "Flowcode Compiler (PIC 8-bit)" installed for my PIC license. Is there not supposed to be a similar program for the AVR chip pack?
Your assistance is greatly appreciated thank you.
Regards
Ted
I tried both fixes as per your FAQ posting but had no joy, the following was how I did the "Easy way":
(1) I edited the NtfsDisabled8dot3NameCreation file to read value: 0 It was originally at 2
(2) I copied the FC6 installer program and pasted it in my Documents folder under: "FlowCode6.1.4.0 Copy"
(3) I uninstalled the FC6 program and deleted the FC6 folder completely
(4) I restarted the computer to make sure that the new setting in the registry would be active
(5) I installed the FC6 program afresh and activated it with the new license settings
(6) Wrote a small program with 2 flashing leds utilizing the Atmega 168 chip, it creates the "C" file OK but will not create the HEX file.
* After reinstalling FC6 I checked the registry once more to check whether my antivirus (Avast) was changing the value, but found it to still be at 0.
I ran the CMD command in DOS and entered the complete path: c:\Program Files\Flowcode 6\compilers\avr\batchfiles and ENTER and was able to get into the batchfiles DIR with no problem.....am a bit baffled!!
I tried FC8 for 30 days and when this problem arose I thought that maybe there was a conflict between FC6 and 8 so I uninstalled FC8 with no luck.
Something that I also noticed was that I have a completely separate program called: "Flowcode Compiler (PIC 8-bit)" installed for my PIC license. Is there not supposed to be a similar program for the AVR chip pack?
Your assistance is greatly appreciated thank you.
Regards
Ted
- Attachments
-
- TEST4.msg.txt
- (829 Bytes) Downloaded 319 times
Re: AVR Compiler issues
Hi Ben
I just opened the TEST4.msg file and saw that the compiler was actually searching for a TEST4.elf file and not the TEST4.fcfx file..!!
Why would the compiler change the file extension to ".elf" ?
Rgds
Ted
I just opened the TEST4.msg file and saw that the compiler was actually searching for a TEST4.elf file and not the TEST4.fcfx file..!!
Why would the compiler change the file extension to ".elf" ?
Rgds
Ted
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: AVR Compiler issues
Hi Ted,
The .elf listing is normal, the .c is listed later.
It looks like the system is still not finding avra.bat
Maybe try, in a CMD DOS box...
The .elf listing is normal, the .c is listed later.
It looks like the system is still not finding avra.bat
Maybe try, in a CMD DOS box...
Code: Select all
cd c:\Program Files\Flowcode 6\compilers\avr\batchfiles
avra.bat atmega168 "C:\Users\Ted\Documents\FLOWCODE V6\TEST4.elf" "C:\Users\Ted\Documents\FLOWCODE V6\TEST4.c" "C:\Users\Ted\Documents\FLOWCODE V6\TEST4.lst"
Re: AVR Compiler issues
Hi Leigh
I opened a CMD box and changed the DIR's one by one to get to batchfiles, I then entered the following:
C:\Program Files\Flowcode 6\compilers\avr\batchfiles\>cd\Program Files\Flowcode 6\compilers\avr\batchfiles\avra and ENTER the batchfile ran and the CMD box closed.
There is something preventing the compiler from accessing this batchfile from the compiler software it seems, cannot put my finger on the problem. It is just strange that there is only a problem with the AVR Chip Pack compiler as this does not occur on my PIC chip pack. I see on the forum that this problem has existed since 2015.
The fact that the PIC chip pack has a separate program as per my previous post, is there not also supposed to be a program for the AVR Compiler??
Rgds
Ted
I opened a CMD box and changed the DIR's one by one to get to batchfiles, I then entered the following:
C:\Program Files\Flowcode 6\compilers\avr\batchfiles\>cd\Program Files\Flowcode 6\compilers\avr\batchfiles\avra and ENTER the batchfile ran and the CMD box closed.
There is something preventing the compiler from accessing this batchfile from the compiler software it seems, cannot put my finger on the problem. It is just strange that there is only a problem with the AVR Chip Pack compiler as this does not occur on my PIC chip pack. I see on the forum that this problem has existed since 2015.
The fact that the PIC chip pack has a separate program as per my previous post, is there not also supposed to be a program for the AVR Compiler??
Rgds
Ted
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: AVR Compiler issues
Hi Ted,
What is in your directory...
C:\Program Files\Flowcode 6\compilers\avr
Also, if you run avra.bat with the parameters for your project, does it compile to hex?
If you add a line
pause
before the EXIT statements in the avra.bat, the batch will pause for you to see any messages.
What is in your directory...
C:\Program Files\Flowcode 6\compilers\avr
Also, if you run avra.bat with the parameters for your project, does it compile to hex?
If you add a line
pause
before the EXIT statements in the avra.bat, the batch will pause for you to see any messages.
Re: AVR Compiler issues
Hi Ben and Leigh
I will ask my friend to check out my problem as this is slightly over my head as far as experience with this type of thing is concerned.
He does programming on a daily basis and will understand fully what you guys have suggested for the fix.
Will inform you of what he has found and corrected.
Thanks for the help so far.
Regards
Ted
I will ask my friend to check out my problem as this is slightly over my head as far as experience with this type of thing is concerned.
He does programming on a daily basis and will understand fully what you guys have suggested for the fix.
Will inform you of what he has found and corrected.
Thanks for the help so far.
Regards
Ted
Re: AVR Compiler issues
Hi Ben and Leigh
Have had my computer checked out by a professional programmer to ascertain what the problem is concerning the AVR Hex file creation issue.
All the files that the AVR compiler requires as per the message file are present in the path which it creates (See TEST4.msg attachment above) except the .elf file which the compiler is supposed to create itself.
The problem is that the compiler software is not creating this file when it creates the "C' file, but ends up looking for the ".elf" file later in the program and which is creating the ERROR message.
Please advise on the next move, I will contact your sales director as well.
Thank you
Regards
Ted
Have had my computer checked out by a professional programmer to ascertain what the problem is concerning the AVR Hex file creation issue.
All the files that the AVR compiler requires as per the message file are present in the path which it creates (See TEST4.msg attachment above) except the .elf file which the compiler is supposed to create itself.
The problem is that the compiler software is not creating this file when it creates the "C' file, but ends up looking for the ".elf" file later in the program and which is creating the ERROR message.
Please advise on the next move, I will contact your sales director as well.
Thank you
Regards
Ted
- 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: AVR Compiler issues
Hi Ted,
I believe the problem could be related to your project location. Please can you make a directory on the C:\ e.g. C:\FC6\ and move your project there.
Hopefully this should solve the problem for you.
The reason for this is I have just installed v6 with a similar project path setup to yours and I get this when compiling to hex.
Yours:
I believe the problem could be related to your project location. Please can you make a directory on the C:\ e.g. C:\FC6\ and move your project there.
Hopefully this should solve the problem for you.
The reason for this is I have just installed v6 with a similar project path setup to yours and I get this when compiling to hex.
The reason I think it's the file path is this in your output vs the following in mine which has been generated in the 8.3 format.Target folder: C:\Users\Ben\DOCUME~1\FLOWCO~1
Source name: C:\Users\Ben\Documents\FLOWCODE V6\TEST4.fcfx
Title:
Description:
Device: AVR.ATMEGA.ATMEGA168
Generated by: Flowcode v6.1.4.0
Date: Friday, August 24, 2018 10:18:07
Users: 1
Registered to: Ben Rowland
Licence key: xxxxx
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avra.bat atmega168 "C:\Users\Ben\DOCUME~1\FLOWCO~1\TEST4.elf" "C:\Users\Ben\DOCUME~1\FLOWCO~1\TEST4.c" "C:\Users\Ben\DOCUME~1\FLOWCO~1\TEST4.lst"
Launching compiler...
C:\Users\Ben\DOCUME~1\FLOWCO~1>"C:\PROGRA~2\FLOWCO~2\COMPIL~1\avr\BATCHF~1\..\bin\avr-gcc.exe" -mmcu=atmega168 -Os -funsigned-char -o "C:\Users\Ben\DOCUME~1\FLOWCO~1\TEST4.elf" "C:\Users\Ben\DOCUME~1\FLOWCO~1\TEST4.c" -lm
C:\Users\Ben\DOCUME~1\FLOWCO~1>"C:\PROGRA~2\FLOWCO~2\COMPIL~1\avr\BATCHF~1\..\bin\avr-objdump.exe" -S "C:\Users\Ben\DOCUME~1\FLOWCO~1\TEST4.elf" 1>"C:\Users\Ben\DOCUME~1\FLOWCO~1\TEST4.lst"
C:\Users\Ben\DOCUME~1\FLOWCO~1>"C:\PROGRA~2\FLOWCO~2\COMPIL~1\avr\BATCHF~1\..\bin\avr-size.exe" -B -d "C:\Users\Ben\DOCUME~1\FLOWCO~1\TEST4.elf"
text data bss dec hex filename
670 0 22 692 2b4 C:\Users\Ben\DOCUME~1\FLOWCO~1\TEST4.elf
Compilation successful!
Completed compilation, return = 0
...
Yours:
Mine:Target folder: C:\Users\Ted\Documents\FLOWCODE V6
Target folder: C:\Users\Ben\DOCUME~1\FLOWCO~1
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: AVR Compiler issues
Hi Ben
I have created a new folder with the shortest path in C: with the name FC, saved the new TEST5.fcfx into this folder and it gives me exactly the same ERROR.
The registry file NtfsDisable8dot3NameCreation is still at 0. This is driving me nuts......
Could it be something to do with the operating system? I am running Windows 7 Professional at 32 bits.
My Flowcode V6 is version: 6.1.4.0, was there any patches supplied to address this problem maybe that I missed??
I have created a new folder with the shortest path in C: with the name FC, saved the new TEST5.fcfx into this folder and it gives me exactly the same ERROR.
The registry file NtfsDisable8dot3NameCreation is still at 0. This is driving me nuts......
Could it be something to do with the operating system? I am running Windows 7 Professional at 32 bits.
My Flowcode V6 is version: 6.1.4.0, was there any patches supplied to address this problem maybe that I missed??
- Attachments
-
- TEST5.msg.txt
- (683 Bytes) Downloaded 304 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: AVR Compiler issues
Hi Ted,
I realise your patience is probably at its limit
But if you are up for trying this it might tell us more
Open a CMD (aka DOS) box, and copy and paste this line
press the enter key, then type dir and see if we are where we need to be in the batchfiles directory
Then copy and paste this line
It's all one line, and assumes this project still exists.
That "should" run the compiler and create the .elf and .lst files (and others)
The compiler works with C file that Flowcode has already created.
Hope that helps
Leigh
I realise your patience is probably at its limit
But if you are up for trying this it might tell us more
Open a CMD (aka DOS) box, and copy and paste this line
Code: Select all
cd c:\Program Files\Flowcode 6\compilers\avr\batchfiles
Then copy and paste this line
Code: Select all
avra.bat atmega168 "C:\Users\Ted\Documents\FLOWCODE V6\TEST4.elf" "C:\Users\Ted\Documents\FLOWCODE V6\TEST4.c" "C:\Users\Ted\Documents\FLOWCODE V6\TEST4.lst"
That "should" run the compiler and create the .elf and .lst files (and others)
The compiler works with C file that Flowcode has already created.
Hope that helps
Leigh
- 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: AVR Compiler issues
This should be fine.Could it be something to do with the operating system? I am running Windows 7 Professional at 32 bits.
My test was on the vanilla 6.1.4.0 installation.My Flowcode V6 is version: 6.1.4.0, was there any patches supplied to address this problem maybe that I missed??
Further to Leighs suggestion, please can you try uninstalling Flowcode and installing this with a short path directory too. e.g. C:\FC6INST
This way the compiler and the source should be findable and should rule out any type of short path issues.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: AVR Compiler issues
Hi Ben and Leigh
EUREKA....................!!!!!!!!!!!!! The program is now working properly!!!
After uninstalling the Flowcode 6 program and creating a new FC6INST folder in C: as Ben suggested, I installed the program into this folder and activated it. I copied the TEST5.fcfx file into a folder called FC. After loading the program I ran the "Compile to Hex" function and it compiled it successfully.
So what I have learnt from this exercise is that the AVR compiler does not like the "Program Files" folder to house the Flowcode 6 program!!
The moment that "Program Files" forms part of the path to the batch file, it bombs out.
Thank you to both of you for sorting this out, it is greatly appreciated!!! You can both take a day off work, well done!!
Please also inform Alastair that the problem has been resolved, much appreciated.
Kind regards
Ted
EUREKA....................!!!!!!!!!!!!! The program is now working properly!!!
After uninstalling the Flowcode 6 program and creating a new FC6INST folder in C: as Ben suggested, I installed the program into this folder and activated it. I copied the TEST5.fcfx file into a folder called FC. After loading the program I ran the "Compile to Hex" function and it compiled it successfully.
So what I have learnt from this exercise is that the AVR compiler does not like the "Program Files" folder to house the Flowcode 6 program!!
The moment that "Program Files" forms part of the path to the batch file, it bombs out.
Thank you to both of you for sorting this out, it is greatly appreciated!!! You can both take a day off work, well done!!
Please also inform Alastair that the problem has been resolved, much appreciated.
Kind regards
Ted
Re: AVR Compiler issues
Hi Ben and Leigh
For what it is worth......I checked the Flowcode 6 and AVR compiler on my DELL desktop computer this morning, when compiling a program to HEX it worked first time.
So the problem was with my laptop which is a LENOVO Core 3i make and this was the problem all along and not your compiler!!!
Thanks again for all the assistance.
Regards
Ted
For what it is worth......I checked the Flowcode 6 and AVR compiler on my DELL desktop computer this morning, when compiling a program to HEX it worked first time.
So the problem was with my laptop which is a LENOVO Core 3i make and this was the problem all along and not your compiler!!!
Thanks again for all the assistance.
Regards
Ted