@max ( hab Dir zwei PM geschrieben )
@stefan
Betrifft :
windows 7
windows 8
windows 8.1
es kann sein, dass neuere Windows ein Problem haben mit der Umgebungsvariable %~dp0
wenn Flowcode 6 im Verzeichnis
C:\Program Files (x86)\Flowcode 6\
installiert wurde:
zwei Batch files zum testen.
Inhalt der modifizierten "avra.bat" MOD_avra.bat
Code: Select all
@echo off
REM Changed by Rudi 15.August 2014
REM Problem with Windows 7, 8, 8.1
REM Changed the Enviroment to direct Folder
Rem =======================================
REM Original
REM "%~dp0..\bin\avr-gcc.exe" -mmcu=%1 -Os -funsigned-char -o %2 %3 -lm
REM ===================================================================
REM WINDOWS 7... 8 / 8.1
REM IF Flowcode 6 and all the subfolders is installed in
REM C:\Program Files (x86)\Flowcode 6\
REM So change the %~dp0 to C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\
@echo on
"C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\..\bin\avr-gcc.exe" -mmcu=%1 -Os -funsigned-char -o %2 %3 -lm
@IF %ERRORLEVEL% NEQ 0 GOTO Error1
@echo off
REM Original
REM "%~dp0..\bin\avr-objdump.exe" -S %2 > %4
REM ========================================
REM Windows 7...8 / 8.1
REM See Top where Flowcode 6 and all subfolders are installed..
REM change the %~dp0.. again
@echo on
"C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\..\bin\avr-objdump.exe" -S %2 > %4
@IF %ERRORLEVEL% NEQ 0 GOTO Error2
@echo off
REM original
REM "%~dp0..\bin\avr-size.exe" -B -d %2
REM ===================================
REM Windows 7...8 / 8.1
REM See Top where Flowcode 6 and all subfolders are installed..
REM change the %~dp0.. again
@echo on
"C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\..\bin\avr-size.exe" -B -d %2
@ECHO.
@ECHO Compilation successful!
@GOTO End
:Error1
@ECHO.
@ECHO Error returned from [avr-gcc.exe]
@EXIT 1
:Error2
@ECHO.
@ECHO Error returned from [avr-objdump.exe]
@EXIT 1
:End
@EXIT 0
Inhalt der modifizierten "avrb.bat" MOD_avrb.bat
Code: Select all
@echo off
REM Changed by Rudi 15.August 2014
REM Problem with Windows 7, 8, 8.1
REM Changed the Enviroment to direct Folder
Rem =======================================
REM Original
REM "%~dp0..\bin\avr-objcopy" -O ihex -R .eeprom %1 %2
REM ===================================================================
REM WINDOWS 7... 8 / 8.1
REM IF Flowcode 6 and all the subfolders is installed in
REM C:\Program Files (x86)\Flowcode 6\
REM So change the %~dp0 to C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\
@echo on
"C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\..\bin\avr-objcopy" -O ihex -R .eeprom %1 %2
@IF %ERRORLEVEL% NEQ 0 GOTO HexError
@ECHO.
@ECHO HEX file creation successful!
@echo off
REM original
REM "%~dp0..\bin\avr-objcopy" -O coff-avr -R .eeprom %1 %3
REM ===================================================================
REM WINDOWS 7... 8 / 8.1
REM IF Flowcode 6 and all the subfolders is installed in
REM C:\Program Files (x86)\Flowcode 6\
REM So change the %~dp0 to C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\
@echo on
"C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\..\bin\avr-objcopy" -O coff-avr -R .eeprom %1 %3
@IF %ERRORLEVEL% NEQ 0 GOTO CoffError
@ECHO.
@ECHO COFF file creation successful!
@GOTO End
:HexError
@ECHO.
@ECHO Hex error returned from [avr-objcopy.exe]
@EXIT 1
:CoffError
@ECHO.
@ECHO Coff error returned from [avr-objcopy.exe]
@EXIT 1
:End
@EXIT 0
Die beiden Batch Files im Ordner von batchfiles im installierten Flowcode 6 Verzeichnis kopieren
Dann unter Build - > Compiler Optionen
Batch Datei MOD_avra.bat
unter dem Reiter "Compiler" im Ort entweder direkt samt Pfad eintragen oder über Auswahl Button suchen
Batch Datei MOD_avrb.bat
unter dem Reiter "Linker / Assembler" im Ort entweder direkt samt Pfad eintragen oder über Auswahl Button suchen
Das Testprojekt dann erst mal nur compilieren zu Hex.
Es sollte dann im Testprojekt Ordner das hex file stehen
..
Download zum Device folgt dann mit der dritten Batch Datei.
Sagt bitte Bescheid, wie ihr voran kommt.
Danke!
LG
Rudi
@max ( i wrote you 2 PM )
@stefan
because..
windows 7
windows 8
windows 8.1
it can be, that newer win make issuess with the enviroment's %~dp0
this mod is .. if Flowcode installed in
C:\Program Files (x86)\Flowcode 6\
other please have a look into the batch files.. it is commented.
attached two moded batch files for test..
MOD_avra.bat
MOD_avrb.bat
copy the two batch files in the folder of flowcodes batchfile folder,
exampe here
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\
Then under Buld -> Comiler Option
Batch Datei MOD_avra.bat
under the tab "Compiler" in Place write direct with folder or search over button the batch file and select it..
Batch Datei MOD_avrb.bat
under the tab "Linker / Assembler " in Place write direct with folder or search over button the batch file and select it.
a Simple testproject / empty projekt only compile to hex.
it must make a hex file in your test folder..
..
Download to Device ( batch 3 ) is comming soon..
Please tell me, how you get on..
Thank you!
Have a nice holiday today ( germany is holdiday day
)
Best wishes
Rudi