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

[Controller] Added board config for custom controller STeMCell (updated) #17870

Closed
wants to merge 21 commits into from

Conversation

sadekbaroudi
Copy link
Contributor

Description

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@sadekbaroudi
Copy link
Contributor Author

This pull request is based on the previous pull request by @Mariappan ( #16287 )

I have updated it to latest develop, and added a commit to support the changes to pindefs. I have tested on a few fingerpunch keyboards using the stemcell.

Copy link
Contributor

@keyboard-magpie keyboard-magpie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been using this with a stemcell for the last week, without issue. RGB features and i2c pointing device included. EEPROM features appear to be working appropriately although have not tested VIA only lighting options.

The PR, I believe, addresses all the issues raised in the "stuck" PR #16287 , but I am unsure of the etiquette surrounding merging this ahead of the stuck PR.

@sadekbaroudi
Copy link
Contributor Author

Oh, just to explicitly note, some of the objections in the last PR were addressed by creating this feature: #16598

I am also leveraging this so we don't need to use the STMC=yes and can instead use the standardized CONVERT_TO=stemcell

Copy link
Member

@zvecr zvecr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the changes still fall under the same issues as #17711, where specifying the full board/chibos config files wants to be avoided.

For EEPROM, it would be to avoid STEMCELL_tinyuf2 linker script and be solved more generically for BOOTLOADER = tinyuf2

Comment on lines +5 to +7
# ifndef SERIAL_USART_DRIVER
# define SERIAL_USART_DRIVER SD2
# endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesnt belong in pin defs

Suggested change
# ifndef SERIAL_USART_DRIVER
# define SERIAL_USART_DRIVER SD2
# endif

Comment on lines +51 to +54

#define I2C1_SCL_PIN D0
#define I2C1_SDA_PIN D1
#define FEE_PAGE_BASE_ADDRESS 0x08008000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesnt belong in pin defs

Suggested change
#define I2C1_SCL_PIN D0
#define I2C1_SDA_PIN D1
#define FEE_PAGE_BASE_ADDRESS 0x08008000

@sadekbaroudi
Copy link
Contributor Author

Some of the changes still fall under the same issues as #17711, where specifying the full board/chibos config files wants to be avoided.

For EEPROM, it would be to avoid STEMCELL_tinyuf2 linker script and be solved more generically for BOOTLOADER = tinyuf2

For reference, I assume this conversation is relevant, so linking it here:
#16287 (comment)

I don't know enough about how this part of the codebase works, so deferring to @Mariappan to chime in.

As a side note, I'm happy to contribute and/or fix myself, but some more detailed guidance would be very helpful!

@sigprof
Copy link
Contributor

sigprof commented Aug 2, 2022

The EEPROM emulation should work with BOOTLOADER = tinyuf2 if you use

EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = legacy

(WEAR_LEVELING_DRIVER = embedded_flash currently does not support F4x1 chips.)

STEMCELL_tinyuf2.ld does not seem to be needed — it's effectively the same as STM32F401xC_tinyuf2.ld (and if the real chip is F411, the RAM size is wrong), except it also defines flash regions for the bootloader and EEPROM backing store, but those regions are not actually used anywhere.

Board config should be inherited from a ChibiOS definition, like in GENERIC_STM32_F411XE; the only problem is mcuconf.h, which is also copied in full in existing converters like QMK_PM2040, so this one may need to remain as is for now.

@sadekbaroudi
Copy link
Contributor Author

@Mariappan has started working on #16287 again, so I'll stop using this PR, and defer to that one. If it's okay, I'll keep this one open until that one gets merged in. But for now, this one is on pause.

Please let me know if anyone has any objections to this.

@zvecr
Copy link
Member

zvecr commented Aug 14, 2022

replaced by #16287

@zvecr zvecr closed this Aug 14, 2022
@sadekbaroudi sadekbaroudi deleted the stemcell_megamind branch September 21, 2022 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants