Skip to content

per sketch / project build folders and incremental builds #281

@ag88

Description

@ag88

Is your feature request related to a problem? Please describe.
the use of /tmp or temp folders for build output is a bad idea, novice users do not know where the built object files and built output binary files (i.e. the built firmware) is left in. and novice users end up hitting the forums asking where is my bin file so that i can run my 'favourite' flasher tool to flash my firmware. firmware installation is also 'problematic' as it often depends on driver stacks e.g. for windows. it is better to leave this procedure visible to the user so that they can find the bin/firmware file and they can use their favourite tools of their choice to install the firmware themselves. the other thing is that it isn't always necessary to fire up Arduino IDE just to install a firmware. the common way is to find the bin file and flash away.

there are cores ,notably Arm based that evaluate a large number of c, cpp and .h files say in the hundred of megs of sources and files, parsing a huge number of if-defs the purpose of which is to reduce that to a single permutation of soc, board, variant.
the build takes say like 5 minutes on a slow machine for the initial build and the built bin file is a mere 10k bytes. think of it as just trying to blink the led. if that tmp or temp folder gets cleared, say when the os does some housekeeping, that whole 5 minutes wait for the build repeats all over again to get that same 10k bytes bin file.

Describe the solution you'd like
arduino-cli already has --output-dir or build folders, this should be a explicit configurable per sketch / project folder say a 'build' or 'bin' directory in each sketch folder. this feature has been 'missing' too long while I resort to using makefiles, eclipse etc.

Describe alternatives you've considered
makefiles and eclipse uses per project bin or build folders. it has been that way all along

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions