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

CMake Support [breaking change Ctor API] #107

Merged
merged 12 commits into from
Feb 5, 2025

Conversation

joerossrobotics
Copy link
Contributor

@joerossrobotics joerossrobotics commented Feb 3, 2025

This pull request introduces CMake support to the project. This enables use of the library outside of the Arduino ecosystem, just as with the cyphal library. This would be beneficial to many who want to make use of the robustness of 107 systems work, but that operate in frameworks other than Arduino.

Copy link

github-actions bot commented Feb 3, 2025

Memory usage change @ 28f719d

Board flash % RAM for global variables %
arduino:renesas_portenta:portenta_c33 🔺 +176 - +176 +0.01 - +0.01 🔺 +32 - +32 +0.01 - +0.01
arduino:renesas_uno:minima 🔺 +176 - +176 +0.07 - +0.07 🔺 +32 - +32 +0.1 - +0.1
arduino:samd:mkrzero 🔺 +180 - +184 +0.07 - +0.07 🔺 +32 - +32 +0.1 - +0.1
rp2040:rp2040:rpipico 🔺 +160 - +168 +0.01 - +0.01 🔺 +32 - +32 +0.01 - +0.01
Click for full report table
Board examples/MCP2515-CAN-Sniffer
flash
% examples/MCP2515-CAN-Sniffer
RAM for global variables
% examples/MCP2515-Filter
flash
% examples/MCP2515-Filter
RAM for global variables
% examples/MCP2515-Loopback
flash
% examples/MCP2515-Loopback
RAM for global variables
%
arduino:renesas_portenta:portenta_c33 176 0.01 32 0.01 176 0.01 32 0.01 176 0.01 32 0.01
arduino:renesas_uno:minima 176 0.07 32 0.1 176 0.07 32 0.1 176 0.07 32 0.1
arduino:samd:mkrzero 180 0.07 32 0.1 184 0.07 32 0.1 184 0.07 32 0.1
rp2040:rp2040:rpipico 168 0.01 32 0.01 160 0.01 32 0.01 168 0.01 32 0.01
Click for full report CSV
Board,examples/MCP2515-CAN-Sniffer<br>flash,%,examples/MCP2515-CAN-Sniffer<br>RAM for global variables,%,examples/MCP2515-Filter<br>flash,%,examples/MCP2515-Filter<br>RAM for global variables,%,examples/MCP2515-Loopback<br>flash,%,examples/MCP2515-Loopback<br>RAM for global variables,%
arduino:renesas_portenta:portenta_c33,176,0.01,32,0.01,176,0.01,32,0.01,176,0.01,32,0.01
arduino:renesas_uno:minima,176,0.07,32,0.1,176,0.07,32,0.1,176,0.07,32,0.1
arduino:samd:mkrzero,180,0.07,32,0.1,184,0.07,32,0.1,184,0.07,32,0.1
rp2040:rp2040:rpipico,168,0.01,32,0.01,160,0.01,32,0.01,168,0.01,32,0.01

Copy link
Member

@aentinger aentinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define MilliSecondFunc, use instead of MicroSecondFunc.

Copy link

github-actions bot commented Feb 4, 2025

Memory usage change @ 577a29d

Board flash % RAM for global variables %
arduino:renesas_portenta:portenta_c33 🔺 +176 - +176 +0.01 - +0.01 🔺 +32 - +32 +0.01 - +0.01
arduino:renesas_uno:minima 🔺 +176 - +176 +0.07 - +0.07 🔺 +32 - +32 +0.1 - +0.1
arduino:samd:mkrzero 🔺 +180 - +184 +0.07 - +0.07 🔺 +32 - +32 +0.1 - +0.1
rp2040:rp2040:rpipico 🔺 +160 - +168 +0.01 - +0.01 🔺 +32 - +32 +0.01 - +0.01
Click for full report table
Board examples/MCP2515-CAN-Sniffer
flash
% examples/MCP2515-CAN-Sniffer
RAM for global variables
% examples/MCP2515-Filter
flash
% examples/MCP2515-Filter
RAM for global variables
% examples/MCP2515-Loopback
flash
% examples/MCP2515-Loopback
RAM for global variables
%
arduino:renesas_portenta:portenta_c33 176 0.01 32 0.01 176 0.01 32 0.01 176 0.01 32 0.01
arduino:renesas_uno:minima 176 0.07 32 0.1 176 0.07 32 0.1 176 0.07 32 0.1
arduino:samd:mkrzero 180 0.07 32 0.1 184 0.07 32 0.1 184 0.07 32 0.1
rp2040:rp2040:rpipico 168 0.01 32 0.01 160 0.01 32 0.01 168 0.01 32 0.01
Click for full report CSV
Board,examples/MCP2515-CAN-Sniffer<br>flash,%,examples/MCP2515-CAN-Sniffer<br>RAM for global variables,%,examples/MCP2515-Filter<br>flash,%,examples/MCP2515-Filter<br>RAM for global variables,%,examples/MCP2515-Loopback<br>flash,%,examples/MCP2515-Loopback<br>RAM for global variables,%
arduino:renesas_portenta:portenta_c33,176,0.01,32,0.01,176,0.01,32,0.01,176,0.01,32,0.01
arduino:renesas_uno:minima,176,0.07,32,0.1,176,0.07,32,0.1,176,0.07,32,0.1
arduino:samd:mkrzero,180,0.07,32,0.1,184,0.07,32,0.1,184,0.07,32,0.1
rp2040:rp2040:rpipico,168,0.01,32,0.01,160,0.01,32,0.01,168,0.01,32,0.01

@aentinger
Copy link
Member

I suggest that you add typedef std::function<unsigned long()> MilliSecondFunc; to MCP2515_Types.h and pass through to the various functions.

@joerossrobotics
Copy link
Contributor Author

@aentinger I have made that change. This does end up modifying the constructor, are we not concerned about this breaking change?

@aentinger
Copy link
Member

You could mitigate it with an default argument, although on second check you can't. Well, I'm okay with a breaking change now and then. This one is allright.

@aentinger aentinger changed the title CMake Support CMake Support [breaking change Ctor API] Feb 5, 2025
@aentinger
Copy link
Member

You'll need to fix the breaking changes in the examples though ...

@aentinger aentinger merged commit c909f40 into 107-systems:main Feb 5, 2025
8 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