Hello, I was trying to load the compiler hex code to a Uno R3, but it keeps bringing up the following error.
C:\Program Files (x86)\Flowcode\Compilers\avr\batchfiles\avra.bat reported error code 1
Can some please help in resolving this. Thank you.
compiler error message
- Steve
- Matrix Staff
- Posts: 3418
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: compiler error message
Please replace your "C:\Program Files (x86)\Flowcode\Compilers\avr\batchfiles\avra.bat" file with the one inside the ZIP file attached to this post, and then re-run the Flowcode compilation.
Post the contents of the "Compiler Messages" window here and hopefully we'll be able to see what the problem is.
Post the contents of the "Compiler Messages" window here and hopefully we'll be able to see what the problem is.
- Attachments
-
- avra.zip
- (366 Bytes) Downloaded 131 times
Re: compiler error message
Thanks Steve, I've done just as advised but the same error keeps propping up.
I have attached screenshot of the error message.
Many thanks
I have attached screenshot of the error message.
Many thanks
- Attachments
-
- Error.JPG (25.41 KiB) Viewed 4647 times
- Steve
- Matrix Staff
- Posts: 3418
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Re: compiler error message
Hi. I've attached a new batch file to you. Can you replace the other one and rerun compilation.
Also, please post the whole text of the window instead of a screenshot. You should be able to copy it out of the window, or find and attach the *.msg.txt file for your project (it can be found in the same folder as your saved project).
Thanks,
Steve.
BTW, I did a little research into the returned error code and it could be that Windows Defender or another antivirus is blocking the compilation process. You could try adding Flowcode and the GCC compiler location to their exception lists.
Also, please post the whole text of the window instead of a screenshot. You should be able to copy it out of the window, or find and attach the *.msg.txt file for your project (it can be found in the same folder as your saved project).
Thanks,
Steve.
BTW, I did a little research into the returned error code and it could be that Windows Defender or another antivirus is blocking the compilation process. You could try adding Flowcode and the GCC compiler location to their exception lists.
- Attachments
-
- avra.zip
- (373 Bytes) Downloaded 131 times
Re: compiler error message
Hello both.
Thanks for responding. Steve, I have turned off the windows defender and antivirus but the error keeps propping up. Please see below, the project.msg.txt file
Target folder: C:\Users\Alex\DOCUME~1\FLOWCO~1
Source name: C:\Users\Alex\Documents\Flowcode activities\LED blink.fcfx
Title:
Description:
Device: ARD.ATMEGA.ATMEGA328P
Generated by: Flowcode v8.2.2.15
Date: Tuesday, November 03, 2020 20:14:27
Users: 1
Registered to: ADainkeh
License key: D51XWE
NOT FOR COMMERCIAL USE
https://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Compilers\avr\batchfiles\avra.bat atmega328p "C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.elf" "C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c" "C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.lst"
C:\Users\Alex\DOCUME~1\FLOWCO~1>"C:\PROGRA~2\Flowcode\COMPIL~1\avr\BATCHF~1\..\bin\avr-gcc.exe" -mmcu=atmega328p -Os -ffunction-sections -fdata-sections -funsigned-char -o "C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.elf" "C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c" -lm -Wl,-gc-sections
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c: In function 'FCD_03d91_led_base1__TurnOn':
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c:158: error: 'FCP_TRIS_A' undeclared (first use in this function)
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c:158: error: (Each undeclared identifier is reported only once
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c:158: error: for each function it appears in.)
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c:158: error: 'FCP_PORT_A' undeclared (first use in this function)
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c: In function 'FCD_03d91_led_base1__TurnOff':
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c:176: error: 'FCP_TRIS_A' undeclared (first use in this function)
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c:176: error: 'FCP_PORT_A' undeclared (first use in this function)
An error was returned from [avr-gcc.exe]
C:\Program Files (x86)\Flowcode\Compilers\avr\batchfiles\avra.bat reported error code 1
Autoclose turned off
FINISHED
Regards
Thanks for responding. Steve, I have turned off the windows defender and antivirus but the error keeps propping up. Please see below, the project.msg.txt file
Target folder: C:\Users\Alex\DOCUME~1\FLOWCO~1
Source name: C:\Users\Alex\Documents\Flowcode activities\LED blink.fcfx
Title:
Description:
Device: ARD.ATMEGA.ATMEGA328P
Generated by: Flowcode v8.2.2.15
Date: Tuesday, November 03, 2020 20:14:27
Users: 1
Registered to: ADainkeh
License key: D51XWE
NOT FOR COMMERCIAL USE
https://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Compilers\avr\batchfiles\avra.bat atmega328p "C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.elf" "C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c" "C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.lst"
C:\Users\Alex\DOCUME~1\FLOWCO~1>"C:\PROGRA~2\Flowcode\COMPIL~1\avr\BATCHF~1\..\bin\avr-gcc.exe" -mmcu=atmega328p -Os -ffunction-sections -fdata-sections -funsigned-char -o "C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.elf" "C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c" -lm -Wl,-gc-sections
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c: In function 'FCD_03d91_led_base1__TurnOn':
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c:158: error: 'FCP_TRIS_A' undeclared (first use in this function)
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c:158: error: (Each undeclared identifier is reported only once
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c:158: error: for each function it appears in.)
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c:158: error: 'FCP_PORT_A' undeclared (first use in this function)
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c: In function 'FCD_03d91_led_base1__TurnOff':
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c:176: error: 'FCP_TRIS_A' undeclared (first use in this function)
C:\Users\Alex\DOCUME~1\FLOWCO~1\LED blink.c:176: error: 'FCP_PORT_A' undeclared (first use in this function)
An error was returned from [avr-gcc.exe]
C:\Program Files (x86)\Flowcode\Compilers\avr\batchfiles\avra.bat reported error code 1
Autoclose turned off
FINISHED
Regards
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: compiler error message
Hi Adainkeh,
It may be a bug,
But that could also happen if not assigned a component to the correct pins.
E.g a component is assigned to port A2, then you change a target device that does not have port A e.g, your Atmega 238
If the component pin is not changed you will see that error.
ore you have added component like LED and not changed it's pin connection
Can you look at the properties of led_base1 and check the pin connection.
You may find its nor correct?
If you are not sure then post flowchart and I can check it for you.
It may be a bug,
But that could also happen if not assigned a component to the correct pins.
E.g a component is assigned to port A2, then you change a target device that does not have port A e.g, your Atmega 238
If the component pin is not changed you will see that error.
ore you have added component like LED and not changed it's pin connection
Can you look at the properties of led_base1 and check the pin connection.
You may find its nor correct?
If you are not sure then post flowchart and I can check it for you.
Martin