-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Zephyr support for the C target #1536
Conversation
…ve building of Zephyr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, follows the Arduino approach which as long as it passes all the tests should be fine.
It looks like the test failures are mostly just network issues 😢 and not actual failures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good to me. I left some comments, but none of them are important enough to justify delaying this PR.
Path buildPath = fileConfig.getSrcGenPath().resolve("build"); | ||
String board = targetConfig.platformOptions.board; | ||
LFCommand cmd; | ||
if (board == null || board.startsWith("qemu")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be a way to change the type of board
back to an enum (as it was before this PR), and thereby to avoid having to do this sort of string-matching -- or at least, to restrict the string-matching to a single place that is not buried deep in org.lflang.generator.c
. Enums can be constructed with parameters, so even though the total number of boards might be too large to enumerate, you could have a few types of boards (e.g., ARDUINO
, QEMU
, ...) that also come with a String
that specifies the exact name of the board.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. @arengarajan99 and I will have to figure out something clever here. Or wait until it is all factored out into the package manager...
Co-authored-by: Peter Donovan <33707478+petervdonovan@users.noreply.github.com>
Path buildPath = fileConfig.getSrcGenPath().resolve("build"); | ||
String board = targetConfig.platformOptions.board; | ||
LFCommand cmd; | ||
if (board == null || board.startsWith("qemu")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. @arengarajan99 and I will have to figure out something clever here. Or wait until it is all factored out into the package manager...
…franca into c-zephyr-support
Adds plug-and-play support for running LF programs ontop of Zephyr RTOS. It has a dependency on Zephyr which can be met by following this simple guide. We require Zephyr version 3.2.0. A proper guide should be written on our webpage.
To compile and emulate a LF program on a Arm Cortex M3 emulation
To compile and flash onto a connected nrf52dk board
The code generator will create, in
src-gen
a project that can be compiled easily by just cding in and calling
west build`.