Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generate.sh file to generated fed templates #215

Merged

Conversation

LasseRosenow
Copy link
Collaborator

As somewhat discussed in #213 this is a proposal on how we could generate gereate.sh files to generate src-gen sources πŸ˜΅β€πŸ’«

@LasseRosenow LasseRosenow changed the base branch from main to generate-fed-templates February 4, 2025 16:26
@LasseRosenow LasseRosenow requested a review from erlingrj February 4, 2025 16:26
Copy link
Contributor

github-actions bot commented Feb 4, 2025

Memory usage after merging this PR will be:

Memory Report

action_empty_test_c

from to increase (%)
text 60860 60860 0.00
data 752 752 0.00
bss 11360 11360 0.00
total 72972 72972 0.00

action_microstep_test_c

from to increase (%)
text 61731 61731 0.00
data 760 760 0.00
bss 11424 11424 0.00
total 73915 73915 0.00

action_overwrite_test_c

from to increase (%)
text 61568 61568 0.00
data 752 752 0.00
bss 11424 11424 0.00
total 73744 73744 0.00

action_test_c

from to increase (%)
text 61472 61472 0.00
data 760 760 0.00
bss 11424 11424 0.00
total 73656 73656 0.00

deadline_test_c

from to increase (%)
text 57102 57102 0.00
data 768 768 0.00
bss 10784 10784 0.00
total 68654 68654 0.00

delayed_conn_test_c

from to increase (%)
text 62464 62464 0.00
data 752 752 0.00
bss 10272 10272 0.00
total 73488 73488 0.00

event_payload_pool_test_c

from to increase (%)
text 18331 18331 0.00
data 624 624 0.00
bss 320 320 0.00
total 19275 19275 0.00

event_queue_test_c

from to increase (%)
text 27616 27616 0.00
data 736 736 0.00
bss 480 480 0.00
total 28832 28832 0.00

nanopb_test_c

from to increase (%)
text 42886 42886 0.00
data 904 904 0.00
bss 320 320 0.00
total 44110 44110 0.00

port_test_c

from to increase (%)
text 62412 62412 0.00
data 752 752 0.00
bss 10272 10272 0.00
total 73436 73436 0.00

reaction_queue_test_c

from to increase (%)
text 27448 27448 0.00
data 736 736 0.00
bss 480 480 0.00
total 28664 28664 0.00

request_shutdown_test_c

from to increase (%)
text 61703 61703 0.00
data 752 752 0.00
bss 11424 11424 0.00
total 73879 73879 0.00

startup_test_c

from to increase (%)
text 56801 56801 0.00
data 760 760 0.00
bss 10784 10784 0.00
total 68345 68345 0.00

tcp_channel_test_c

from to increase (%)
text 96867 96867 0.00
data 1256 1256 0.00
bss 21376 21376 0.00
total 119499 119499 0.00

timer_test_c

from to increase (%)
text 56692 56692 0.00
data 752 752 0.00
bss 10784 10784 0.00
total 68228 68228 0.00

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Benchmark results after merging this PR:

Benchmark results

Performance:

PingPongUc:
Best Time: 133.998 msec
Worst Time: 135.158 msec
Median Time: 134.521 msec

PingPongC:
Best Time: 204.604 msec
Worst Time: 208.832 msec
Median Time: 205.341 msec

ReactionLatencyUc:
Best latency: 28606 nsec
Median latency: 59892 nsec
Worst latency: 100043 nsec

ReactionLatencyC:
Best latency: 18327 nsec
Median latency: 60016 nsec
Worst latency: 155130 nsec

Memory usage:

PingPongUc:
text data bss dec hex filename
40932 760 7440 49132 bfec bin/PingPongUc

PingPongC:
text data bss dec hex filename
45826 880 360 47066 b7da bin/PingPongC

ReactionLatencyUc:
text data bss dec hex filename
30737 744 2080 33561 8319 bin/ReactionLatencyUc

ReactionLatencyC:
text data bss dec hex filename
41536 848 360 42744 a6f8 bin/ReactionLatencyC

@erlingrj
Copy link
Collaborator

erlingrj commented Feb 6, 2025

Lets try this route. I took the liberty to rename the script to run_lfc.sh as I like that better than generate.sh

@erlingrj erlingrj merged commit 0b0ac9b into generate-fed-templates Feb 6, 2025
7 of 8 checks passed
@LasseRosenow LasseRosenow deleted the generate-fed-templates-add-generate-script branch February 6, 2025 10:03
erlingrj added a commit that referenced this pull request Feb 10, 2025
* WIP

* Add beginnings of RIOT Makefile

* Implement LFC templates for RIOT (#210)

* Implement LFC templates for RIOT

* Remove makefile from coap-federated example

* Refactor string formatting a little

* Fix RIOT makefile generation

---------

Co-authored-by: erlingrj <[email protected]>

* Add `generate.sh` file to generated fed templates (#215)

* Generate generate.sh files to invoke lfc from a federate

* Spotless

---------

Co-authored-by: erlingrj <[email protected]>

* generate.sh -> run_lfc.sh

* Split generated CMake into Include.cmake and CMakeLists.txt

* Fix shell script

* Sanitize input to lf_build_generated_code

* Updates

* Fix riot test

* Fix riot example

* Run formatter

* FIx merge

* Debug CI

* correct path to enc

* Formatting

* Test gen-fed-templates in CI

* CI

* CI

* Dont do RIOT yet because of CI issue

* CI

* Formating

* Delete mistakenly committed files

---------

Co-authored-by: Lasse Rosenow <[email protected]>
Co-authored-by: Lasse Rosenow <[email protected]>
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