Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fuse bits override for AVR MCUs #2295

Closed
3 tasks done
freeman401 opened this issue Nov 29, 2023 · 1 comment
Closed
3 tasks done

Add fuse bits override for AVR MCUs #2295

freeman401 opened this issue Nov 29, 2023 · 1 comment
Assignees
Labels
conclusion: declined Will not be worked on type: enhancement Proposed improvement

Comments

@freeman401
Copy link

Describe the request

Sometimes existing board settings are not enough when using bare MCU and programmer. And editing 'boards.txt' is really inconvenient.
Would it be possible to add some kind of a custom preprocessor directive to explicitly set fuse bits in code?
For example:
#setfusel 0x12
#setfuseh 0x34
#setfusee 0x56
Or even to modify them like so:
#setfusel BOARDFUSEL | 0x01
#setfuseh BOARDFUSEH & 0xFA

If it is not feasible or really tricky to implement, then perhaps one of these ideas might work:

  • Add support for a local 'boards.txt' file in the project folder that will extend and/or override the main one.
  • Add a button to the tools menu or board manager that opens 'boards.txt' in the editor.
  • Add official support for every single bare AVR MCU and make a fuse bit configuration utility 😁

Describe the current behavior

Possible fuse bits configurations are limited by the board author.

Arduino IDE version

2.2.2-nightly-20231127

Operating system

Windows

Operating system version

10

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details
@freeman401 freeman401 added the type: enhancement Proposed improvement label Nov 29, 2023
@per1234 per1234 self-assigned this Nov 29, 2023
@per1234
Copy link
Contributor

per1234 commented Nov 29, 2023

Hi @freeman401. Thanks for your suggestion. Changing fuse bits from the sketch program is not possible at a fundamental technical level so this can not be implemented.

Even if you find editing boards.txt to be inconvenient, it is an inconvenience that only needs to be suffered once, and that only by a small number of very advanced users. If any significant number of users has the need for such a configuration, one of them is sure to create a custom boards platform so that the rest of the community can avoid the need to make the customizations manually. So I don't think the inconvenience is something to be concerned about.

If you are doing it frequently then this indicates you are taking an inefficient approach to accomplishing your goal. If so, we would be happy to suggest an improved approach if you ask over on Arduino Forum:

https://forum.arduino.cc/

Add support for a local 'boards.txt' file in the project folder that will extend and/or override the main one.

This was requested previously and declined by the developers as unnecessary: arduino/arduino-cli#1684

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2023
@per1234 per1234 added the conclusion: declined Will not be worked on label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: declined Will not be worked on type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants