8000 Add support for MIPS big-endian, using OpenWRT SDK. · godlygeek/circuitpython@bf7e6d6 · GitHub
[go: up one dir, main page]

Skip to content

Commit bf7e6d6

Browse files
committed
Add support for MIPS big-endian, using OpenWRT SDK.
1 parent 3afca67 commit bf7e6d6

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

tests/run-tests.mipseb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MICROPY_MICROPYTHON=../unix/micropython.mipseb ./run-tests "$@"

unix/build-mipseb.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
3+
OPENWRT_SDK=~/toolchain/OpenWrt-SDK-atheros-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2
4+
5+
GCC_PATH=$OPENWRT_SDK/staging_dir/toolchain-mips_mips32_gcc-4.8-linaro_uClibc-0.9.33.2/bin
6+
export STAGING_DIR=$OPENWRT_SDK/staging_dir/target-mips_mips32_uClibc-0.9.33.2
7+
export PATH=$GCC_PATH:$PATH
8+
9+
# Don't even generate .pdr
10+
# CFLAGS_EXTRA="-Wa,-mno-pdr"
11+
#-march=24kc -DNDEBUG -mips16
12+
13+
make CROSS_COMPILE=mips-openwrt-linux- libffi
14+
15+
make CROSS_COMPILE=mips-openwrt-linux- CWARN="-Wall" \
16+
COPT="-Os" \
17+
CFLAGS_EXTRA="-DMICROPY_GCREGS_SETJMP=1 -DMICROPY_NLR_SETJMP=1 -DMICROPY_EMIT_X64=0" \
18+
LDFLAGS_EXTRA="-lcurses -static-libgcc" \
19+
STRIPFLAGS_EXTRA="--remove-section=.pdr -R .comment -R .gnu.version -R .gnu.version_r \
20+
-R .gnu.attributes -R .reginfo -R .mdebug.abi32" \
21+
MICROPY_STANDALONE=1 \
22+
V=1 -B

unix/micropython.mipseb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
OPENWRT_SDK=~/toolchain/OpenWrt-SDK-atheros-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2
4+
5+
qemu-mips -L $OPENWRT_SDK/staging_dir/toolchain-mips_mips32_gcc-4.8-linaro_uClibc-0.9.33.2 \
6+
-E LD_LIBRARY_PATH=$OPENWRT_SDK/staging_dir/target-mips_mips32_uClibc-0.9.33.2/usr/lib \
7+
$(dirname $0)/micropython "$@"

0 commit comments

Comments
 (0)
0