qmk_firmware icon indicating copy to clipboard operation
qmk_firmware copied to clipboard

Fixed issue flash size on Handwired K552 keyboard

Open HorrorTroll opened this issue 4 years ago • 5 comments

Description

It was mistake to use ldscript from STM32F103x8, instead using STM32F103xC. So the flash size was limited at 64kb, while it should be 256kb

Types of Changes

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

Checklist

  • [x] My code follows the code style of this project: C, Python
  • [x] 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.
  • [x] I have read the CONTRIBUTING document.
  • [ ] I have added tests to cover my changes.
  • [x] I have tested the changes and verified that they work and don't break anything (as well as I can manage).

HorrorTroll avatar Jan 28 '22 06:01 HorrorTroll

As far as I can tell, you can do all of this in a much simpler way.

  • Remove the custom board files (i.e. boards/STM32_F103XC_STM32DUINO in its entirety)
  • Swap board to the normal STM32duino: BOARD = STM32_F103_STM32DUINO
  • Remove the other customisations in the rules.mk apart from the MCU_LDSCRIPT
  • Add a keyboard-level board.h file with the content:
#pragma once
#include_next <board.h>
#undef STM32F103xB
#define STM32F103xE
  • Add a validation inside handwired_k552.c:
#ifndef STM32F103xE
#error "Should be building for F103xE but wasn't!"
#endif

tzarc avatar Mar 05 '22 05:03 tzarc

Ignore the change to target develop; I saw board files and automatically assumed it was a core modification.

tzarc avatar Mar 05 '22 10:03 tzarc

Thank you for your contribution! This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready. For maintainers: Please label with awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

stale[bot] avatar Jun 12 '22 13:06 stale[bot]

Just pushed an updated code, testing and working normally

HorrorTroll avatar Jun 13 '22 06:06 HorrorTroll

Thank you for your contribution! This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready. For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

github-actions[bot] avatar Jul 29 '22 02:07 github-actions[bot]

Closed

HorrorTroll avatar Aug 14 '22 03:08 HorrorTroll