You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by st...@apache.org on 2016/10/19 19:08:53 UTC

incubator-mynewt-core git commit: remove libc_stubs, unify definition of exit to hal.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 9ca960724 -> 8666ff9ea


remove libc_stubs, unify definition of exit to hal.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/8666ff9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/8666ff9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/8666ff9e

Branch: refs/heads/develop
Commit: 8666ff9ea08adec1e91b2443404201ed4d1f610e
Parents: 9ca9607
Author: Sterling Hughes <st...@apache.org>
Authored: Wed Oct 19 12:08:35 2016 -0700
Committer: Sterling Hughes <st...@apache.org>
Committed: Wed Oct 19 12:08:35 2016 -0700

----------------------------------------------------------------------
 hw/bsp/arduino_primo_nrf52/src/libc_stubs.c     | 84 -------------------
 hw/bsp/bmd300eval/src/libc_stubs.c              | 84 -------------------
 hw/bsp/frdm-k64f/src/libc_stubs.c               | 70 ----------------
 hw/bsp/nrf51-arduino_101/src/libc_stubs.c       | 84 -------------------
 hw/bsp/nrf51-blenano/src/libc_stubs.c           | 85 --------------------
 hw/bsp/nrf51dk-16kbram/src/libc_stubs.c         | 85 --------------------
 hw/bsp/nrf51dk/src/libc_stubs.c                 | 85 --------------------
 hw/bsp/nrf52dk/src/libc_stubs.c                 | 84 -------------------
 hw/bsp/nucleo-f401re/src/libc_stubs.c           | 84 -------------------
 .../olimex_stm32-e407_devboard/src/libc_stubs.c | 84 -------------------
 hw/bsp/rb-nano2/src/libc_stubs.c                | 84 -------------------
 hw/bsp/stm32f4discovery/src/libc_stubs.c        | 84 -------------------
 hw/hal/src/hal_common.c                         | 28 +++++++
 13 files changed, 28 insertions(+), 997 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/bsp/arduino_primo_nrf52/src/libc_stubs.c
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/src/libc_stubs.c b/hw/bsp/arduino_primo_nrf52/src/libc_stubs.c
deleted file mode 100644
index b1b6b8b..0000000
--- a/hw/bsp/arduino_primo_nrf52/src/libc_stubs.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-#include <hal/hal_system.h>
-#include <hal/hal_bsp.h>
-
-int _close(int fd);
-int _fstat(int fd, void *s);
-void _exit(int s);
-int _kill(int pid, int sig);
-int _write(int fd, void *b, int nb);
-int _isatty(int c);
-int _lseek(int fd, int off, int w);
-int _read(int fd, void *b, int nb);
-int _getpid(void);
-
-int
-_close(int fd)
-{
-    return -1;
-}
-
-int
-_fstat(int fd, void *s)
-{
-    return -1;
-}
-
-
-void
-_exit(int s)
-{
-    system_reset();
-}
-
-int
-_kill(int pid, int sig)
-{
-    return -1;
-}
-
-int
-_write(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_isatty(int c)
-{
-    return -1;
-}
-
-int
-_lseek(int fd, int off, int w)
-{
-    return -1;
-}
-
-int
-_read(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_getpid(void) {
-    return -1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/bsp/bmd300eval/src/libc_stubs.c
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/src/libc_stubs.c b/hw/bsp/bmd300eval/src/libc_stubs.c
deleted file mode 100644
index b1b6b8b..0000000
--- a/hw/bsp/bmd300eval/src/libc_stubs.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-#include <hal/hal_system.h>
-#include <hal/hal_bsp.h>
-
-int _close(int fd);
-int _fstat(int fd, void *s);
-void _exit(int s);
-int _kill(int pid, int sig);
-int _write(int fd, void *b, int nb);
-int _isatty(int c);
-int _lseek(int fd, int off, int w);
-int _read(int fd, void *b, int nb);
-int _getpid(void);
-
-int
-_close(int fd)
-{
-    return -1;
-}
-
-int
-_fstat(int fd, void *s)
-{
-    return -1;
-}
-
-
-void
-_exit(int s)
-{
-    system_reset();
-}
-
-int
-_kill(int pid, int sig)
-{
-    return -1;
-}
-
-int
-_write(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_isatty(int c)
-{
-    return -1;
-}
-
-int
-_lseek(int fd, int off, int w)
-{
-    return -1;
-}
-
-int
-_read(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_getpid(void) {
-    return -1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/bsp/frdm-k64f/src/libc_stubs.c
----------------------------------------------------------------------
diff --git a/hw/bsp/frdm-k64f/src/libc_stubs.c b/hw/bsp/frdm-k64f/src/libc_stubs.c
deleted file mode 100644
index cc48259..0000000
--- a/hw/bsp/frdm-k64f/src/libc_stubs.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-#include <hal/hal_system.h>
-
-void * _sbrk(int c);
-int _close(int fd);
-int _fstat(int fd, void *s);
-void _exit(int s);
-int _kill(int pid, int sig);
-int _isatty(int c);
-int _lseek(int fd, int off, int w);
-int _getpid(void);
-
-int
-_close(int fd)
-{
-    return -1;
-}
-
-int
-_fstat(int fd, void *s)
-{
-    return -1;
-}
-
-
-void
-_exit(int s)
-{
-    system_reset();
-}
-
-int
-_kill(int pid, int sig)
-{
-    return -1;
-}
-
-int
-_isatty(int c)
-{
-    return -1;
-}
-
-int
-_lseek(int fd, int off, int w)
-{
-    return -1;
-}
-
-int
-_getpid(void) {
-    return -1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/bsp/nrf51-arduino_101/src/libc_stubs.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/src/libc_stubs.c b/hw/bsp/nrf51-arduino_101/src/libc_stubs.c
deleted file mode 100644
index f9bb5a9..0000000
--- a/hw/bsp/nrf51-arduino_101/src/libc_stubs.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <hal/hal_system.h>
-
-int _close(int fd);
-int _fstat(int fd, void *s);
-void _exit(int s);
-int _kill(int pid, int sig);
-int _write(int fd, void *b, int nb);
-int _isatty(int c);
-int _lseek(int fd, int off, int w);
-int _read(int fd, void *b, int nb);
-int _getpid(void);
-
-int
-_close(int fd)
-{
-    return -1;
-}
-
-int
-_fstat(int fd, void *s)
-{
-    return -1;
-}
-
-
-void
-_exit(int s)
-{
-    system_reset();
-}
-
-int
-_kill(int pid, int sig)
-{
-    return -1;
-}
-
-int
-_write(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_isatty(int c)
-{
-    return -1;
-}
-
-int
-_lseek(int fd, int off, int w)
-{
-    return -1;
-}
-
-int
-_read(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_getpid(void) {
-    return -1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/bsp/nrf51-blenano/src/libc_stubs.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/src/libc_stubs.c b/hw/bsp/nrf51-blenano/src/libc_stubs.c
deleted file mode 100644
index da54ed1..0000000
--- a/hw/bsp/nrf51-blenano/src/libc_stubs.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <hal/hal_system.h>
-
-void * _sbrk(int c);
-int _close(int fd);
-int _fstat(int fd, void *s);
-void _exit(int s);
-int _kill(int pid, int sig);
-int _write(int fd, void *b, int nb);
-int _isatty(int c);
-int _lseek(int fd, int off, int w);
-int _read(int fd, void *b, int nb);
-int _getpid(void);
-
-int
-_close(int fd)
-{
-    return -1;
-}
-
-int
-_fstat(int fd, void *s)
-{
-    return -1;
-}
-
-
-void
-_exit(int s)
-{
-    system_reset();
-}
-
-int
-_kill(int pid, int sig)
-{
-    return -1;
-}
-
-int
-_write(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_isatty(int c)
-{
-    return -1;
-}
-
-int
-_lseek(int fd, int off, int w)
-{
-    return -1;
-}
-
-int
-_read(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_getpid(void) {
-    return -1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/bsp/nrf51dk-16kbram/src/libc_stubs.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/src/libc_stubs.c b/hw/bsp/nrf51dk-16kbram/src/libc_stubs.c
deleted file mode 100644
index de047ea..0000000
--- a/hw/bsp/nrf51dk-16kbram/src/libc_stubs.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <hal/hal_system.h>
-#include <hal/hal_bsp.h>
-
-int _close(int fd);
-int _fstat(int fd, void *s);
-void _exit(int s);
-int _kill(int pid, int sig);
-int _write(int fd, void *b, int nb);
-int _isatty(int c);
-int _lseek(int fd, int off, int w);
-int _read(int fd, void *b, int nb);
-int _getpid(void);
-
-int
-_close(int fd)
-{
-    return -1;
-}
-
-int
-_fstat(int fd, void *s)
-{
-    return -1;
-}
-
-
-void
-_exit(int s)
-{
-    system_reset();
-}
-
-int
-_kill(int pid, int sig)
-{
-    return -1;
-}
-
-int
-_write(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_isatty(int c)
-{
-    return -1;
-}
-
-int
-_lseek(int fd, int off, int w)
-{
-    return -1;
-}
-
-int
-_read(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_getpid(void) {
-    return -1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/bsp/nrf51dk/src/libc_stubs.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/src/libc_stubs.c b/hw/bsp/nrf51dk/src/libc_stubs.c
deleted file mode 100644
index de047ea..0000000
--- a/hw/bsp/nrf51dk/src/libc_stubs.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <hal/hal_system.h>
-#include <hal/hal_bsp.h>
-
-int _close(int fd);
-int _fstat(int fd, void *s);
-void _exit(int s);
-int _kill(int pid, int sig);
-int _write(int fd, void *b, int nb);
-int _isatty(int c);
-int _lseek(int fd, int off, int w);
-int _read(int fd, void *b, int nb);
-int _getpid(void);
-
-int
-_close(int fd)
-{
-    return -1;
-}
-
-int
-_fstat(int fd, void *s)
-{
-    return -1;
-}
-
-
-void
-_exit(int s)
-{
-    system_reset();
-}
-
-int
-_kill(int pid, int sig)
-{
-    return -1;
-}
-
-int
-_write(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_isatty(int c)
-{
-    return -1;
-}
-
-int
-_lseek(int fd, int off, int w)
-{
-    return -1;
-}
-
-int
-_read(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_getpid(void) {
-    return -1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/bsp/nrf52dk/src/libc_stubs.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/src/libc_stubs.c b/hw/bsp/nrf52dk/src/libc_stubs.c
deleted file mode 100644
index b1b6b8b..0000000
--- a/hw/bsp/nrf52dk/src/libc_stubs.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-#include <hal/hal_system.h>
-#include <hal/hal_bsp.h>
-
-int _close(int fd);
-int _fstat(int fd, void *s);
-void _exit(int s);
-int _kill(int pid, int sig);
-int _write(int fd, void *b, int nb);
-int _isatty(int c);
-int _lseek(int fd, int off, int w);
-int _read(int fd, void *b, int nb);
-int _getpid(void);
-
-int
-_close(int fd)
-{
-    return -1;
-}
-
-int
-_fstat(int fd, void *s)
-{
-    return -1;
-}
-
-
-void
-_exit(int s)
-{
-    system_reset();
-}
-
-int
-_kill(int pid, int sig)
-{
-    return -1;
-}
-
-int
-_write(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_isatty(int c)
-{
-    return -1;
-}
-
-int
-_lseek(int fd, int off, int w)
-{
-    return -1;
-}
-
-int
-_read(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_getpid(void) {
-    return -1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/bsp/nucleo-f401re/src/libc_stubs.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nucleo-f401re/src/libc_stubs.c b/hw/bsp/nucleo-f401re/src/libc_stubs.c
deleted file mode 100644
index b1b6b8b..0000000
--- a/hw/bsp/nucleo-f401re/src/libc_stubs.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-#include <hal/hal_system.h>
-#include <hal/hal_bsp.h>
-
-int _close(int fd);
-int _fstat(int fd, void *s);
-void _exit(int s);
-int _kill(int pid, int sig);
-int _write(int fd, void *b, int nb);
-int _isatty(int c);
-int _lseek(int fd, int off, int w);
-int _read(int fd, void *b, int nb);
-int _getpid(void);
-
-int
-_close(int fd)
-{
-    return -1;
-}
-
-int
-_fstat(int fd, void *s)
-{
-    return -1;
-}
-
-
-void
-_exit(int s)
-{
-    system_reset();
-}
-
-int
-_kill(int pid, int sig)
-{
-    return -1;
-}
-
-int
-_write(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_isatty(int c)
-{
-    return -1;
-}
-
-int
-_lseek(int fd, int off, int w)
-{
-    return -1;
-}
-
-int
-_read(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_getpid(void) {
-    return -1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/bsp/olimex_stm32-e407_devboard/src/libc_stubs.c
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/src/libc_stubs.c b/hw/bsp/olimex_stm32-e407_devboard/src/libc_stubs.c
deleted file mode 100644
index b1b6b8b..0000000
--- a/hw/bsp/olimex_stm32-e407_devboard/src/libc_stubs.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-#include <hal/hal_system.h>
-#include <hal/hal_bsp.h>
-
-int _close(int fd);
-int _fstat(int fd, void *s);
-void _exit(int s);
-int _kill(int pid, int sig);
-int _write(int fd, void *b, int nb);
-int _isatty(int c);
-int _lseek(int fd, int off, int w);
-int _read(int fd, void *b, int nb);
-int _getpid(void);
-
-int
-_close(int fd)
-{
-    return -1;
-}
-
-int
-_fstat(int fd, void *s)
-{
-    return -1;
-}
-
-
-void
-_exit(int s)
-{
-    system_reset();
-}
-
-int
-_kill(int pid, int sig)
-{
-    return -1;
-}
-
-int
-_write(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_isatty(int c)
-{
-    return -1;
-}
-
-int
-_lseek(int fd, int off, int w)
-{
-    return -1;
-}
-
-int
-_read(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_getpid(void) {
-    return -1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/bsp/rb-nano2/src/libc_stubs.c
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/src/libc_stubs.c b/hw/bsp/rb-nano2/src/libc_stubs.c
deleted file mode 100644
index b1b6b8b..0000000
--- a/hw/bsp/rb-nano2/src/libc_stubs.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-#include <hal/hal_system.h>
-#include <hal/hal_bsp.h>
-
-int _close(int fd);
-int _fstat(int fd, void *s);
-void _exit(int s);
-int _kill(int pid, int sig);
-int _write(int fd, void *b, int nb);
-int _isatty(int c);
-int _lseek(int fd, int off, int w);
-int _read(int fd, void *b, int nb);
-int _getpid(void);
-
-int
-_close(int fd)
-{
-    return -1;
-}
-
-int
-_fstat(int fd, void *s)
-{
-    return -1;
-}
-
-
-void
-_exit(int s)
-{
-    system_reset();
-}
-
-int
-_kill(int pid, int sig)
-{
-    return -1;
-}
-
-int
-_write(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_isatty(int c)
-{
-    return -1;
-}
-
-int
-_lseek(int fd, int off, int w)
-{
-    return -1;
-}
-
-int
-_read(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_getpid(void) {
-    return -1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/bsp/stm32f4discovery/src/libc_stubs.c
----------------------------------------------------------------------
diff --git a/hw/bsp/stm32f4discovery/src/libc_stubs.c b/hw/bsp/stm32f4discovery/src/libc_stubs.c
deleted file mode 100644
index b1b6b8b..0000000
--- a/hw/bsp/stm32f4discovery/src/libc_stubs.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-#include <hal/hal_system.h>
-#include <hal/hal_bsp.h>
-
-int _close(int fd);
-int _fstat(int fd, void *s);
-void _exit(int s);
-int _kill(int pid, int sig);
-int _write(int fd, void *b, int nb);
-int _isatty(int c);
-int _lseek(int fd, int off, int w);
-int _read(int fd, void *b, int nb);
-int _getpid(void);
-
-int
-_close(int fd)
-{
-    return -1;
-}
-
-int
-_fstat(int fd, void *s)
-{
-    return -1;
-}
-
-
-void
-_exit(int s)
-{
-    system_reset();
-}
-
-int
-_kill(int pid, int sig)
-{
-    return -1;
-}
-
-int
-_write(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_isatty(int c)
-{
-    return -1;
-}
-
-int
-_lseek(int fd, int off, int w)
-{
-    return -1;
-}
-
-int
-_read(int fd, void *b, int nb)
-{
-    return -1;
-}
-
-int
-_getpid(void) {
-    return -1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8666ff9e/hw/hal/src/hal_common.c
----------------------------------------------------------------------
diff --git a/hw/hal/src/hal_common.c b/hw/hal/src/hal_common.c
new file mode 100644
index 0000000..ab87dc4
--- /dev/null
+++ b/hw/hal/src/hal_common.c
@@ -0,0 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "hal/hal_system.h"
+
+void _exit(int status);
+
+void
+_exit(int status)
+{
+    system_reset();
+}