-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description
- Type: Bug
- Related issue:
#abc
- Priority: Minor
Bug
Target
K64F
Toolchain:
GCC_ARM
Toolchain version:
4_9-2015q3
mbed-cli version:
0.9.10
meed-os sha:
e2617cc
Expected behavior
Failed compilation should not propagate to next compilation attempt
Actual behavior
In some circumstances, a failed compilation results in the next "mbed compile" reporting
...
Scan: mbed
Scan: env
[ERROR] list index out of range
[mbed] ERROR: "python" returned error code 1.
Steps to reproduce
Ah, you've got me there! I haven't been able to determine the exact circumstances. What I have found is that somehow a .d file may be left empty after a failed compilation. In one example, the error was a missing include file referenced by main.cpp, but the file BUILD/K64F/GCC_ARM/mbed-os/events/equeue/equeue_mbed.d was left empty.
When an empty .d file is present, GCC.parse_dependencies in tools/toolschains/gcc,py falls over when trying to access the first line of the file.