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

Stepping without using class vtables #1349

Merged
merged 30 commits into from
Oct 29, 2024
Merged

Stepping without using class vtables #1349

merged 30 commits into from
Oct 29, 2024

Conversation

MitchBradley
Copy link
Collaborator

This fixes the recent crash problems while saving DRAM space. It does so by coalescing the Stepping code that needs to be in IRAM into a single place (Stepping.cpp) instead of having bits of it distributed through the Axes / Motors / Pins hierarchies. This reduces the DRAM footprint by about 20K.

The only vtables that are still in DRAM are the .rodata sections from the Spindle classes.

MitchBradley and others added 30 commits October 3, 2024 10:50
Avoids the need to move Motor and Pin vtables into RAM, thus saving
about 20K of precious RAM space.  It also simplifies the structure
of the stepping code dramatically, so it is all in one place instead
of being distributed throughout a complex class hierarchy.
Standard stepper and Trinamic Uart derivatives worked, but Trinamic
SPI driver failed to call their base class's init() method.
The problem was that pulse_func() can do nothing if it is not
awake, and in that case, the _pulse_data variable was holding
old data.
* Fixed Generate_VCXProj

* Moved VFD spindles to their own namespace and inheritance structure. TODO: Configuration.

* Changed the factory a bit to ensure configurations still work.

* This compiles. TODO: Loader script.

* Changed names and made them consistent. This also removes them from IRAM.

* Split out the VFDProtocol code into a separate file.

* Added comment

---------

Co-authored-by: Stefan de Bruijn <[email protected]>
@bdring bdring merged commit 2b63638 into main Oct 29, 2024
37 checks passed
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.

3 participants