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

New build menu to select optional features on chips with small flash #6244

Merged
merged 2 commits into from
Jun 13, 2023

Conversation

KevinOConnor
Copy link
Collaborator

Add a new "optional features" menu to "make menuconfig" for chips with limited code size (the atmega168, ar100, stm32f031, stm32f042, and pru). This menu allows a user to select optional code features (bitbanging support, display support, sensor support, software spi, and software i2c).

This fixes the build for the stm32f042, in that it allows users to disable software i2c support (or some other feature) to make the build fit within the chip flash again.

-Kevin

…h size

Add a new HAVE_LIMITED_CODE_SIZE symbol that enables a menu to select
optional features.  This symbol is enabled on chips with small build
sizes.

Replace the HAVE_GPIO_BITBANGING with four new symbols:
WANT_GPIO_BITBANGING, WANT_DISPLAYS, WANT_SENSORS, WANT_SOFTWARE_SPI,
and WANT_SOFTWARE_I2C.  This allows users a little more flexibility
when selecting features they need.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
@gdachs
Copy link

gdachs commented Jun 8, 2023

way better than my quick fix

@Zemistr
Copy link

Zemistr commented Jun 8, 2023

Tested with stm32f042x6 in Voron V0 display and works great.
To build the firmware I disabled software based features.

@Zemistr
Copy link

Zemistr commented Jun 8, 2023

@KevinOConnor Can you add also atmega328p and similar?

Maybe also options like:

  • CONFIG_WANT_I2C
  • CONFIG_WANT_SPI

@KevinOConnor KevinOConnor merged commit 6ce2bd6 into master Jun 13, 2023
2 checks passed
@KevinOConnor KevinOConnor deleted the work-buildsize-20230608 branch June 13, 2023 14:39
@KevinOConnor
Copy link
Collaborator Author

I committed this PR.

Can you add also atmega328p and similar?
Maybe also options like:

We can certainly add additional chips and additional options. I'd like to commit this first and look to add additional features later.

Cheers,
-Kevin

@github-actions github-actions bot locked and limited conversation to collaborators Jun 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants