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

[WIP] Makefile patches #19633

Closed
wants to merge 6 commits into from
Closed

[WIP] Makefile patches #19633

wants to merge 6 commits into from

Conversation

SamantazFox
Copy link
Contributor

Requirements

Building Marlin without the Arduino IDE

Description

Multiple fixes on the Makefile, so Marlin can be properly built without the Arduino IDE
(i.e, only with the core(s) and the source files)

Benefits

  • Marlin can be properly built without the Arduino IDE nor PlatformIO
  • Some common Makefile bugs are fixed

Related Issues

None found

change the default board to BOARD_RAMPS_14_EFB (1020) in the Makefile to avoid
the following error message on a clean build (no variables given to make):

src/pins/pins.h:743:6: error: \#error "Unknown MOTHERBOARD value set in Configuration.h"
     \#error "Unknown MOTHERBOARD value set in Configuration.h"
      ^
Disable these two libraries because they're not provided with Arduino nor Marlin
by default, so a no-arguments `make` simply fails.
Tone.cpp (from ADRUINO_DIR/hardware/arduino/avr/cores/arduino/) is required when
the speaker function is enabled. Otherwise, the linker complains:

applet/src/libs/buzzer.o: In function `Buzzer::tick()':
buzzer.cpp:(.text._ZN6Buzzer4tickEv+0xb2): undefined reference to
	`tone(unsigned char, unsigned int, unsigned long)'
collect2: error: ld returned 1 exit status
Most of the time, CC resolves to avr-gcc, which is the C compiler, and hence
won't be able to properly link C++ objects (It won't pass the proper flags to
the linker). So use CXX instead.
@thisiskeithb
Copy link
Member

Thanks for your contribution! Unfortunately we can't accept PRs directed at release branches. We make patches to the bugfix branches and only later do we push them out as releases. Please redo this PR starting with the bugfix-2.0.x branch and be careful to target bugfix-2.0.x when resubmitting the PR.

It may help to set your fork's default branch to bugfix-2.0.x.

See Marlin's Contributing Code with Pull Requests guide for full instructions.

@SamantazFox
Copy link
Contributor Author

Ooops, my bad :x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants