import qbs Stm32Product { type: ["application", "bin"] consoleApplication: true qbs.architecture: "armv4t" cpp.positionIndependentCode: false cpp.defines: { base.push("HSE_VALUE=((uint32_t)24000000)"); return base; } Properties { // Настройки Debug condition: cpp.debugInformation cpp.defines: outer.concat("DEBUG") cpp.optimization: "none" // всюду делаем small } // а это для релиза cpp.optimization: "small" Rule { id: bin inputs: ["application"] Artifact { fileTags: ["bin"] filePath: product.name + ".bin" } prepare: { console.info("qbs.installRoot: "+ qbs.installRoot); console.info("project.path: "+project.path); var args = ["-O", "binary", input.filePath, output.filePath]; var cmd = new Command("arm-none-eabi-objcopy", args); cmd.description ="converting to bin: "; cmd.highlight = "linker"; return cmd; } } Group { qbs.install: true qbs.installDir: DeployPath fileTagsFilter: ["bin"] } }