zCbs7JfpzX9z
4 years ago
2294 changed files with 181005 additions and 111797 deletions
@ -0,0 +1,3 @@ |
|||
github: [thinkyhead] |
|||
patreon: thinkyhead |
|||
custom: ["https://www.thinkyhead.com/donate-to-marlin"] |
@ -0,0 +1,157 @@ |
|||
name: 🪲 Report a bug |
|||
description: Create a bug report to help improve Marlin Firmware |
|||
title: "[BUG] (bug summary)" |
|||
body: |
|||
- type: markdown |
|||
attributes: |
|||
value: > |
|||
Do you want to ask a question? Are you looking for support? Please use one of the [support links](https://github.com/MarlinFirmware/Marlin/issues/new/choose). |
|||
|
|||
- type: markdown |
|||
attributes: |
|||
value: | |
|||
**Thank you for reporting a bug in Marlin Firmware!** |
|||
|
|||
## Before Reporting a Bug |
|||
|
|||
- Read and understand Marlin's [Code of Conduct](https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md). You are expected to comply with it, including treating everyone with respect. |
|||
|
|||
- Test with the [`bugfix-2.0.x` branch](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.0.x.zip) to see whether the issue still exists. |
|||
|
|||
## Instructions |
|||
|
|||
Please follow the instructions below. Failure to do so may result in your issue being closed. See [Contributing to Marlin](https://github.com/MarlinFirmware/Marlin/blob/2.0.x/.github/contributing.md) for additional guidelines. |
|||
|
|||
1. Provide a good title starting with [BUG]. |
|||
2. Fill out all sections of this bug report form. |
|||
3. Always attach configuration files so we can build and test your setup. |
|||
|
|||
- type: dropdown |
|||
attributes: |
|||
label: Did you test the latest `bugfix-2.0.x` code? |
|||
description: >- |
|||
Always try the latest code to make sure the issue you are reporting is not already fixed. To download |
|||
the latest code just [click this link](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.0.x.zip). |
|||
options: |
|||
- Yes, and the problem still exists. |
|||
- No, but I will test it now! |
|||
validations: |
|||
required: true |
|||
|
|||
- type: markdown |
|||
attributes: |
|||
value: | |
|||
# Bug Details |
|||
|
|||
- type: textarea |
|||
attributes: |
|||
label: Bug Description |
|||
description: >- |
|||
Describe the bug in this section. Tell us what you were trying to do and what |
|||
happened that you did not expect. Provide a clear and concise description of the |
|||
problem and include as many details as possible. |
|||
placeholder: | |
|||
Marlin doesn't work. |
|||
validations: |
|||
required: true |
|||
|
|||
- type: input |
|||
attributes: |
|||
label: Bug Timeline |
|||
description: Is this a new bug or an old issue? When did it first start? |
|||
|
|||
- type: textarea |
|||
attributes: |
|||
label: Expected behavior |
|||
description: >- |
|||
What did you expect to happen? |
|||
placeholder: I expected it to move left. |
|||
|
|||
- type: textarea |
|||
attributes: |
|||
label: Actual behavior |
|||
description: What actually happened instead? |
|||
placeholder: It moved right instead of left. |
|||
|
|||
- type: textarea |
|||
attributes: |
|||
label: Steps to Reproduce |
|||
description: >- |
|||
Please describe the steps needed to reproduce the issue. |
|||
placeholder: | |
|||
1. [First Step] ... |
|||
2. [Second Step] ... |
|||
3. [and so on] ... |
|||
|
|||
- type: markdown |
|||
attributes: |
|||
value: | |
|||
# Your Setup |
|||
|
|||
- type: input |
|||
attributes: |
|||
label: Version of Marlin Firmware |
|||
description: "See the About Menu on the LCD or the output of `M115`. NOTE: For older releases we only patch critical bugs." |
|||
validations: |
|||
required: true |
|||
|
|||
- type: input |
|||
attributes: |
|||
label: Printer model |
|||
description: Creality Ender 3, Prusa mini, or Kossel Delta? |
|||
|
|||
- type: input |
|||
attributes: |
|||
label: Electronics |
|||
description: Stock electronics, upgrade board, or something else? |
|||
|
|||
- type: input |
|||
attributes: |
|||
label: Add-ons |
|||
description: Please list any hardware add-ons that could be involved. |
|||
|
|||
- type: dropdown |
|||
attributes: |
|||
label: Your Slicer |
|||
description: Do you use Slic3r, Prusa Slicer, Simplify3D, IdeaMaker...? |
|||
options: |
|||
- Slic3r |
|||
- Simplify3D |
|||
- Prusa Slicer |
|||
- IdeaMaker |
|||
- Cura |
|||
- Other (explain below) |
|||
|
|||
- type: dropdown |
|||
attributes: |
|||
label: Host Software |
|||
description: Do you use OctoPrint, Repetier Host, Pronterface...? |
|||
options: |
|||
- SD Card (headless) |
|||
- Repetier Host |
|||
- OctoPrint |
|||
- Pronterface |
|||
- Cura |
|||
- Same as my slicer |
|||
- Other (explain below) |
|||
|
|||
- type: markdown |
|||
attributes: |
|||
value: >- |
|||
## Other things to include |
|||
|
|||
Please also be sure to include these items to help with troubleshooting: |
|||
|
|||
* **A ZIP file** containing your `Configuration.h` and `Configuration_adv.h`. |
|||
(Please don't paste lengthy configuration text here.) |
|||
* **Log output** from the host. (`M111 S247` for maximum logging.) |
|||
* **Images or videos** demonstrating the problem, if it helps to make it clear. |
|||
* **A G-Code file** that exposes the problem, if not affecting _all_ G-code. |
|||
|
|||
If you've made any other modifications to the firmware, please describe them in detail in the space provided. |
|||
|
|||
When pasting formatted text into the box below don't forget to put ` ``` ` (on its own line) before and after to make it readable. |
|||
|
|||
- type: textarea |
|||
attributes: |
|||
label: Additional information & file uploads |
@ -0,0 +1,20 @@ |
|||
blank_issues_enabled: false |
|||
contact_links: |
|||
- name: 📖 Marlin Documentation |
|||
url: http://marlinfw.org/ |
|||
about: Lots of documentation on installing and using Marlin. |
|||
- name: 👤 MarlinFirmware Facebook group |
|||
url: https://www.facebook.com/groups/1049718498464482 |
|||
about: Please ask and answer questions here. |
|||
- name: 🕹 Marlin on Discord |
|||
url: https://discord.gg/n5NJ59y |
|||
about: Join the Discord server for support and discussion. |
|||
- name: 🔗 Marlin Discussion Forum |
|||
url: http://forums.reprap.org/list.php?415 |
|||
about: A searchable web forum hosted by RepRap dot org. |
|||
- name: 📺 Marlin Videos on YouTube |
|||
url: https://www.youtube.com/results?search_query=marlin+firmware |
|||
about: Tutorials and more from Marlin users all around the world. Great for new users! |
|||
- name: 💸 Want to donate? |
|||
url: https://www.thinkyhead.com/donate-to-marlin |
|||
about: Please take a look at the various options to support Marlin Firmware's development financially! |
@ -0,0 +1,44 @@ |
|||
name: ✨ Request a feature |
|||
description: Request a new Marlin Firmware feature |
|||
title: "[FR] (feature summary)" |
|||
labels: 'T: Feature Request' |
|||
body: |
|||
- type: markdown |
|||
attributes: |
|||
value: > |
|||
Do you want to ask a question? Are you looking for support? Please use one of the [support links](https://github.com/MarlinFirmware/Marlin/issues/new/choose). |
|||
|
|||
- type: markdown |
|||
attributes: |
|||
value: > |
|||
**Thank you for requesting a new Marlin Firmware feature!** |
|||
|
|||
## Before Requesting a Feature |
|||
|
|||
- Read and understand Marlin's [Code of Conduct](https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md). You are expected to comply with it, including treating everyone with respect. |
|||
|
|||
- Check the latest [`bugfix-2.0.x` branch](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.0.x.zip) to see if the feature already exists. |
|||
|
|||
- Before you proceed with your request, please consider if it is necessary to make it into a firmware feature, or if it may be better suited for a slicer or host feature. |
|||
|
|||
- type: textarea |
|||
attributes: |
|||
label: Is your feature request related to a problem? Please describe. |
|||
description: A clear description of the problem (e.g., "I need X but Marlin can't do it [...]"). |
|||
|
|||
- type: textarea |
|||
attributes: |
|||
label: Are you looking for hardware support? |
|||
description: Tell us the printer, board, or peripheral that needs support. |
|||
|
|||
- type: textarea |
|||
attributes: |
|||
label: Describe the feature you want |
|||
description: A clear description of the feature and how you think it should work. |
|||
validations: |
|||
required: true |
|||
|
|||
- type: textarea |
|||
attributes: |
|||
label: Additional context |
|||
description: Add any other context or screenshots about the feature request here. |
@ -0,0 +1,46 @@ |
|||
# Contributor Covenant Code of Conduct |
|||
|
|||
## Our Pledge |
|||
|
|||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. |
|||
|
|||
## Our Standards |
|||
|
|||
Examples of behavior that contributes to creating a positive environment include: |
|||
|
|||
* Using welcoming and inclusive language |
|||
* Being respectful of differing viewpoints and experiences |
|||
* Gracefully accepting constructive criticism |
|||
* Focusing on what is best for the community |
|||
* Showing empathy towards other community members |
|||
|
|||
Examples of unacceptable behavior by participants include: |
|||
|
|||
* The use of sexualized language or imagery and unwelcome sexual attention or advances |
|||
* Trolling, insulting/derogatory comments, and personal or political attacks |
|||
* Public or private harassment |
|||
* Publishing others' private information, such as a physical or electronic address, without explicit permission |
|||
* Other conduct which could reasonably be considered inappropriate in a professional setting |
|||
|
|||
## Our Responsibilities |
|||
|
|||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. |
|||
|
|||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. |
|||
|
|||
## Scope |
|||
|
|||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. |
|||
|
|||
## Enforcement |
|||
|
|||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [marlinfirmware@github.com](mailto:marlinfirmware@github.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. |
|||
|
|||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. |
|||
|
|||
## Attribution |
|||
|
|||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version] |
|||
|
|||
[homepage]: https://contributor-covenant.org |
|||
[version]: https://contributor-covenant.org/version/1/4/ |
@ -0,0 +1,143 @@ |
|||
# Contributing to Marlin |
|||
|
|||
Thanks for your interest in contributing to Marlin Firmware! |
|||
|
|||
The following is a set of guidelines for contributing to Marlin, hosted by the [MarlinFirmware Organization](https://github.com/MarlinFirmware) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a Pull Request. |
|||
|
|||
#### Table Of Contents |
|||
|
|||
[Code of Conduct](#code-of-conduct) |
|||
|
|||
[I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question) |
|||
|
|||
[How Can I Contribute?](#how-can-i-contribute) |
|||
* [Reporting Bugs](#reporting-bugs) |
|||
* [Suggesting Features or Changes](#suggesting-features-or-changes) |
|||
* [Your First Code Contribution](#your-first-code-contribution) |
|||
* [Pull Requests](#pull-requests) |
|||
|
|||
[Styleguides](#styleguides) |
|||
* [Git Commit Messages](#git-commit-messages) |
|||
* [C++ Coding Standards](#c++-coding-standards) |
|||
* [Documentation Styleguide](#documentation) |
|||
|
|||
[Additional Notes](#additional-notes) |
|||
* [Issue and Pull Request Labels](#issue-and-pull-request-labels) |
|||
|
|||
## Code of Conduct |
|||
|
|||
This project and everyone participating in it is governed by the [Marlin Code of Conduct](code_of_conduct.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [marlinfirmware@github.com](mailto:marlinfirmware@github.com). |
|||
|
|||
## I don't want to read this whole thing I just have a question!!! |
|||
|
|||
> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below. |
|||
|
|||
We have a Message Board and a Facebook group where our knowledgable user community can provide helpful advice if you have questions. |
|||
|
|||
* [Marlin RepRap forum](https://reprap.org/forum/list.php?415) |
|||
* [MarlinFirmware on Facebook](https://www.facebook.com/groups/1049718498464482/) |
|||
|
|||
If chat is more your speed, you can join the MarlinFirmware Discord server: |
|||
|
|||
* Use the link https://discord.gg/n5NJ59y to join up as a General User. |
|||
* Even though our Discord is pretty active, it may take a while for community members to respond — please be patient! |
|||
* Use the `#general` channel for general questions or discussion about Marlin. |
|||
* Other channels exist for certain topics or are limited to Patrons. Check the channel list. |
|||
|
|||
## How Can I Contribute? |
|||
|
|||
### Reporting Bugs |
|||
|
|||
This section guides you through submitting a Bug Report for Marlin. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports. |
|||
|
|||
Before creating a Bug Report, please test the "nightly" development branch, as you might find out that you don't need to create one. When you are creating a Bug Report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](issue_template.md), the information it asks for helps us resolve issues faster. |
|||
|
|||
> **Note:** Regressions can happen. If you find a **Closed** issue that seems like your issue, go ahead and open a new issue and include a link to the original issue in the body of your new one. All you need to create a link is the issue number, preceded by #. For example, #8888. |
|||
|
|||
#### How Do I Submit A (Good) Bug Report? |
|||
|
|||
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Use the New Issue button to create an issue and provide the following information by filling in [the template](issue_template.md). |
|||
|
|||
Explain the problem and include additional details to help maintainers reproduce the problem: |
|||
|
|||
* **Use a clear and descriptive title** for the issue to identify the problem. |
|||
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started Marlin, e.g. which command exactly you used in the terminal, or how you started Marlin otherwise. When listing steps, **don't just say what you did, but explain how you did it**. For example, if you moved the cursor to the end of a line, explain if you used the mouse, or a keyboard shortcut or an Marlin command, and if so which one? |
|||
* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets or log output in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines). |
|||
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior. |
|||
* **Explain which behavior you expected to see instead and why.** |
|||
* **Include detailed log output** especially for probing and leveling. See below for usage of `DEBUG_LEVELING_FEATURE`. |
|||
* **Include screenshots, links to videos, etc.** which clearly demonstrate the problem. |
|||
* **Include G-code** (if relevant) that reliably causes the problem to show itself. |
|||
* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below. |
|||
|
|||
Provide more context: |
|||
|
|||
* **Can you reproduce the problem with a minimum of options enabled?** |
|||
* **Did the problem start happening recently** (e.g. after updating to a new version of Marlin) or was this always a problem? |
|||
* If the problem started happening recently, **can you reproduce the problem in an older version of Marlin?** What's the most recent version in which the problem doesn't happen? You can download older versions of Marlin from [the releases page](https://github.com/MarlinFirmware/Marlin/releases). |
|||
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens. |
|||
|
|||
Include details about your configuration and environment: |
|||
|
|||
* **Which version of Marlin are you using?** Marlin's exact version and build date can be seen in the startup message when a host connects to Marlin, or in the LCD Info menu (if enabled). |
|||
* **What kind of 3D Printer and electronics are you using**? |
|||
* **What kind of add-ons (probe, filament sensor) do you have**? |
|||
* **Include your Configuration files.** Make a ZIP file containing `Configuration.h` and `Configuration_adv.h` and drop it on your reply. |
|||
|
|||
### Suggesting Features or Changes |
|||
|
|||
This section guides you through submitting a suggestion for Marlin, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions. |
|||
|
|||
Before creating a suggestion, please check [this list](#before-submitting-a-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](issue_template.md), including the steps that you imagine you would take if the feature you're requesting existed. |
|||
|
|||
#### Before Submitting a Feature Request |
|||
|
|||
* **Check the [Marlin website](https://marlinfw.org/)** for tips — you might discover that the feature is already included. Most importantly, check if you're using [the latest version of Marlin](https://github.com/MarlinFirmware/Marlin/releases) and if you can get the desired behavior by changing [Marlin's config settings](https://marlinfw.org/docs/configuration/configuration.html). |
|||
* **Perform a [cursory search](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aissue)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. |
|||
|
|||
#### How Do I Submit A (Good) Feature Request? |
|||
|
|||
Feature Requests are tracked as [GitHub issues](https://guides.github.com/features/issues/). Please follow these guidelines in your request: |
|||
|
|||
* **Use a clear and descriptive title** for the issue to identify the suggestion. |
|||
* **Provide a step-by-step description of the requested feature** in as much detail as possible. |
|||
* **Provide specific examples to demonstrate the steps**. |
|||
* **Describe the current behavior** and **explain which behavior you expected to see instead** and why. |
|||
* **Include screenshots and links to videos** which demonstrate the feature or point out the part of Marlin to which the request is related. |
|||
* **Explain why this feature would be useful** to most Marlin users. |
|||
* **Name other firmwares that have this feature, if any.** |
|||
|
|||
### Your First Code Contribution |
|||
|
|||
Unsure where to begin contributing to Marlin? You can start by looking through these `good-first-issue` and `help-wanted` issues: |
|||
|
|||
* [Beginner issues][good-first-issue] - issues which should only require a few lines of code, and a test or two. |
|||
* [Help Wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues. |
|||
|
|||
### Pull Requests |
|||
|
|||
Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x` and/or `bugfix-2.0.x`) and never to release branches (e.g., `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](https://marlinfw.org/docs/development/getting_started_pull_requests.html) and Github's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation. |
|||
|
|||
* Fill in [the required template](pull_request_template.md). |
|||
* Don't include issue numbers in the PR title. |
|||
* Include pictures, diagrams, and links to videos in your Pull Request to demonstrate your changes, if needed. |
|||
* Follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) posted on our website. |
|||
* Document new code with clear and concise comments. |
|||
* End all files with a newline. |
|||
|
|||
## Styleguides |
|||
|
|||
### Git Commit Messages |
|||
|
|||
* Use the present tense ("Add feature" not "Added feature"). |
|||
* Use the imperative mood ("Move cursor to..." not "Moves cursor to..."). |
|||
* Limit the first line to 72 characters or fewer. |
|||
* Reference issues and Pull Requests liberally after the first line. |
|||
|
|||
### C++ Coding Standards |
|||
|
|||
* Please read and follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) posted on our website. Failure to follow these guidelines will delay evaluation and acceptance of Pull Requests. |
|||
|
|||
### Documentation |
|||
|
|||
* Guidelines for documentation are still under development. In-general, be clear, concise, and to-the-point. |
@ -0,0 +1,35 @@ |
|||
<!-- |
|||
|
|||
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/.github/code_of_conduct.md |
|||
|
|||
Do you want to ask a question? Are you looking for support? Please don't post here. Instead use one of the following options: |
|||
|
|||
- The Marlin Firmware forum at https://reprap.org/forum/list.php?415 |
|||
- The MarlinFirmware Facebook Group at https://www.facebook.com/groups/1049718498464482/ |
|||
- The MarlinFirmware Discord Server at https://discord.gg/n5NJ59y. |
|||
|
|||
Before filing an issue be sure to test the latest "bugfix" branch to see whether the issue is already addressed. |
|||
|
|||
--> |
|||
|
|||
### Description |
|||
|
|||
<!-- Description of the bug or requested feature --> |
|||
|
|||
### Steps to Reproduce |
|||
|
|||
<!-- If this is a Bug Report, please describe the steps needed to reproduce the issue --> |
|||
|
|||
1. [First Step] |
|||
2. [Second Step] |
|||
3. [and so on...] |
|||
|
|||
**Expected behavior:** [What you expect to happen] |
|||
|
|||
**Actual behavior:** [What actually happens] |
|||
|
|||
#### Additional Information |
|||
|
|||
* Include a ZIP file containing your `Configuration.h` and `Configuration_adv.h` files. |
|||
* Provide pictures or links to videos that clearly demonstrate the issue. |
|||
* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines. |
@ -0,0 +1,33 @@ |
|||
<!-- |
|||
|
|||
Submitting a Pull Request |
|||
|
|||
- Please fill out all sections of this form. You can delete the helpful comments. |
|||
- Pull Requests without clear information will take longer and may even be rejected. |
|||
- We get a high volume of submissions so please be patient during review. |
|||
|
|||
--> |
|||
|
|||
### Description |
|||
|
|||
<!-- |
|||
|
|||
Clearly describe the submitted changes with lots of details. Include images where helpful. Initial reviewers may not be familiar with the subject, so be as thorough as possible. You can use MarkDown syntax to improve readability with bullet lists, code blocks, and so on. PREVIEW and fix up formatting before submitting. |
|||
|
|||
--> |
|||
|
|||
### Requirements |
|||
|
|||
<!-- Does this PR require a specific board, LCD, etc.? --> |
|||
|
|||
### Benefits |
|||
|
|||
<!-- What does this PR fix or improve? --> |
|||
|
|||
### Configurations |
|||
|
|||
<!-- Attach Configurations ZIP and any other files needed to test this PR. --> |
|||
|
|||
### Related Issues |
|||
|
|||
<!-- Does this PR fix a bug or fulfill a Feature Request? Link related Issues here. --> |
@ -0,0 +1,35 @@ |
|||
# |
|||
# bump-date.yml |
|||
# Bump the distribution date once per day |
|||
# |
|||
|
|||
name: Bump Distribution Date |
|||
|
|||
on: |
|||
schedule: |
|||
- cron: '0 0 * * *' |
|||
|
|||
jobs: |
|||
bump_date: |
|||
name: Bump Distribution Date |
|||
if: github.repository == 'MarlinFirmware/Marlin' |
|||
|
|||
runs-on: ubuntu-latest |
|||
|
|||
steps: |
|||
|
|||
- name: Check out bugfix-2.0.x |
|||
uses: actions/checkout@v2 |
|||
with: |
|||
ref: bugfix-2.0.x |
|||
|
|||
- name: Bump Distribution Date |
|||
run: | |
|||
# Inline Bump Script |
|||
DIST=$( date +"%Y-%m-%d" ) |
|||
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \ |
|||
git config user.name "${GITHUB_ACTOR}" && \ |
|||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \ |
|||
git add . && \ |
|||
git commit -m "[cron] Bump distribution date ($DIST)" && \ |
|||
git push |
@ -0,0 +1,32 @@ |
|||
# |
|||
# check-pr.yml |
|||
# Close PRs directed at release branches |
|||
# |
|||
|
|||
name: PR Bad Target |
|||
|
|||
on: |
|||
pull_request: |
|||
branches: |
|||
- 1.0.x |
|||
- 1.1.x |
|||
- 2.0.x |
|||
|
|||
jobs: |
|||
bad_target: |
|||
name: PR Bad Target |
|||
if: github.repository == 'MarlinFirmware/Marlin' |
|||
|
|||
runs-on: ubuntu-latest |
|||
|
|||
steps: |
|||
- uses: superbrothers/close-pull-request@v3 |
|||
with: |
|||
comment: > |
|||
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 [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions. |
@ -0,0 +1,39 @@ |
|||
# |
|||
# clean-closed.yml |
|||
# Remove obsolete labels when an Issue or PR is closed |
|||
# |
|||
|
|||
name: Clean Closed |
|||
|
|||
on: |
|||
pull_request: |
|||
types: [closed] |
|||
issues: |
|||
types: [closed] |
|||
|
|||
jobs: |
|||
remove_label: |
|||
runs-on: ubuntu-latest |
|||
|
|||
strategy: |
|||
matrix: |
|||
label: |
|||
- "S: Don't Merge" |
|||
- "S: Hold for 2.1" |
|||
- "S: Please Merge" |
|||
- "S: Please Test" |
|||
- "help wanted" |
|||
- "Needs: Discussion" |
|||
- "Needs: Documentation" |
|||
- "Needs: More Data" |
|||
- "Needs: Patch" |
|||
- "Needs: Testing" |
|||
- "Needs: Work" |
|||
|
|||
steps: |
|||
- uses: actions/checkout@v2 |
|||
- name: Remove Labels |
|||
uses: actions-ecosystem/action-remove-labels@v1 |
|||
with: |
|||
github_token: ${{ github.token }} |
|||
labels: ${{ matrix.label }} |
@ -0,0 +1,142 @@ |
|||
# |
|||
# test-builds.yml |
|||
# Do test builds to catch compile errors |
|||
# |
|||
|
|||
name: CI |
|||
|
|||
on: |
|||
pull_request: |
|||
branches: |
|||
- bugfix-2.0.x |
|||
paths-ignore: |
|||
- config/** |
|||
- data/** |
|||
- docs/** |
|||
- '**/*.md' |
|||
push: |
|||
branches: |
|||
- bugfix-2.0.x |
|||
paths-ignore: |
|||
- config/** |
|||
- data/** |
|||
- docs/** |
|||
- '**/*.md' |
|||
|
|||
jobs: |
|||
test_builds: |
|||
name: Run All Tests |
|||
if: github.repository == 'MarlinFirmware/Marlin' |
|||
|
|||
runs-on: ubuntu-latest |
|||
|
|||
strategy: |
|||
matrix: |
|||
test-platform: |
|||
# Base Environments |
|||
|
|||
- DUE |
|||
- DUE_archim |
|||
- esp32 |
|||
- linux_native |
|||
- mega2560 |
|||
- at90usb1286_dfu |
|||
- teensy31 |
|||
- teensy35 |
|||
- teensy41 |
|||
- SAMD51_grandcentral_m4 |
|||
|
|||
# Extended AVR Environments |
|||
|
|||
- FYSETC_F6 |
|||
- mega1280 |
|||
- rambo |
|||
- sanguino1284p |
|||
- sanguino644p |
|||
|
|||
# STM32F1 (Maple) Environments |
|||
|
|||
#- STM32F103RC_btt_maple |
|||
- STM32F103RC_btt_USB_maple |
|||
- STM32F103RC_fysetc |
|||
- STM32F103RC_meeb |
|||
- jgaurora_a5s_a1 |
|||
- STM32F103VE_longer |
|||
#- mks_robin_maple |
|||
- mks_robin_lite |
|||
- mks_robin_pro |
|||
#- mks_robin_nano35_maple |
|||
#- STM32F103RET6_creality_maple |
|||
|
|||
# STM32 (ST) Environments |
|||
|
|||
- STM32F103RC_btt |
|||
#- STM32F103RC_btt_USB |
|||
- STM32F103RE_btt |
|||
- STM32F103RE_btt_USB |
|||
- STM32F103RET6_creality |
|||
- STM32F407VE_black |
|||
- STM32F401VE_STEVAL |
|||
- BIGTREE_BTT002 |
|||
- BIGTREE_SKR_PRO |
|||
- BIGTREE_GTR_V1_0 |
|||
- mks_robin |
|||
- ARMED |
|||
- FYSETC_S6 |
|||
- STM32F070CB_malyan |
|||
- STM32F070RB_malyan |
|||
- malyan_M300 |
|||
- FLYF407ZG |
|||
- rumba32 |
|||
- LERDGEX |
|||
- LERDGEK |
|||
- mks_robin_nano35 |
|||
- NUCLEO_F767ZI |
|||
- REMRAM_V1 |
|||
- BTT_SKR_SE_BX |
|||
- chitu_f103 |
|||
|
|||
# Put lengthy tests last |
|||
|
|||
- LPC1768 |
|||
- LPC1769 |
|||
|
|||
# Non-working environment tests |
|||
#- at90usb1286_cdc |
|||
#- STM32F103CB_malyan |
|||
#- STM32F103RE |
|||
#- mks_robin_mini |
|||
|
|||
steps: |
|||
|
|||
- name: Check out the PR |
|||
uses: actions/checkout@v2 |
|||
|
|||
- name: Cache pip |
|||
uses: actions/cache@v2 |
|||
with: |
|||
path: ~/.cache/pip |
|||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} |
|||
restore-keys: | |
|||
${{ runner.os }}-pip- |
|||
|
|||
- name: Cache PlatformIO |
|||
uses: actions/cache@v2 |
|||
with: |
|||
path: ~/.platformio |
|||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} |
|||
|
|||
- name: Select Python 3.7 |
|||
uses: actions/setup-python@v2 |
|||
with: |
|||
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax. |
|||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified |
|||
|
|||
- name: Install PlatformIO |
|||
run: | |
|||
pip install -U https://github.com/platformio/platformio-core/archive/develop.zip |
|||
platformio update |
|||
|
|||
- name: Run ${{ matrix.test-platform }} Tests |
|||
run: | |
|||
make tests-single-ci TEST_TARGET=${{ matrix.test-platform }} |
@ -0,0 +1,52 @@ |
|||
help: |
|||
@echo "Tasks for local development:" |
|||
@echo "* tests-single-ci: Run a single test from inside the CI" |
|||
@echo "* tests-single-local: Run a single test locally" |
|||
@echo "* tests-single-local-docker: Run a single test locally, using docker-compose" |
|||
@echo "* tests-all-local: Run all tests locally" |
|||
@echo "* tests-all-local-docker: Run all tests locally, using docker-compose" |
|||
@echo "* setup-local-docker: Setup local docker-compose" |
|||
@echo "" |
|||
@echo "Options for testing:" |
|||
@echo " TEST_TARGET Set when running tests-single-*, to select the" |
|||
@echo " test. If you set it to ALL it will run all " |
|||
@echo " tests, but some of them are broken: use " |
|||
@echo " tests-all-* instead to run only the ones that " |
|||
@echo " run on GitHub CI" |
|||
@echo " ONLY_TEST Limit tests to only those that contain this, or" |
|||
@echo " the index of the test (1-based)" |
|||
@echo " VERBOSE_PLATFORMIO If you want the full PIO output, set any value" |
|||
@echo " GIT_RESET_HARD Used by CI: reset all local changes. WARNING:" |
|||
@echo " THIS WILL UNDO ANY CHANGES YOU'VE MADE!" |
|||
.PHONY: help |
|||
|
|||
tests-single-ci: |
|||
export GIT_RESET_HARD=true |
|||
$(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) |
|||
.PHONY: tests-single-ci |
|||
|
|||
tests-single-local: |
|||
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local" ; return 1; fi |
|||
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
|
|||
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
|
|||
&& run_tests . $(TEST_TARGET) "$(ONLY_TEST)" |
|||
.PHONY: tests-single-local |
|||
|
|||
tests-single-local-docker: |
|||
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local-docker" ; return 1; fi |
|||
docker-compose run --rm marlin $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)" |
|||
.PHONY: tests-single-local-docker |
|||
|
|||
tests-all-local: |
|||
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
|
|||
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
|
|||
&& for TEST_TARGET in $$(./get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done |
|||
.PHONY: tests-all-local |
|||
|
|||
tests-all-local-docker: |
|||
docker-compose run --rm marlin $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) |
|||
.PHONY: tests-all-local-docker |
|||
|
|||
setup-local-docker: |
|||
docker-compose build |
|||
.PHONY: setup-local-docker |
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,76 +0,0 @@ |
|||
/**
|
|||
* Made with Marlin Bitmap Converter |
|||
* https://marlinfw.org/tools/u8glib/converter.html
|
|||
* |
|||
* This bitmap from the file 'marlin_fb4s_logo.bmp' |
|||
*/ |
|||
#pragma once |
|||
|
|||
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128 |
|||
|
|||
const unsigned char custom_start_bmp[] PROGMEM = { |
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, // ................................................................................................................................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, // ................................................................................................................................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, // ................................................................................................................................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10000000,B00000000,B00000000,B00000000,B00000000, // ........................................................................................#.......................................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11000000,B00000000,B00000000,B00000001,B10000000, // ........................................................................................##.............................##.......
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11000000,B00000000,B00000000,B00000011,B10000000, // .......................................................................................###............................###.......
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11000000,B00000000,B00000000,B00001111,B10000000, // .......................................................................................###..........................#####.......
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11000000,B00000000,B00000000,B00011111,B00000000, // ......................................................................................####.........................#####........
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11000000,B00000000,B00000000,B01111111,B00000000, // .....................................................................................#####.......................#######........
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11000000,B00000000,B00000000,B11111110,B00000000, // .....................................................................................#####......................#######.........
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11000000,B00000000,B00000011,B11111110,B00000000, // ....................................................................................######....................#########.........
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B10000000,B00000000,B00001111,B11111100,B00000000, // ...................................................................................######...................##########..........
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B10010000,B00000000,B00111111,B11111000,B00000000, // ...................................................................................######..#..............###########...........
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B00010000,B00000000,B11111111,B11110000,B00000000, // ..................................................................................######...#............############............
|
|||
B01111111,B01100000,B00000100,B00000000,B00000000,B01111111,B00000000,B00000000,B00000000,B00000000,B01111111,B00110000,B00000011,B11111111,B11100000,B00000000, // .#######.##..........#...................#######.................................#######..##..........#############.............
|
|||
B01100000,B01100000,B00000100,B00000000,B00000000,B01100001,B10000000,B00000000,B00000000,B00000000,B11111110,B01110000,B00001111,B11111111,B11000010,B00000000, // .##......##..........#...................##....##...............................#######..###........##############....#.........
|
|||
B01100000,B01100000,B00000000,B00000000,B00000000,B01100001,B10000000,B00000000,B00000000,B00000001,B11111110,B11110000,B01111111,B11111111,B10001110,B00000000, // .##......##..............................##....##..............................########.####.....################...###.........
|
|||
B01100000,B01101100,B00100100,B11111100,B01111110,B01100011,B10001111,B00001111,B10011111,B00000011,B11111100,B11110001,B11111111,B11111110,B00111100,B00000000, // .##......##.##....#..#..######...######..##...###...####....#####..#####......########..####...################...####..........
|
|||
B01111110,B01101100,B01101100,B11100110,B11100110,B01111111,B00011001,B10011001,B10011000,B00000111,B11111101,B11110011,B11111111,B11111100,B11111100,B00000000, // .######..##.##...##.##..###..##.###..##..#######...##..##..##..##..##........#########.#####..################..######..........
|
|||
B01100000,B01100110,B01101100,B11000110,B11000110,B01100001,B10110000,B10001111,B10011000,B00001111,B11111111,B11100111,B11111111,B11110011,B11111000,B00000000, // .##......##..##..##.##..##...##.##...##..##....##.##....#...#####..##.......###############..###############..#######...........
|
|||
B01100000,B01100110,B11001100,B11000110,B11000110,B01100001,B10111111,B10011101,B10011000,B00011111,B11111111,B11100111,B11111111,B11111111,B11110000,B00000000, // .##......##..##.##..##..##...##.##...##..##....##.#######..###.##..##......################..#######################............
|
|||
B01100000,B01100011,B11001100,B11000110,B11000110,B01100001,B10110000,B00011001,B10011000,B00011111,B11111111,B11000111,B11111111,B11111111,B11100000,B00000000, // .##......##...####..##..##...##.##...##..##....##.##.......##..##..##......###############...######################.............
|
|||
B01100000,B01100011,B10001100,B11000110,B11100110,B01100001,B10011001,B10011001,B11011000,B00111111,B11111111,B11000111,B11111111,B11111111,B11000000,B00000000, // .##......##...###...##..##...##.###..##..##....##..##..##..##..###.##.....################...#####################..............
|
|||
B01100000,B01100011,B10000100,B11000110,B01111110,B01111111,B00001111,B00011110,B11011000,B00111111,B11111111,B10000111,B11111111,B11111111,B10000000,B00000000, // .##......##...###....#..##...##..######..#######....####...####.##.##.....###############....####################...............
|
|||
B00000000,B00000001,B10000000,B00000000,B11000110,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,B00100111,B11111111,B11111111,B00000000,B00000000, // ...............##...............##...##....................................#############..#..###################................
|
|||
B00000000,B00000011,B00000000,B00000000,B11000110,B00000000,B00000000,B00000000,B00000000,B00001111,B11111110,B01100111,B11111111,B11111100,B00000000,B00000000, // ..............##................##...##.....................................###########..##..#################..................
|
|||
B00000000,B00001110,B00000000,B00000000,B00111100,B00000000,B00000000,B00000000,B00000000,B00000111,B11111100,B11100111,B11111111,B11111000,B00000000,B00000000, // ............###...................####.......................................#########..###..################...................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11100111,B11111111,B11100000,B00000000,B00000000, // .............................................................................##############..##############.....................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11000111,B11111111,B10001110,B00000000,B00000000, // .............................................................................#############...############...###.................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11001111,B11111111,B11111100,B00000000,B00000000, // ..............................................................................############..##################..................
|
|||
B00000000,B00000000,B00001111,B00001100,B00000000,B00000000,B00001100,B00000000,B00000000,B00000011,B11111111,B10001111,B11111111,B11111100,B00000000,B00000000, // ....................####....##......................##........................###########...##################..................
|
|||
B00000000,B00000000,B00110001,B11001100,B00000000,B00000000,B00001100,B00000000,B00000000,B00000011,B11111111,B00011111,B11111111,B11111000,B00000000,B00000000, // ..................##...###..##......................##........................##########...##################...................
|
|||
B00000000,B00000000,B01110000,B11001100,B00000000,B00000000,B00001100,B00000000,B00000000,B00000011,B11111111,B00011111,B11111111,B11100000,B00000000,B00000000, // .................###....##..##......................##........................##########...################.....................
|
|||
B00000000,B00000000,B01100000,B01001111,B11000111,B10000111,B10011111,B00000000,B00000000,B00000111,B11111110,B01111111,B11111111,B11000000,B00000000,B00000000, // .................##......#..######...####....####..#####.....................##########..#################......................
|
|||
B00000000,B00000000,B01100000,B00001100,B11001100,B01101100,B11001100,B00000000,B00000000,B00000111,B11111100,B11111111,B11111111,B10000000,B00000000,B00000000, // .................##.........##..##..##...##.##..##..##.......................#########..#################.......................
|
|||
B00000000,B00000000,B01100011,B11001100,B01101100,B01101110,B00001100,B00000000,B00000000,B00000111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000000, // .................##...####..##...##.##...##.###.....##.......................##########################.........................
|
|||
B00000000,B00000000,B01100000,B01101100,B01101100,B01100111,B11001100,B00000000,B00000000,B00001111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000000, // .................##......##.##...##.##...##..#####..##......................###########################.........................
|
|||
B00000000,B00000000,B01110000,B01101100,B01101100,B01100000,B11001100,B00000000,B00000000,B01111111,B11111111,B11111111,B11111111,B11110000,B00000000,B00000000, // .................###.....##.##...##.##...##.....##..##...................###################################....................
|
|||
B00000000,B00000000,B00110000,B11001100,B01101100,B01101100,B11001100,B00000000,B00000001,B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00000000, // ..................##....##..##...##.##...##.##..##..##.................#######################################..................
|
|||
B00000000,B00000000,B00001111,B10001100,B01000111,B10000111,B10000111,B00000000,B00001111,B11111111,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000, // ....................#####...##...#...####....####....###............###########################################.................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,B11111111,B11111111,B00000000,B00000000, // ..................................................................##############################################................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000,B00000000, // .................................................................################################################...............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11000000,B00000000, // ..............................................................####################################################..............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000,B00000000, // ..............................................................###################################################...............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000,B00000000, // ..............................................................###################################################...............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B00000000,B00000000, // .............................................................###################################################................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110,B00111111,B11111111,B11111111,B11111111,B11111111,B11110011,B00000000,B00000000, // ............................................................###...##########################################..##................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,B01111011,B11111111,B11111111,B11111111,B11111111,B11111101,B10000000,B00000000, // .............................................................##..####.########################################.##...............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11111101,B11111111,B11111111,B11111111,B11111111,B11111100,B10000000,B00000000, // ............................................................##########.#######################################..#...............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11111011,B11111111,B11111111,B11111111,B11111111,B11111110,B10000000,B00000000, // ............................................................#########.#########################################.#...............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11100111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00000000, // ...........................................................########..###########################################.#..............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11100000,B00000000, // ............................................................####...################################################.............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111,B11011111,B11111100,B11111111,B11111111,B11100000,B00000000, // .................................................................#################.###########..###################.............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111011,B00000101,B11110000,B01111111,B10111111,B11100000,B00000000, // ..................................................................###########.##.....#.#####.....########.#########.............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11110110,B00000000,B00000000,B00011111,B11111111,B11100000,B00000000, // .................................................................###########.##....................################.............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11101100,B00000000,B00000000,B00001111,B11111111,B11110000,B00000000, // ................................................................###########.##......................################............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11110000,B00000000,B00000000,B00000111,B11111111,B11110000,B00000000, // ...............................................................#############.........................###############............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11000000,B00000000,B00000000,B00000001,B11111111,B11100000,B00000000, // ..............................................................############.............................############.............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11011110,B00000000,B00000000,B00000000,B00000000,B01111011,B11100000,B00000000, // ...............................................................###.####..................................####.#####.............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11100000,B00000000, // ...............................................................................................................####.............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11000000,B00000000, // ................................................................................................................##..............
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, // ................................................................................................................................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000, // ................................................................................................................................
|
|||
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000 // ................................................................................................................................
|
|||
}; |
@ -1,342 +0,0 @@ |
|||
/**
|
|||
* Marlin 3D Printer Firmware |
|||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|||
* |
|||
* Based on Sprinter and grbl. |
|||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
* |
|||
*/ |
|||
#ifdef ARDUINO_ARCH_SAM |
|||
|
|||
#include "../../core/macros.h" |
|||
#include "../../core/serial.h" |
|||
|
|||
#include "../shared/backtrace/unwinder.h" |
|||
#include "../shared/backtrace/unwmemaccess.h" |
|||
|
|||
#include <stdarg.h> |
|||
|
|||
// Debug monitor that dumps to the Programming port all status when
|
|||
// an exception or WDT timeout happens - And then resets the board
|
|||
|
|||
// All the Monitor routines must run with interrupts disabled and
|
|||
// under an ISR execution context. That is why we cannot reuse the
|
|||
// Serial interrupt routines or any C runtime, as we don't know the
|
|||
// state we are when running them
|
|||
|
|||
// A SW memory barrier, to ensure GCC does not overoptimize loops
|
|||
#define sw_barrier() __asm__ volatile("": : :"memory"); |
|||
|
|||
// (re)initialize UART0 as a monitor output to 250000,n,8,1
|
|||
static void TXBegin() { |
|||
|
|||
// Disable UART interrupt in NVIC
|
|||
NVIC_DisableIRQ( UART_IRQn ); |
|||
|
|||
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
|||
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
|||
__DSB(); |
|||
__ISB(); |
|||
|
|||
// Disable clock
|
|||
pmc_disable_periph_clk( ID_UART ); |
|||
|
|||
// Configure PMC
|
|||
pmc_enable_periph_clk( ID_UART ); |
|||
|
|||
// Disable PDC channel
|
|||
UART->UART_PTCR = UART_PTCR_RXTDIS | UART_PTCR_TXTDIS; |
|||
|
|||
// Reset and disable receiver and transmitter
|
|||
UART->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS; |
|||
|
|||
// Configure mode: 8bit, No parity, 1 bit stop
|
|||
UART->UART_MR = UART_MR_CHMODE_NORMAL | US_MR_CHRL_8_BIT | US_MR_NBSTOP_1_BIT | UART_MR_PAR_NO; |
|||
|
|||
// Configure baudrate (asynchronous, no oversampling) to BAUDRATE bauds
|
|||
UART->UART_BRGR = (SystemCoreClock / (BAUDRATE << 4)); |
|||
|
|||
// Enable receiver and transmitter
|
|||
UART->UART_CR = UART_CR_RXEN | UART_CR_TXEN; |
|||
} |
|||
|
|||
// Send character through UART with no interrupts
|
|||
static void TX(char c) { |
|||
while (!(UART->UART_SR & UART_SR_TXRDY)) { WDT_Restart(WDT); sw_barrier(); }; |
|||
UART->UART_THR = c; |
|||
} |
|||
|
|||
// Send String through UART
|
|||
static void TX(const char* s) { |
|||
while (*s) TX(*s++); |
|||
} |
|||
|
|||
static void TXDigit(uint32_t d) { |
|||
if (d < 10) TX((char)(d+'0')); |
|||
else if (d < 16) TX((char)(d+'A'-10)); |
|||
else TX('?'); |
|||
} |
|||
|
|||
// Send Hex number thru UART
|
|||
static void TXHex(uint32_t v) { |
|||
TX("0x"); |
|||
for (uint8_t i = 0; i < 8; i++, v <<= 4) |
|||
TXDigit((v >> 28) & 0xF); |
|||
} |
|||
|
|||
// Send Decimal number thru UART
|
|||
static void TXDec(uint32_t v) { |
|||
if (!v) { |
|||
TX('0'); |
|||
return; |
|||
} |
|||
|
|||
char nbrs[14]; |
|||
char *p = &nbrs[0]; |
|||
while (v != 0) { |
|||
*p++ = '0' + (v % 10); |
|||
v /= 10; |
|||
} |
|||
do { |
|||
p--; |
|||
TX(*p); |
|||
} while (p != &nbrs[0]); |
|||
} |
|||
|
|||
// Dump a backtrace entry
|
|||
static bool UnwReportOut(void* ctx, const UnwReport* bte) { |
|||
int* p = (int*)ctx; |
|||
|
|||
(*p)++; |
|||
TX('#'); TXDec(*p); TX(" : "); |
|||
TX(bte->name?bte->name:"unknown"); TX('@'); TXHex(bte->function); |
|||
TX('+'); TXDec(bte->address - bte->function); |
|||
TX(" PC:");TXHex(bte->address); TX('\n'); |
|||
return true; |
|||
} |
|||
|
|||
#ifdef UNW_DEBUG |
|||
void UnwPrintf(const char* format, ...) { |
|||
char dest[256]; |
|||
va_list argptr; |
|||
va_start(argptr, format); |
|||
vsprintf(dest, format, argptr); |
|||
va_end(argptr); |
|||
TX(&dest[0]); |
|||
} |
|||
#endif |
|||
|
|||
/* Table of function pointers for passing to the unwinder */ |
|||
static const UnwindCallbacks UnwCallbacks = { |
|||
UnwReportOut, |
|||
UnwReadW, |
|||
UnwReadH, |
|||
UnwReadB |
|||
#ifdef UNW_DEBUG |
|||
, UnwPrintf |
|||
#endif |
|||
}; |
|||
|
|||
/**
|
|||
* HardFaultHandler_C: |
|||
* This is called from the HardFault_HandlerAsm with a pointer the Fault stack |
|||
* as the parameter. We can then read the values from the stack and place them |
|||
* into local variables for ease of reading. |
|||
* We then read the various Fault Status and Address Registers to help decode |
|||
* cause of the fault. |
|||
* The function ends with a BKPT instruction to force control back into the debugger |
|||
*/ |
|||
extern "C" |
|||
void HardFault_HandlerC(unsigned long *sp, unsigned long lr, unsigned long cause) { |
|||
|
|||
static const char* causestr[] = { |
|||
"NMI","Hard","Mem","Bus","Usage","Debug","WDT","RSTC" |
|||
}; |
|||
|
|||
UnwindFrame btf; |
|||
|
|||
// Dump report to the Programming port (interrupts are DISABLED)
|
|||
TXBegin(); |
|||
TX("\n\n## Software Fault detected ##\n"); |
|||
TX("Cause: "); TX(causestr[cause]); TX('\n'); |
|||
|
|||
TX("R0 : "); TXHex(((unsigned long)sp[0])); TX('\n'); |
|||
TX("R1 : "); TXHex(((unsigned long)sp[1])); TX('\n'); |
|||
TX("R2 : "); TXHex(((unsigned long)sp[2])); TX('\n'); |
|||
TX("R3 : "); TXHex(((unsigned long)sp[3])); TX('\n'); |
|||
TX("R12 : "); TXHex(((unsigned long)sp[4])); TX('\n'); |
|||
TX("LR : "); TXHex(((unsigned long)sp[5])); TX('\n'); |
|||
TX("PC : "); TXHex(((unsigned long)sp[6])); TX('\n'); |
|||
TX("PSR : "); TXHex(((unsigned long)sp[7])); TX('\n'); |
|||
|
|||
// Configurable Fault Status Register
|
|||
// Consists of MMSR, BFSR and UFSR
|
|||
TX("CFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED28)))); TX('\n'); |
|||
|
|||
// Hard Fault Status Register
|
|||
TX("HFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED2C)))); TX('\n'); |
|||
|
|||
// Debug Fault Status Register
|
|||
TX("DFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED30)))); TX('\n'); |
|||
|
|||
// Auxiliary Fault Status Register
|
|||
TX("AFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED3C)))); TX('\n'); |
|||
|
|||
// Read the Fault Address Registers. These may not contain valid values.
|
|||
// Check BFARVALID/MMARVALID to see if they are valid values
|
|||
// MemManage Fault Address Register
|
|||
TX("MMAR : "); TXHex((*((volatile unsigned long *)(0xE000ED34)))); TX('\n'); |
|||
|
|||
// Bus Fault Address Register
|
|||
TX("BFAR : "); TXHex((*((volatile unsigned long *)(0xE000ED38)))); TX('\n'); |
|||
|
|||
TX("ExcLR: "); TXHex(lr); TX('\n'); |
|||
TX("ExcSP: "); TXHex((unsigned long)sp); TX('\n'); |
|||
|
|||
btf.sp = ((unsigned long)sp) + 8*4; // The original stack pointer
|
|||
btf.fp = btf.sp; |
|||
btf.lr = ((unsigned long)sp[5]); |
|||
btf.pc = ((unsigned long)sp[6]) | 1; // Force Thumb, as CORTEX only support it
|
|||
|
|||
// Perform a backtrace
|
|||
TX("\nBacktrace:\n\n"); |
|||
int ctr = 0; |
|||
UnwindStart(&btf, &UnwCallbacks, &ctr); |
|||
|
|||
// Disable all NVIC interrupts
|
|||
NVIC->ICER[0] = 0xFFFFFFFF; |
|||
NVIC->ICER[1] = 0xFFFFFFFF; |
|||
|
|||
// Relocate VTOR table to default position
|
|||
SCB->VTOR = 0; |
|||
|
|||
// Disable USB
|
|||
otg_disable(); |
|||
|
|||
// Restart watchdog
|
|||
WDT_Restart(WDT); |
|||
|
|||
// Reset controller
|
|||
NVIC_SystemReset(); |
|||
for (;;) WDT_Restart(WDT); |
|||
} |
|||
|
|||
__attribute__((naked)) void NMI_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#0") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
__attribute__((naked)) void HardFault_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#1") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
__attribute__((naked)) void MemManage_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#2") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
__attribute__((naked)) void BusFault_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#3") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
__attribute__((naked)) void UsageFault_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#4") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
__attribute__((naked)) void DebugMon_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#5") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
/* This is NOT an exception, it is an interrupt handler - Nevertheless, the framing is the same */ |
|||
__attribute__((naked)) void WDT_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#6") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
__attribute__((naked)) void RSTC_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#7") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
#endif // ARDUINO_ARCH_SAM
|
@ -0,0 +1,91 @@ |
|||
/**
|
|||
* Marlin 3D Printer Firmware |
|||
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|||
* |
|||
* Based on Sprinter and grbl. |
|||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
* |
|||
*/ |
|||
#ifdef ARDUINO_ARCH_SAM |
|||
|
|||
#include "../../inc/MarlinConfigPre.h" |
|||
|
|||
#if ENABLED(POSTMORTEM_DEBUGGING) |
|||
|
|||
#include "../shared/HAL_MinSerial.h" |
|||
|
|||
#include <stdarg.h> |
|||
|
|||
static void TXBegin() { |
|||
// Disable UART interrupt in NVIC
|
|||
NVIC_DisableIRQ( UART_IRQn ); |
|||
|
|||
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
|||
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
|||
__DSB(); |
|||
__ISB(); |
|||
|
|||
// Disable clock
|
|||
pmc_disable_periph_clk( ID_UART ); |
|||
|
|||
// Configure PMC
|
|||
pmc_enable_periph_clk( ID_UART ); |
|||
|
|||
// Disable PDC channel
|
|||
UART->UART_PTCR = UART_PTCR_RXTDIS | UART_PTCR_TXTDIS; |
|||
|
|||
// Reset and disable receiver and transmitter
|
|||
UART->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS; |
|||
|
|||
// Configure mode: 8bit, No parity, 1 bit stop
|
|||
UART->UART_MR = UART_MR_CHMODE_NORMAL | US_MR_CHRL_8_BIT | US_MR_NBSTOP_1_BIT | UART_MR_PAR_NO; |
|||
|
|||
// Configure baudrate (asynchronous, no oversampling) to BAUDRATE bauds
|
|||
UART->UART_BRGR = (SystemCoreClock / (BAUDRATE << 4)); |
|||
|
|||
// Enable receiver and transmitter
|
|||
UART->UART_CR = UART_CR_RXEN | UART_CR_TXEN; |
|||
} |
|||
|
|||
// A SW memory barrier, to ensure GCC does not overoptimize loops
|
|||
#define sw_barrier() __asm__ volatile("": : :"memory"); |
|||
static void TX(char c) { |
|||
while (!(UART->UART_SR & UART_SR_TXRDY)) { WDT_Restart(WDT); sw_barrier(); }; |
|||
UART->UART_THR = c; |
|||
} |
|||
|
|||
void install_min_serial() { |
|||
HAL_min_serial_init = &TXBegin; |
|||
HAL_min_serial_out = &TX; |
|||
} |
|||
|
|||
#if DISABLED(DYNAMIC_VECTORTABLE) |
|||
extern "C" { |
|||
__attribute__((naked)) void JumpHandler_ASM() { |
|||
__asm__ __volatile__ ( |
|||
"b CommonHandler_ASM\n" |
|||
); |
|||
} |
|||
void __attribute__((naked, alias("JumpHandler_ASM"))) HardFault_Handler(); |
|||
void __attribute__((naked, alias("JumpHandler_ASM"))) BusFault_Handler(); |
|||
void __attribute__((naked, alias("JumpHandler_ASM"))) UsageFault_Handler(); |
|||
void __attribute__((naked, alias("JumpHandler_ASM"))) MemManage_Handler(); |
|||
void __attribute__((naked, alias("JumpHandler_ASM"))) NMI_Handler(); |
|||
} |
|||
#endif |
|||
|
|||
#endif // POSTMORTEM_DEBUGGING
|
|||
#endif // ARDUINO_ARCH_SAM
|
@ -0,0 +1,59 @@ |
|||
/**
|
|||
* Marlin 3D Printer Firmware |
|||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|||
* |
|||
* Based on Sprinter and grbl. |
|||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm |
|||
* |
|||
* Copypaste of SAMD51 HAL developed by Giuliano Zaro (AKA GMagician) |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
* |
|||
*/ |
|||
|
|||
/**
|
|||
* Description: Tone function for ESP32 |
|||
* Derived from https://forum.arduino.cc/index.php?topic=136500.msg2903012#msg2903012
|
|||
*/ |
|||
|
|||
#ifdef ARDUINO_ARCH_ESP32 |
|||
|
|||
#include "../../inc/MarlinConfig.h" |
|||
#include "HAL.h" |
|||
|
|||
static pin_t tone_pin; |
|||
volatile static int32_t toggles; |
|||
|
|||
void tone(const pin_t _pin, const unsigned int frequency, const unsigned long duration) { |
|||
tone_pin = _pin; |
|||
toggles = 2 * frequency * duration / 1000; |
|||
HAL_timer_start(TONE_TIMER_NUM, 2 * frequency); |
|||
} |
|||
|
|||
void noTone(const pin_t _pin) { |
|||
HAL_timer_disable_interrupt(TONE_TIMER_NUM); |
|||
WRITE(_pin, LOW); |
|||
} |
|||
|
|||
HAL_TONE_TIMER_ISR() { |
|||
HAL_timer_isr_prologue(TONE_TIMER_NUM); |
|||
|
|||
if (toggles) { |
|||
toggles--; |
|||
TOGGLE(tone_pin); |
|||
} |
|||
else noTone(tone_pin); // turn off interrupt
|
|||
} |
|||
|
|||
#endif // ARDUINO_ARCH_ESP32
|
@ -1,322 +0,0 @@ |
|||
/**
|
|||
* Marlin 3D Printer Firmware |
|||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|||
* |
|||
* Based on Sprinter and grbl. |
|||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
* |
|||
*/ |
|||
#ifdef TARGET_LPC1768 |
|||
|
|||
#include "../../core/macros.h" |
|||
#include "../../core/serial.h" |
|||
#include <stdarg.h> |
|||
|
|||
#include "../shared/backtrace/unwinder.h" |
|||
#include "../shared/backtrace/unwmemaccess.h" |
|||
#include "watchdog.h" |
|||
#include <debug_frmwrk.h> |
|||
|
|||
|
|||
// Debug monitor that dumps to the Programming port all status when
|
|||
// an exception or WDT timeout happens - And then resets the board
|
|||
|
|||
// All the Monitor routines must run with interrupts disabled and
|
|||
// under an ISR execution context. That is why we cannot reuse the
|
|||
// Serial interrupt routines or any C runtime, as we don't know the
|
|||
// state we are when running them
|
|||
|
|||
// A SW memory barrier, to ensure GCC does not overoptimize loops
|
|||
#define sw_barrier() __asm__ volatile("": : :"memory"); |
|||
|
|||
// (re)initialize UART0 as a monitor output to 250000,n,8,1
|
|||
static void TXBegin() { |
|||
} |
|||
|
|||
// Send character through UART with no interrupts
|
|||
static void TX(char c) { |
|||
_DBC(c); |
|||
} |
|||
|
|||
// Send String through UART
|
|||
static void TX(const char* s) { |
|||
while (*s) TX(*s++); |
|||
} |
|||
|
|||
static void TXDigit(uint32_t d) { |
|||
if (d < 10) TX((char)(d+'0')); |
|||
else if (d < 16) TX((char)(d+'A'-10)); |
|||
else TX('?'); |
|||
} |
|||
|
|||
// Send Hex number thru UART
|
|||
static void TXHex(uint32_t v) { |
|||
TX("0x"); |
|||
for (uint8_t i = 0; i < 8; i++, v <<= 4) |
|||
TXDigit((v >> 28) & 0xF); |
|||
} |
|||
|
|||
// Send Decimal number thru UART
|
|||
static void TXDec(uint32_t v) { |
|||
if (!v) { |
|||
TX('0'); |
|||
return; |
|||
} |
|||
|
|||
char nbrs[14]; |
|||
char *p = &nbrs[0]; |
|||
while (v != 0) { |
|||
*p++ = '0' + (v % 10); |
|||
v /= 10; |
|||
} |
|||
do { |
|||
p--; |
|||
TX(*p); |
|||
} while (p != &nbrs[0]); |
|||
} |
|||
|
|||
// Dump a backtrace entry
|
|||
static bool UnwReportOut(void* ctx, const UnwReport* bte) { |
|||
int* p = (int*)ctx; |
|||
|
|||
(*p)++; |
|||
TX('#'); TXDec(*p); TX(" : "); |
|||
TX(bte->name?bte->name:"unknown"); TX('@'); TXHex(bte->function); |
|||
TX('+'); TXDec(bte->address - bte->function); |
|||
TX(" PC:");TXHex(bte->address); TX('\n'); |
|||
return true; |
|||
} |
|||
|
|||
#ifdef UNW_DEBUG |
|||
void UnwPrintf(const char* format, ...) { |
|||
char dest[256]; |
|||
va_list argptr; |
|||
va_start(argptr, format); |
|||
vsprintf(dest, format, argptr); |
|||
va_end(argptr); |
|||
TX(&dest[0]); |
|||
} |
|||
#endif |
|||
|
|||
/* Table of function pointers for passing to the unwinder */ |
|||
static const UnwindCallbacks UnwCallbacks = { |
|||
UnwReportOut, |
|||
UnwReadW, |
|||
UnwReadH, |
|||
UnwReadB |
|||
#ifdef UNW_DEBUG |
|||
,UnwPrintf |
|||
#endif |
|||
}; |
|||
|
|||
|
|||
/**
|
|||
* HardFaultHandler_C: |
|||
* This is called from the HardFault_HandlerAsm with a pointer the Fault stack |
|||
* as the parameter. We can then read the values from the stack and place them |
|||
* into local variables for ease of reading. |
|||
* We then read the various Fault Status and Address Registers to help decode |
|||
* cause of the fault. |
|||
* The function ends with a BKPT instruction to force control back into the debugger |
|||
*/ |
|||
extern "C" |
|||
void HardFault_HandlerC(unsigned long *sp, unsigned long lr, unsigned long cause) { |
|||
|
|||
static const char* causestr[] = { |
|||
"NMI","Hard","Mem","Bus","Usage","Debug","WDT","RSTC" |
|||
}; |
|||
|
|||
UnwindFrame btf; |
|||
|
|||
// Dump report to the Programming port (interrupts are DISABLED)
|
|||
TXBegin(); |
|||
TX("\n\n## Software Fault detected ##\n"); |
|||
TX("Cause: "); TX(causestr[cause]); TX('\n'); |
|||
|
|||
TX("R0 : "); TXHex(((unsigned long)sp[0])); TX('\n'); |
|||
TX("R1 : "); TXHex(((unsigned long)sp[1])); TX('\n'); |
|||
TX("R2 : "); TXHex(((unsigned long)sp[2])); TX('\n'); |
|||
TX("R3 : "); TXHex(((unsigned long)sp[3])); TX('\n'); |
|||
TX("R12 : "); TXHex(((unsigned long)sp[4])); TX('\n'); |
|||
TX("LR : "); TXHex(((unsigned long)sp[5])); TX('\n'); |
|||
TX("PC : "); TXHex(((unsigned long)sp[6])); TX('\n'); |
|||
TX("PSR : "); TXHex(((unsigned long)sp[7])); TX('\n'); |
|||
|
|||
// Configurable Fault Status Register
|
|||
// Consists of MMSR, BFSR and UFSR
|
|||
TX("CFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED28)))); TX('\n'); |
|||
|
|||
// Hard Fault Status Register
|
|||
TX("HFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED2C)))); TX('\n'); |
|||
|
|||
// Debug Fault Status Register
|
|||
TX("DFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED30)))); TX('\n'); |
|||
|
|||
// Auxiliary Fault Status Register
|
|||
TX("AFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED3C)))); TX('\n'); |
|||
|
|||
// Read the Fault Address Registers. These may not contain valid values.
|
|||
// Check BFARVALID/MMARVALID to see if they are valid values
|
|||
// MemManage Fault Address Register
|
|||
TX("MMAR : "); TXHex((*((volatile unsigned long *)(0xE000ED34)))); TX('\n'); |
|||
|
|||
// Bus Fault Address Register
|
|||
TX("BFAR : "); TXHex((*((volatile unsigned long *)(0xE000ED38)))); TX('\n'); |
|||
|
|||
TX("ExcLR: "); TXHex(lr); TX('\n'); |
|||
TX("ExcSP: "); TXHex((unsigned long)sp); TX('\n'); |
|||
|
|||
btf.sp = ((unsigned long)sp) + 8*4; // The original stack pointer
|
|||
btf.fp = btf.sp; |
|||
btf.lr = ((unsigned long)sp[5]); |
|||
btf.pc = ((unsigned long)sp[6]) | 1; // Force Thumb, as CORTEX only support it
|
|||
|
|||
// Perform a backtrace
|
|||
TX("\nBacktrace:\n\n"); |
|||
int ctr = 0; |
|||
UnwindStart(&btf, &UnwCallbacks, &ctr); |
|||
|
|||
// Disable all NVIC interrupts
|
|||
NVIC->ICER[0] = 0xFFFFFFFF; |
|||
NVIC->ICER[1] = 0xFFFFFFFF; |
|||
|
|||
// Relocate VTOR table to default position
|
|||
SCB->VTOR = 0; |
|||
|
|||
// Clear cause of reset to prevent entering smoothie bootstrap
|
|||
HAL_clear_reset_source(); |
|||
|
|||
// Restart watchdog
|
|||
#if ENABLED(USE_WATCHDOG) |
|||
//WDT_Restart(WDT);
|
|||
watchdog_init(); |
|||
#endif |
|||
|
|||
// Reset controller
|
|||
NVIC_SystemReset(); |
|||
|
|||
// Nothing below here is compiled because NVIC_SystemReset loops forever
|
|||
|
|||
for (;;) { TERN_(USE_WATCHDOG, watchdog_init()); } |
|||
} |
|||
|
|||
extern "C" { |
|||
__attribute__((naked)) void NMI_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#0") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
__attribute__((naked)) void HardFault_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#1") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
__attribute__((naked)) void MemManage_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#2") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
__attribute__((naked)) void BusFault_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#3") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
__attribute__((naked)) void UsageFault_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#4") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
__attribute__((naked)) void DebugMon_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#5") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
/* This is NOT an exception, it is an interrupt handler - Nevertheless, the framing is the same */ |
|||
__attribute__((naked)) void WDT_IRQHandler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#6") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
|
|||
__attribute__((naked)) void RSTC_Handler() { |
|||
__asm__ __volatile__ ( |
|||
".syntax unified" "\n\t" |
|||
A("tst lr, #4") |
|||
A("ite eq") |
|||
A("mrseq r0, msp") |
|||
A("mrsne r0, psp") |
|||
A("mov r1,lr") |
|||
A("mov r2,#7") |
|||
A("b HardFault_HandlerC") |
|||
); |
|||
} |
|||
} |
|||
#endif // TARGET_LPC1768
|
@ -0,0 +1,51 @@ |
|||
/**
|
|||
* Marlin 3D Printer Firmware |
|||
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|||
* |
|||
* Based on Sprinter and grbl. |
|||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
* |
|||
*/ |
|||
#ifdef TARGET_LPC1768 |
|||
|
|||
#include "../../inc/MarlinConfig.h" |
|||
#include "HAL.h" |
|||
|
|||
#if ENABLED(POSTMORTEM_DEBUGGING) |
|||
|
|||
#include "../shared/HAL_MinSerial.h" |
|||
#include <debug_frmwrk.h> |
|||
|
|||
static void TX(char c) { _DBC(c); } |
|||
void install_min_serial() { HAL_min_serial_out = &TX; } |
|||
|
|||
#if DISABLED(DYNAMIC_VECTORTABLE) |
|||
extern "C" { |
|||
__attribute__((naked)) void JumpHandler_ASM() { |
|||
__asm__ __volatile__ ( |
|||
"b CommonHandler_ASM\n" |
|||
); |
|||
} |
|||
void __attribute__((naked, alias("JumpHandler_ASM"))) HardFault_Handler(); |
|||
void __attribute__((naked, alias("JumpHandler_ASM"))) BusFault_Handler(); |
|||
void __attribute__((naked, alias("JumpHandler_ASM"))) UsageFault_Handler(); |
|||
void __attribute__((naked, alias("JumpHandler_ASM"))) MemManage_Handler(); |
|||
void __attribute__((naked, alias("JumpHandler_ASM"))) NMI_Handler(); |
|||
} |
|||
#endif |
|||
|
|||
#endif // POSTMORTEM_DEBUGGING
|
|||
#endif // TARGET_LPC1768
|
@ -0,0 +1,45 @@ |
|||
/**
|
|||
* Marlin 3D Printer Firmware |
|||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|||
* |
|||
* Based on Sprinter and grbl. |
|||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
* |
|||
*/ |
|||
#pragma once |
|||
|
|||
#include <SPI.h> |
|||
|
|||
/**
|
|||
* Marlin currently requires 3 SPI classes: |
|||
* |
|||
* SPIClass: |
|||
* This class is normally provided by frameworks and has a semi-default interface. |
|||
* This is needed because some libraries reference it globally. |
|||
* |
|||
* SPISettings: |
|||
* Container for SPI configs for SPIClass. As above, libraries may reference it globally. |
|||
* |
|||
* These two classes are often provided by frameworks so we cannot extend them to add |
|||
* useful methods for Marlin. |
|||
* |
|||
* MarlinSPI: |
|||
* Provides the default SPIClass interface plus some Marlin goodies such as a simplified |
|||
* interface for SPI DMA transfer. |
|||
* |
|||
*/ |
|||
|
|||
using MarlinSPI = SPIClass; |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue