-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from project-mahiwa/feat/coremark
feat coremarkの動作機能を追加
- Loading branch information
Showing
8 changed files
with
77 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,4 +80,5 @@ lib_deps = wasm3/Wasm3@^0.5.0 | |
build_flags = | ||
${env.build_flags} | ||
-DESP32 | ||
-DUSE_COREMARK | ||
-DCORE_DEBUG_LEVEL=5 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include <lib/wasm-functions/mahiwa/coremark/coremark.hpp> | ||
|
||
// coremark-minimalに必要な関数を用意する | ||
// (import "env" "clock_ms" (func (;0;) (type 8))) | ||
// (type (;8;) (func (result i64))) | ||
m3ApiRawFunction(m3_clock_ms) | ||
{ | ||
// cppcheck-suppress cstyleCast | ||
m3ApiReturnType(int64_t); | ||
m3ApiReturn(millis()); | ||
m3ApiSuccess(); | ||
} | ||
|
||
M3Result mahiwa_LinkCoremark(IM3Runtime runtime) | ||
{ | ||
Serial.println("link coremark function"); | ||
IM3Module module = runtime->modules; | ||
|
||
m3_LinkRawFunction(module, "env", "clock_ms", "I()", &m3_clock_ms); | ||
|
||
return m3Err_none; | ||
} |
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,6 @@ | ||
#pragma once | ||
|
||
#include <m3_env.h> | ||
#include <Arduino.h> | ||
|
||
M3Result mahiwa_LinkCoremark(IM3Runtime runtime); |
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