-
Notifications
You must be signed in to change notification settings - Fork 67
Support for the stm32
platform
#2185
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
Draft
naichenzhao
wants to merge
25
commits into
master
Choose a base branch
from
stm32_2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+115
−12
Draft
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
1ef67b0
Added Stm32 platform
lhstrh 56ed5f6
initial STM32 support works but very hard-coded
naichenzhao 9728279
we dont need STM_main anymore
naichenzhao e87f1b2
should be able to copy most of generated libraaries
naichenzhao 522db67
updated to move code out of core cmake
naichenzhao 127d62a
fixed print
naichenzhao 6423ee1
maybe this works?
naichenzhao 2de5aa4
removed sdk
naichenzhao 972470c
bump reactor
naichenzhao 58a444c
Merge branch 'master' of github.com:lf-lang/lingua-franca into stm32_2
naichenzhao b9f4770
small test commit
naichenzhao 368ffe3
updating pointers:
naichenzhao 8876b6b
bump reactor
naichenzhao 0be631e
slight update to code
naichenzhao 38b2313
bump reactor again
naichenzhao e89b9e7
formatting
naichenzhao 35c7437
bimp and format
naichenzhao 4ea0ab3
bump reactor-c again
naichenzhao 5c3939d
bump reactor
naichenzhao 1192af1
bump reactor again
naichenzhao 60d9eac
bump reactor and clean
naichenzhao 9f0dd8e
Add cmake-init-include target property
erlingrj b8b75e2
Move STM32F4 cmake out of lfc and require the user to provide it inst…
erlingrj a34676f
Merge remote-tracking branch 'origin/master' into stm32_2
erlingrj 05b449c
Merge with master and bump reactor-c
erlingrj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
47 changes: 47 additions & 0 deletions
47
core/src/main/java/org/lflang/target/property/CmakeInitIncludeProperty.java
This file contains hidden or 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,47 @@ | ||
package org.lflang.target.property; | ||
|
||
import java.util.List; | ||
|
||
import org.lflang.MessageReporter; | ||
import org.lflang.ast.ASTUtils; | ||
import org.lflang.lf.Element; | ||
|
||
/** | ||
* Directive to specify cmake initialize files to be included at the very beginning of the | ||
* generated CMakeLists.txt. Here the user can override things like the toolchain file | ||
*/ | ||
|
||
public final class CmakeInitIncludeProperty extends FileListProperty { | ||
|
||
/** Singleton target property instance. */ | ||
public static final CmakeInitIncludeProperty INSTANCE = new CmakeInitIncludeProperty(); | ||
|
||
private CmakeInitIncludeProperty() { | ||
super(); | ||
} | ||
|
||
@Override | ||
protected List<String> fromAst(Element node, MessageReporter reporter) { | ||
return ASTUtils.elementToListOfStrings(node); | ||
} | ||
|
||
@Override | ||
protected List<String> fromString(String string, MessageReporter reporter) { | ||
throw new UnsupportedOperationException("Not supported yet."); | ||
} | ||
|
||
@Override | ||
public Element toAstElement(List<String> value) { | ||
return ASTUtils.toElement(value); | ||
} | ||
|
||
@Override | ||
public String name() { | ||
return "cmake-init-include"; | ||
} | ||
|
||
@Override | ||
public boolean loadFromFederate() { | ||
return true; | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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-c
updated
8 files
23 changes: 23 additions & 0 deletions
23
core/src/main/resources/lib/platform/stm32/arm-none-eabi-gcc.cmake
This file contains hidden or 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,23 @@ | ||
set(CMAKE_SYSTEM_NAME Generic) | ||
set(CMAKE_SYSTEM_PROCESSOR arm) | ||
|
||
# Some default GCC settings | ||
set(TOOLCHAIN_PREFIX arm-none-eabi-) | ||
set(FLAGS | ||
erlingrj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"-fdata-sections -ffunction-sections \ | ||
--specs=nano.specs -Wl,--gc-sections") | ||
set(CPP_FLAGS | ||
"-fno-rtti -fno-exceptions \ | ||
-fno-threadsafe-statics") | ||
|
||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc ${FLAGS}) | ||
set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) | ||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++ ${FLAGS} ${CPP_FLAGS}) | ||
set(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy) | ||
set(CMAKE_SIZE ${TOOLCHAIN_PREFIX}size) | ||
|
||
set(CMAKE_EXECUTABLE_SUFFIX_ASM ".elf") | ||
set(CMAKE_EXECUTABLE_SUFFIX_C ".elf") | ||
set(CMAKE_EXECUTABLE_SUFFIX_CXX ".elf") | ||
|
||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.