lf-lang / reactor-c

A reactor runtime written in C
Other
11 stars 24 forks source link

Support for FlexPRET platform #412

Closed magnmaeh closed 4 months ago

magnmaeh commented 5 months ago

This PR adds support for the FlexPRET platform.

magnmaeh commented 5 months ago

I believe this PR now is ready for review :)

magnmaeh commented 5 months ago

One change I made that probably affects other platforms too:

I added #include "low_level_platform.h" in platform.h and target_link_libraries(lf-platform-api INTERFACE lf-low-level-platform-api) to platform's CMakeLists.txt. This ensures low_level_platform.h is always included when platform.h is included, which I think makes a lot of sense.

EDIT: This caused Zephyr CI tests to fail, so removed this.

magnmaeh commented 4 months ago

Thank you for the review! I'm on vacation until Friday, so there will be much less work on my end until then, just so you know. Might do a little work here and there :)

lhstrh commented 4 months ago

Enjoy the vacation and rest up! You did a tremendous amount of work... :rocket:

magnmaeh commented 4 months ago

Hmm, no jobs were run... Do you know what the issue might be @lhstrh?

magnmaeh commented 4 months ago

@erlingrj I fixed all concerns now. I was able to fix the underlying issue that made me add the platform-specific code in util.c and tracepoint.h in the first place (https://github.com/lf-lang/reactor-c/pull/412#discussion_r1605809715). Only thing is I don't exactly understand why just the first test runs...

EDIT: Right, I was referencing a file that does not exist in the main LF repo yet

magnmaeh commented 4 months ago

This looks good to me. If you want to run CI with a specific branch of lingua-franca, then write the branch name into lingua-franca-ref.txt. Before we merge we modify back to master

Hmm, the ref thing does not seem to work since my branch is on a fork as well... I can change to URL (lf-lang/lingua-franca/.github/workflows/c-flexpret-tests.yml@master) to point to my fork as well though, i.e., magnmaeh/lingua-franca/.github/workflows/c-flexpret-tests.yml@add-flexpret-support, which is valid. But that file depends on lots of other files again and fails.

Maybe its better to just try and resolve any CI issues in the main repo PR instead?

erlingrj commented 4 months ago

Yes, when CI passes in the PR of lingua-franca then we merge both!

lhstrh commented 4 months ago

Let me push out one more patch release before merging this.