Skip to content

Commit 42c02c6

Browse files
committed
add maixduino-wasm3-stdlib
1 parent 0665b49 commit 42c02c6

File tree

18 files changed

+575
-0
lines changed

18 files changed

+575
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
{
3+
"configurations": [
4+
{
5+
"name": "k210",
6+
"includePath": [
7+
"${workspaceRoot}/stdlib/**",
8+
"${workspaceRoot}/kendryte-standalone-sdk/lib/**",
9+
"/home/hiromasa/toolchain/kendryte-toolchain/lib/**"
10+
],
11+
"cStandard": "c11",
12+
"cppStandard": "c++17"
13+
}
14+
],
15+
"version": 4
16+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"ms-vscode.cpptools",
4+
"EditorConfig.EditorConfig"
5+
]
6+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"files.associations": {
3+
"*.toml": "toml",
4+
"shared.h": "c",
5+
"chrono": "c",
6+
"string.h": "c",
7+
"lcd.h": "c",
8+
"unistd.h": "c"
9+
}
10+
}

maixduino-wasm3-stdlib/CMakeLists.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# basic config
2+
if (NOT PROJ)
3+
get_filename_component(PROJ ${CMAKE_CURRENT_BINARY_DIR} DIRECTORY)
4+
get_filename_component(PROJ ${PROJ} NAME)
5+
string(REPLACE " " "_" PROJ ${PROJ})
6+
message(STATUS "PROJ not set, use ${PROJ} as PROJ. Also, you can set it manually. e.g. -DPROJ=hello_world")
7+
else()
8+
message("PROJ = ${PROJ}")
9+
endif ()
10+
cmake_minimum_required(VERSION 3.0)
11+
include(./cmake/common.cmake)
12+
project(${PROJ} C CXX ASM)
13+
14+
# config self use headers
15+
include(./cmake/macros.internal.cmake)
16+
header_directories(${SDK_ROOT}/lib)
17+
header_directories(${PROJ})
18+
header_directories(${PROJ}/m3)
19+
20+
# compile project
21+
add_source_files(
22+
${PROJ}/main.c
23+
${PROJ}/maixduino.c
24+
${PROJ}/lcd/lcd.c
25+
${PROJ}/lcd/st7789.c
26+
${PROJ}/m3/m3_api_libc.c
27+
${PROJ}/m3/m3_api_meta_wasi.c
28+
${PROJ}/m3/m3_api_wasi.c
29+
${PROJ}/m3/m3_bind.c
30+
${PROJ}/m3/m3_code.c
31+
${PROJ}/m3/m3_compile.c
32+
${PROJ}/m3/m3_core.c
33+
${PROJ}/m3/m3_emit.c
34+
${PROJ}/m3/m3_env.c
35+
${PROJ}/m3/m3_exec.c
36+
${PROJ}/m3/m3_info.c
37+
${PROJ}/m3/m3_module.c
38+
${PROJ}/m3/m3_optimize.c
39+
${PROJ}/m3/m3_parse.c
40+
)
41+
add_compile_flags(C
42+
-Os
43+
-Dd_m3LogOutput=true
44+
-Dd_m3VerboseLogs=true
45+
)
46+
include(./cmake/executable.cmake)

maixduino-wasm3-stdlib/cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../components/cmake/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../kendryte-standalone-sdk/

maixduino-wasm3-stdlib/lds

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../components/lds/

maixduino-wasm3-stdlib/stdlib/app.wasm.h

Lines changed: 284 additions & 0 deletions
Large diffs are not rendered by default.

maixduino-wasm3-stdlib/stdlib/lcd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../components/lcd/

maixduino-wasm3-stdlib/stdlib/m3

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../wasm3/source/

0 commit comments

Comments
 (0)