Skip to content

Commit 3794eb3

Browse files
authored
Merge pull request #40 from smartobjectoriented/39-align-micropython-build
39 align micropython build
2 parents afc7634 + 0c6ed25 commit 3794eb3

5 files changed

Lines changed: 25 additions & 9 deletions

File tree

so3/usr/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ cmake_minimum_required(VERSION 3.16)
66

77
project(so3-usr LANGUAGES C ASM)
88

9+
option(MICROPYTHON "Support for micro-python apps" OFF)
10+
11+
912
# Detect the correct compiler runtime library and add it
1013
# to 'LIBCXX_LIBRARIES'. back to gcc_s if available.
1114

so3/usr/build.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,6 @@ else
9595
fi
9696
cd -
9797
98-
if [ "$PLATFORM" == "virt64" ]; then
99-
echo "Compiling microPython"
100-
cd src/micropython/ports/soo
101-
make
102-
cp build/firmware.elf ../../../../build/src/uPython.elf
103-
cd -
104-
fi
105-
106-
10798
mkdir -p build/deploy/
10899
109100
# SO3 shell
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
add_custom_command(OUTPUT firmware.elf
3+
DEPENDS c
4+
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/micropython
5+
COMMAND /bin/sh ${PROJECT_SOURCE_DIR}/src/micropython/build.sh ${PROJECT_BINARY_DIR}/src/micropython
6+
)
7+
8+
add_custom_target(uPython.elf ALL
9+
DEPENDS firmware.elf
10+
COMMAND mv ${PROJECT_BINARY_DIR}/src/micropython/firmware.elf ${PROJECT_BINARY_DIR}/src/micropython/uPython.elf
11+
)
12+

so3/usr/src/micropython/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
echo "Compiling microPython"
4+
5+
cd ports/soo
6+
7+
make BUILD=$1
8+
9+
10+
Binary file not shown.

0 commit comments

Comments
 (0)