This is an automated email from the ASF dual-hosted git repository. kasjer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit e798ae1a715967bb705c325b59f985ba3958c1d3 Author: Jerzy Kasenberg <[email protected]> AuthorDate: Sun Oct 18 22:54:33 2026 +0200 compiler/xc32: Add setting for device family pack Starting with XC32 v5.00 device support files (startup code, linker scripts, processor libraries) are no longer included in the compiler. They come from device family packs and the DFP location has to be passed to the compiler with -mdfp=<path>. The path is machine specific, so it can't be hardcoded in compiler.yml. New setting XC32_DFP_FLAGS is added to compile, assemble and link flags. It can be set in target syscfg.yml, or when it is empty newt (with environment fallback for $(NAME) patterns) uses environment variable XC32_DFP_FLAGS. Default value is empty so XC32 versions before v5.00 are not affected. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Jerzy Kasenberg <[email protected]> --- compiler/xc32/compiler.yml | 6 +++--- compiler/xc32/{compiler.yml => syscfg.yml} | 29 ++++++++++------------------- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/compiler/xc32/compiler.yml b/compiler/xc32/compiler.yml index fb6635ca8..8c3d1e7ac 100644 --- a/compiler/xc32/compiler.yml +++ b/compiler/xc32/compiler.yml @@ -25,14 +25,14 @@ compiler.path.objdump: "xc32-objdump" compiler.path.objsize: "xc32-size" compiler.path.objcopy: "xc32-objcopy" -compiler.flags.base: [-std=gnu11, -fno-common, -mnewlib-libc, -ffunction-sections, -fdata-sections] +compiler.flags.base: [-std=gnu11, -fno-common, -mnewlib-libc, -ffunction-sections, -fdata-sections, $(XC32_DFP_FLAGS)] compiler.flags.default: [compiler.flags.base, -O2, -g3] compiler.flags.optimized: [compiler.flags.base, -O2, -g3] compiler.flags.speed: [compiler.flags.base, -O2, -g3] compiler.flags.debug: [compiler.flags.base, -Og, -g3] -compiler.as.flags: [-x, assembler-with-cpp] +compiler.as.flags: [-x, assembler-with-cpp, $(XC32_DFP_FLAGS)] -compiler.ld.flags: -nostartfiles -nostdlib -static-libgcc -lgcc -lm -lc-newlib -Wl,--gc-sections +compiler.ld.flags: -nostartfiles -nostdlib -static-libgcc -lgcc -lm -lc-newlib -Wl,--gc-sections $(XC32_DFP_FLAGS) compiler.ld.resolve_circular_deps: true compiler.ld.mapfile: true diff --git a/compiler/xc32/compiler.yml b/compiler/xc32/syscfg.yml similarity index 50% copy from compiler/xc32/compiler.yml copy to compiler/xc32/syscfg.yml index fb6635ca8..8e6b75908 100644 --- a/compiler/xc32/compiler.yml +++ b/compiler/xc32/syscfg.yml @@ -17,22 +17,13 @@ # under the License. # -compiler.path.cc: "xc32-gcc" -compiler.path.as: "xc32-gcc" -compiler.path.cpp: "xc32-g++" -compiler.path.archive: "xc32-ar" -compiler.path.objdump: "xc32-objdump" -compiler.path.objsize: "xc32-size" -compiler.path.objcopy: "xc32-objcopy" - -compiler.flags.base: [-std=gnu11, -fno-common, -mnewlib-libc, -ffunction-sections, -fdata-sections] -compiler.flags.default: [compiler.flags.base, -O2, -g3] -compiler.flags.optimized: [compiler.flags.base, -O2, -g3] -compiler.flags.speed: [compiler.flags.base, -O2, -g3] -compiler.flags.debug: [compiler.flags.base, -Og, -g3] - -compiler.as.flags: [-x, assembler-with-cpp] - -compiler.ld.flags: -nostartfiles -nostdlib -static-libgcc -lgcc -lm -lc-newlib -Wl,--gc-sections -compiler.ld.resolve_circular_deps: true -compiler.ld.mapfile: true +syscfg.defs: + XC32_DFP_FLAGS: + description: > + Additional XC32 options selecting the device family pack, e.g. + "-mdfp=/opt/microchip/PIC32MZ-EF_DFP/1.6.179". Starting with + XC32 v5.00 device support files are no longer included in the + compiler and the DFP location must be passed to the compiler. + The path is machine specific, so when this setting is empty + newt uses the environment variable with the same name instead. + value: ""
