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 alternate ldscript for STM32duino (F103xB) #12914

Merged
merged 3 commits into from
Aug 17, 2021

Conversation

fauxpark
Copy link
Member

@fauxpark fauxpark commented May 16, 2021

Description

Factored out the common code in the STM32duino ldscript. The search path to find the common ldscript needs to be added to LDFLAGS; I have only done this for the case where MCU_LDSCRIPT is found in $(TOP_DIR)/platforms/chibios/$(BOARD).

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

@fauxpark fauxpark requested a review from a team May 16, 2021 02:07
@drashna drashna requested a review from a team May 16, 2021 02:22
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.

Lots of duplication to change just a single value, but I suppose that you want this to look exactly like ChibiOS, where no common parts are factored out in .ld files.

bootloader.mk Outdated Show resolved Hide resolved
@stale
Copy link

stale bot commented Jul 1, 2021

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.

@fauxpark fauxpark force-pushed the stm32duino-alt-ldscript branch from a835d8d to f780b77 Compare July 17, 2021 11:54
@fauxpark
Copy link
Member Author

Lots of duplication to change just a single value, but I suppose that you want this to look exactly like ChibiOS, where no common parts are factored out in .ld files.

I guess it could be done that way. I haven't really looked into how to write ldscripts.

@fauxpark
Copy link
Member Author

fauxpark commented Jul 17, 2021

Hm, I'm trying to do this:

f103_flash_size = 64k

INCLUDE stm32duino_bootloader_common.ld

And the linker is giving me a syntax error on the INCLUDE...

Never mind, apparently I was missing a semicolon. It seems to work now but it requires adding this to chibios.mk:

LDFLAGS += -L$(TOP_DIR)/platforms/chibios/common/ld

@fauxpark fauxpark removed the on hold label Jul 17, 2021
@fauxpark fauxpark requested a review from sigprof July 24, 2021 07:11
@fauxpark fauxpark changed the base branch from master to develop August 15, 2021 05:24
@tzarc tzarc merged commit 37496f4 into qmk:develop Aug 17, 2021
@fauxpark fauxpark deleted the stm32duino-alt-ldscript branch August 17, 2021 22:41
nhongooi pushed a commit to nhongooi/qmk_firmware that referenced this pull request Dec 5, 2021
* Add alternate ldscript for STM32duino (F103xB)

* Refactor out common ldscript stuff

* Move ldscripts into stm32duino board dir, add search path to ldflags
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* Add alternate ldscript for STM32duino (F103xB)

* Refactor out common ldscript stuff

* Move ldscripts into stm32duino board dir, add search path to ldflags
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.

4 participants