-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add minimal code to compile LF for FlexPRET with uC reactor. Does not…
… print the expected "hello world"
- Loading branch information
Showing
7 changed files
with
63 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule reactor-uc
updated
38 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
cmake_minimum_required(VERSION 3.22) | ||
|
||
# Set toolchain to RISC-V; must be done before call to project() | ||
include($ENV{FP_SDK_PATH}/cmake/riscv-toolchain.cmake) | ||
|
||
project(lf-fp-uc | ||
LANGUAGES C | ||
DESCRIPTION "LF on FlexPRET using uC runtime" | ||
VERSION 1.0.0 | ||
) | ||
|
||
add_executable(fp-lf-uc main.c) | ||
|
||
target_link_libraries(fp-lf-uc PRIVATE | ||
${CMAKE_CURRENT_LIST_DIR}/../build/libFlexPRET_uC.a | ||
${CMAKE_CURRENT_LIST_DIR}/../build/reactor-uc/libreactor-uc.a | ||
) | ||
|
||
set(DEBUG true) | ||
|
||
add_subdirectory($ENV{FP_SDK_PATH} BINARY_DIR) | ||
target_link_libraries(fp-lf-uc PRIVATE fp-sdk) | ||
|
||
include($ENV{FP_SDK_PATH}/cmake/fp-app.cmake) | ||
|
||
fp_add_outputs(fp-lf-uc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "../src-gen/lf_main.h" | ||
int main(void) { | ||
lf_main(0, 0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
target uC { | ||
platform: "FlexPRET" | ||
} | ||
|
||
main reactor { | ||
timer t(0, 100 msec) | ||
reaction(t) {= | ||
printf("Hello World from FlexPRET!\n"); | ||
=} | ||
} |