Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 8 months ago.
flash_algo_gen.py python compiler problem
Traceback (most recent call last):
File "flash_algo_gen.py", line 158, in <module>
gen_flash_algo()
File "flash_algo_gen.py", line 110, in gen_flash_algo
run_cmd([FROMELF, 'bin', ALGO_ELF_PATH, '-o', TMP_DIR_W_TERM])
File "C:\Users\dell690\Desktop\CMSIS-DAP-master\CMSIS-DAP-master\tools\utils.p
y", line 25, in run_cmd
p = Popen(command, stdout=PIPE, stderr=PIPE, cwd=wd)
File "C:\Python27\lib\subprocess.py", line 709, in init
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 957, in _execute_child
startupinfo)
WindowsError: [Error 2] Impossibile trovare il file specificato
how can I fix this? How you use the file.txt ????
thanks best regards
Question relating to:
2 Answers
10 years, 8 months ago.
Hello Sacchetti Giampaolo,
the error is caused by not setting the path for fromelf (part of uvision installation). Please provide own private_settings.py file, where you set at least this 2 variables:
FROMELF = r'c:\\Keil\\ARM\\ARMCC\\bin\\fromelf.exe' UV4 = r'C:\Keil\UV4\UV4.exe'
The scripts are not documented yet, many changes were there added lately, therefore we should update and expand it.
Regards, 0xc0170
C:\Users\dell690\Desktop\CMSIS-DAP-master\CMSIS-DAP-master\tools>C:\Python27\pyt hon.exe flash_algo_gen.py
[WARNING] Using default settings. Define your settings in the file private_setti ngs.py
Traceback (most recent call last): File "flash_algo_gen.py", line 154, in <module> gen_flash_algo()
File "flash_algo_gen.py", line 110, in gen_flash_algo
run_cmd([FROMELF, 'bin', ALGO_ELF_PATH, '-o', TMP_DIR_W_TERM])
File "C:\Users\dell690\Desktop\CMSIS-DAP-master\CMSIS-DAP-master\tools\utils.p y", line 30, in run_cmd
raise Exception('"%s" returned %d\n%s' % (' '.join(command), rc, stderr))
Exception: "C:\Keil_v5\ARM\ARMCC\bin\fromelf.exe bin C:\Users\dell690\Desktop\
CMSIS-DAP-master\CMSIS-DAP-master\tools\tmp\flash_algo.axf -o C:\Users\dell690\D
esktop\CMSIS-DAP-master\CMSIS-DAP-master\tools\tmp/" returned 1
"C:\Users\dell690\Desktop\CMSIS-DAP-master\CMSIS-DAP-master\tools\tmp\flash_algo
.axf": Error: Q0122E: Could not open file 'C:\Users\dell690\Desktop\CMSIS-DAP-ma
ster\CMSIS-DAP-master\tools\tmp\flash_algo.axf': No such file or directory
Finished: 0 information, 0 warning and 1 error messages.
Hello Sacchetti Giampaolo, please share what arguments did you use to execute the python script?? Use '
posted by Martin Kojtal 26 May 2014<<code>> <</code>>
' to share the outputs from the console.(my shell script)
C:\Users\dell690\Desktop\CMSIS-DAP-master\CMSIS-DAP-master\tools>c:\Python27\pyt hon.exe flash_algo_gen.py
(out compiler python error)
[WARNING] Using default settings. Define your settings in the file private_setti ngs.py Traceback (most recent call last): File "flash_algo_gen.py", line 154, in <module> gen_flash_algo() File "flash_algo_gen.py", line 110, in gen_flash_algo run_cmd([FROMELF, '
posted by Sacchetti Giampaolo 27 May 2014bin', ALGO_ELF_PATH, '-o', TMP_DIR_W_TERM]) File "C:\Users\dell690\Desktop\CMSIS-DAP-master\CMSIS-DAP-master\tools\utils.p y", line 25, in run_cmd p = Popen(command, stdout=PIPE, stderr=PIPE, cwd=wd) File "c:\Python27\lib\subprocess.py", line 709, in init errread, errwrite) File "c:\Python27\lib\subprocess.py", line 957, in _execute_child startupinfo) WindowsError: [Error 2] Impossibile trovare il file specificatomy python script, best regards
posted by Sacchetti Giampaolo 27 May 2014Hello,
what target are you trying to build? You are using default settings, have you checked that your KEIL installation matches the path which is set by default in scripts?
posted by Martin Kojtal 27 May 2014Hello 0xc0170 I want to build the target KL46Z. How to config settings.
posted by zhang shengping 12 Dec 2014