aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2019-10-13 22:50:27 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2019-10-14 09:23:56 +0000
commit211f0bc135b08a8d9cce96b8d89b0a1c8fd24f2f (patch)
treec645da98d1789a0f447afae0a32e68b3ed70b862
parent66acd20eb4ce50755d5dc1ad05f09de1dbfbd88c (diff)
baremetal: Show full details of KEIL A51 errors
A problem is that a first lines of the following errors: 0000 24 ljmp usb_stub_isr ; (00) Setup data available. *** ________________________________________^ *** ERROR #A45 IN 24 (autovec_keil.a51, LINE 24): UNDEFINED SYMBOL 002C 46 ljmp usb_stub_isr ; (2C) EP1 out. *** _____________________________________^ *** ERROR #A45 IN 46 (autovec_keil.a51, LINE 46): UNDEFINED SYMBOL are ignored, becaue it does not match with the expected token. It does not expect that a line starts with a four hexadecimal letters. We can fix it using the regexp, like "^([0-9A-F]{4})" which is covered this use-case. Fixes: QBS-1503 Change-Id: I19c535ac1aa12bd3e8ffa33ad6c2abfa42d66dff Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--share/qbs/modules/cpp/keil.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/share/qbs/modules/cpp/keil.js b/share/qbs/modules/cpp/keil.js
index f68905324..dd73b375e 100644
--- a/share/qbs/modules/cpp/keil.js
+++ b/share/qbs/modules/cpp/keil.js
@@ -318,6 +318,10 @@ function filterStdOutput(cmd) {
|| sourceLines[i].startsWith("LOC OBJ LINE SOURCE")
) {
filteredLines.push(sourceLines[i]);
+ } else {
+ var regexp = /^([0-9A-F]{4})/;
+ if (regexp.exec(sourceLines[i]))
+ filteredLines.push(sourceLines[i]);
}
}
return filteredLines.join("\n");