From 211f0bc135b08a8d9cce96b8d89b0a1c8fd24f2f Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Sun, 13 Oct 2019 22:50:27 +0300 Subject: 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 --- share/qbs/modules/cpp/keil.js | 4 ++++ 1 file changed, 4 insertions(+) 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"); -- cgit v1.2.3