Skip to content

Commit

Permalink
feat: #209 Added an option to set the amount of concurrent jobs while…
Browse files Browse the repository at this point in the history
… running make
  • Loading branch information
jortbmd committed Dec 23, 2024
1 parent d9ee8cd commit 6caedf8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
### Added
- Issue #206: Did not build anything else than elf files due to the all recipe not being correct.
- Issue #212: On Windows threw an error because the build folder was already there. Now checks before using the md command. Thanks to: qwertym88
- Issue #209: Added an option to set the amount of concurrent jobs while running make

### Fixed
- Reverted to single name build instead of a file tree based build output.
- Linkerscript now uses a file for the objects it needs to link to prevent Windows based command line length issues.
- Linkerscript now uses a file for the objects it needs to link to prevent Windows based command line length issues. Fixes issue #210
- Issue #217 when using a number as the target it is converted to a number in the yaml spec. Now convert it to a string to prevent this.

## [3.2.8] - 2024-09-05
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@
"default": "",
"description": "Path to the make executable (e.g. make or ~/usr/bin/make), will use the one in PATH as standard."
},

"stm32-for-vscode.makeConcurrentJobs": {
"type": "number",
"default": "16",
"description": "The amount of concurrent jobs make is allowed to do."
},
"stm32-for-vscode.armToolchainPath": {
"type": "string",
"default": "",
Expand Down
6 changes: 5 additions & 1 deletion src/BuildTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import * as path from 'path';

import {
EXTENSION_CONFIG_NAME,
MAKE_DEFAULT_CONCURRENT_JOBS,
makefileName,
STM32_ENVIRONMENT_FILE_NAME,
} from './Definitions';
Expand Down Expand Up @@ -173,7 +174,10 @@ export default async function buildSTM(options?: { flash?: boolean; cleanBuild?:
info = await getInfo(currentWorkspaceFolder);
await createSTM32EnvironmentFileWhenRequired(info.tools);
const makeFlags = info.makeFlags.length > 0 ? ` ${info.makeFlags.join(' ')}` : '';
const makeArguments = `-j16${makeFlags} -f ${makefileName}`;
const extensionConfiguration = workspace.getConfiguration('stm32-for-vscode');
const concurrentJobs = extensionConfiguration.get('makeConcurrentJobs', MAKE_DEFAULT_CONCURRENT_JOBS);

const makeArguments = `-j${concurrentJobs}${makeFlags} -f ${makefileName}`;
if (cleanBuild) {
try {
await executeTask(
Expand Down
1 change: 1 addition & 0 deletions src/Definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ export const TOOL_SETTINGS = {
openOCDInterface: 'openOCDInterface',
};
export const GITHUB_ISSUES_URL = 'https://github.com/bmd-studio/stm32-for-vscode/issues';
export const MAKE_DEFAULT_CONCURRENT_JOBS = 16;

0 comments on commit 6caedf8

Please sign in to comment.