Skip to content

Commit 57c8c5b

Browse files
Log messages about the platforms used in compilation
This should help debugging problems based on verbose compilation output, especially if third-party boards and/or cores are involved. For example, this might output: Using board 'pinoccio' from platform in folder: /path/to/sketchbook/hardware/pinoccio/avr Using core 'arduino' from platform in folder: /path/to/arduino/hardware/arduino/avr Signed-off-by: Matthijs Kooijman <[email protected]>
1 parent 231a80b commit 57c8c5b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/arduino.cc/builder/constants/constants.go

+2
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ const MSG_UNHANDLED_TYPE_IN_CONTEXT = "Unhandled type {0} in context key {1}"
177177
const MSG_UNKNOWN_SKETCH_EXT = "Unknown sketch file extension: {0}"
178178
const MSG_USING_LIBRARY_AT_VERSION = "Using library {0} at version {1} in folder: {2} {3}"
179179
const MSG_USING_LIBRARY = "Using library {0} in folder: {1} {2}"
180+
const MSG_USING_BOARD = "Using board '{0}' from platform in folder: {1}"
181+
const MSG_USING_CORE = "Using core '{0}' from platform in folder: {1}"
180182
const MSG_USING_PREVIOUS_COMPILED_FILE = "Using previously compiled file: {0}"
181183
const MSG_WARNING_LIB_INVALID_CATEGORY = "WARNING: Category '{0}' in library {1} is not valid. Setting to '{2}'"
182184
const MSG_WARNING_PLATFORM_MISSING_VALUE = "Warning: platform.txt from core '{0}' misses property '{1}', using default value '{2}'. Consider upgrading this core."

src/arduino.cc/builder/target_board_resolver.go

+5
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ func (s *TargetBoardResolver) Run(ctx *types.Context) error {
100100
actualPlatform = targetPlatform
101101
}
102102

103+
if ctx.Verbose {
104+
logger.Println(constants.LOG_LEVEL_INFO, constants.MSG_USING_BOARD, targetBoard.BoardId, targetPlatform.Folder)
105+
logger.Println(constants.LOG_LEVEL_INFO, constants.MSG_USING_CORE, core, actualPlatform.Folder)
106+
}
107+
103108
ctx.BuildCore = core
104109
ctx.ActualPlatform = actualPlatform
105110

0 commit comments

Comments
 (0)