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 basic support for lpc11uxx #21743

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

crashniels
Copy link

Description

Same as title. This will allow boards to compile for the lpc11uxx series MCUs.
Currently requires qmk-develop branch in ChibiOS-Contrib for ChibiOS/ChibiOS-Contrib#366.

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).

@sigprof sigprof changed the base branch from master to develop August 12, 2023 17:55
@sigprof
Copy link
Contributor

sigprof commented Aug 12, 2023

Changes like this should target the develop branch.

@drashna drashna requested a review from a team August 12, 2023 18:17
Copy link
Contributor

@sigprof sigprof left a comment

Choose a reason for hiding this comment

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

The latest example of adding support for a new MCU is probably #21352; some more updates are needed to add support properly:

  • data/schemas/keyboard.jsonschema (add the MCU name to the list of allowed names)
  • docs/compatible_microcontrollers.md
  • keyboards/handwired/onekey/: add a new onekey board for a suitable development board having that MCU
  • platforms/chibios/mcu_selection.mk: add the appropriate makefile section
  • platforms/chibios/bootloaders/: probably a new bootloader interface file would be needed there
  • platforms/chibios/boards/: you may need to add a new board there with at least mcuconf.h set up according to the QMK conventions (all peripherals except USB should be disabled by default)

branch = master
branch = qmk-develop
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to update this file (submodule updates refer to some specific commits anyway).

lib/chibios Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

This update looks like a revert for the current state of the develop branch; you should rebase your changes to develop and drop the lib/chibios submodule update.

Copy link
Contributor

Choose a reason for hiding this comment

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

Apparently the develop branch already has the same version of the lib/chibios-contrib submodule; you should rebase your changes to develop and drop this update.

Comment on lines +296 to +298
#if defined(MCU_LPC)
// GPIO Port 0
# define P0_0 PAL_LINE(IOPORT0, 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably be handled like https://github.com/qmk/qmk_firmware/blob/develop/platforms/chibios/vendors/RP/_pin_defs.h instead of creating a file full of platform ifdefs.

Comment on lines +321 to +322
# define P0_23 PAL_LINE(IOPORT0, 23)
// GPIO Port 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the whole LPC family have only pins 0…23 on P0, or is that specific to a particular chip in that family?

Copy link
Author

Choose a reason for hiding this comment

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

The other chips have the same amount or less in that family. It depends on the size of the chip.

Following qmk conventions and adding a handwired board and related so it can compile.
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.

None yet

2 participants