Skip to content

Instantly share code, notes, and snippets.

@abcang
Last active August 29, 2015 14:22
Show Gist options
  • Save abcang/fb00292eb17ea6d7e2df to your computer and use it in GitHub Desktop.
Save abcang/fb00292eb17ea6d7e2df to your computer and use it in GitHub Desktop.
mruby
メモ
===
## 環境
* debian wheezy
## summon-arm-toolchain
```
$ git clone git@github.com:esden/summon-arm-toolchain.git
$ cd summon-arm-toolchain
```
`Makefile`を編集
```
diff --git a/summon-arm-toolchain b/summon-arm-toolchain
index c546703..138b6da 100755
--- a/summon-arm-toolchain
+++ b/summon-arm-toolchain
@@ -570,6 +570,8 @@ if [ $LIBOPENCM3_EN != 0 ]; then
if [ ! -e ${STAMPS}/${LIBOPENCM3}.build ]; then
unpack ${LIBOPENCM3}
cd ${LIBOPENCM3}
+ log "Patching Makefile"
+ sed -i".org" -e "s/cpu=cortex-m0plus/cpu=cortex-m4/g" ./lib/stm32/l0/Makefile
log "Building ${LIBOPENCM3}"
make PREFIX=${TARGET} DESTDIR=${DESTDIR}${DESTDIR:+/}${PREFIX}
install ${LIBOPENCM3} PREFIX=${TARGET} DESTDIR=${DESTDIR}${DESTDIR:+/}${PREFIX} install
```
```
$ apt-get install flex bison libgmp3-dev libmpfr-dev libncurses5-dev \
libmpc-dev autoconf texinfo build-essential libftdi-dev zlib1g-dev \
git zlib1g-dev python-yaml
$ apt-get build-dep gcc-4.5 git zlib1g-dev python-yaml
./summon-arm-toolchain
```
## newlib-nano
```
$ git clone git@github.com:32bitmicro/newlib-nano-1.0.git
$ cd newlib-nano-1.0
$ export PATH=<armのgccとかがあるパス>:$PATH
$ ./configure --target=arm-none-eabi --disable-newlib-supplied-syscalls \
--enable-newlib-reent-small --disable-newlib-fvwrite-in-streamio --disable-newlib-fseek-optimization \
--disable-newlib-wide-orient --enable-newlib-nano-malloc --disable-newlib-unbuf-stream-opt --enable-lite-exit \
--enable-newlib-globa-atexit --disable-nls
```
`arm-none-eabi/thumb/cortex-m3/libgloss/libnosys/libnosys.a`、
`arm-none-eabi/thumb/cortex-m3/newlib/libm.a`、
`arm-none-eabi/thumb/cortex-m3/newlib/libg.a`、
`arm-none-eabi/thumb/cortex-m3/newlib/libc.a`
を利用
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment