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

Support for the stm32 platform #2185

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft

Support for the stm32 platform #2185

wants to merge 17 commits into from

Conversation

naichenzhao
Copy link
Collaborator

@naichenzhao naichenzhao commented Feb 6, 2024

Subsumes #2103.

@lhstrh lhstrh added the feature New feature label Feb 7, 2024
@lhstrh lhstrh changed the title redid the Stm32 support. last one was having rebase issues Support for the stm32 platform Feb 7, 2024
@lhstrh lhstrh requested a review from erlingrj February 7, 2024 04:01
@lhstrh
Copy link
Member

lhstrh commented Feb 7, 2024

@erlingrj and @tanneberger: it seems to me that a better place to implement this would be in lingo, but @naichenzhao would need help with that. Luckily, this isn't a big PR, so it might be worth bringing it to lingo right away, and not merge it into lingua-franca first. WDYT? Would you be able to help? We do need this functionality soon though, because @naichenzhao and the people in his lab will be using it extensively for their project...

Copy link
Collaborator

@erlingrj erlingrj left a comment

Choose a reason for hiding this comment

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

This looks promising @naichenzhao!

On a higher level. I worry that we will just pile on code and complexity for each target we want to support. It would be a huge improvement if STM32/Pico/Zephyr/++ support could be captured in a single CMake file that is not code-generated but just embedded in the JAR. @petervdonovan discuss this a little her: #2154.

I think we can merge in the STM32 stuff. But after this we should think a little about how we can make this scale better.


// Declaration preamble
code.pr("set(PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR})");
code.pr("set(STM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../STM_sdk)");
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems to require that you have a directory called STM_sdk in some relative position wrt to src-gen directory? I think we want the user to download the STM SDK themselves and define an environment variable pointing to it

Copy link
Collaborator

Choose a reason for hiding this comment

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

Any update here? I think we should require an environmental variable pointing to where STM_sdk is located and the user can then put it anywhere

core/src/main/java/org/lflang/generator/c/CGenerator.java Outdated Show resolved Hide resolved
@lhstrh
Copy link
Member

lhstrh commented May 17, 2024

@naichenzhao, do you think you'll find an opportunity to work on this anytime soon? This efforts needs to be revived...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants