mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [3/7] incubator-mynewt-larva git commit: Make sure that mynewt _sbrk() stays available during linking until sbrk from libc is brought in.
Date Thu, 29 Oct 2015 18:47:22 GMT
Make sure that mynewt _sbrk() stays available during linking until sbrk
from libc is brought in.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/6742a24c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/6742a24c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/6742a24c

Branch: refs/heads/master
Commit: 6742a24c50ec50714cd7074ff748c14eec606606
Parents: fda6d9d
Author: Marko Kiiskila <marko@runtime.io>
Authored: Thu Oct 29 10:52:28 2015 -0700
Committer: Marko Kiiskila <marko@runtime.io>
Committed: Thu Oct 29 10:52:28 2015 -0700

----------------------------------------------------------------------
 hw/bsp/nrf52pdk/src/os_bsp.c                   | 7 +++++++
 hw/bsp/olimex_stm32-e407_devboard/src/os_bsp.c | 7 +++++++
 hw/bsp/stm32f3discovery/src/os_bsp.c           | 7 +++++++
 3 files changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/6742a24c/hw/bsp/nrf52pdk/src/os_bsp.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52pdk/src/os_bsp.c b/hw/bsp/nrf52pdk/src/os_bsp.c
index ca17758..1756448 100644
--- a/hw/bsp/nrf52pdk/src/os_bsp.c
+++ b/hw/bsp/nrf52pdk/src/os_bsp.c
@@ -13,8 +13,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include <stddef.h>
+
+void *_sbrk(int incr);
 
 void
 os_bsp_init(void)
 {
+    /*
+     * XXX this reference is here to keep this function in.
+     */
+    _sbrk(0);
 }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/6742a24c/hw/bsp/olimex_stm32-e407_devboard/src/os_bsp.c
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/src/os_bsp.c b/hw/bsp/olimex_stm32-e407_devboard/src/os_bsp.c
index 21cca8d..bb8a0ed 100644
--- a/hw/bsp/olimex_stm32-e407_devboard/src/os_bsp.c
+++ b/hw/bsp/olimex_stm32-e407_devboard/src/os_bsp.c
@@ -13,10 +13,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include <stddef.h>
+
+void *_sbrk(int incr);
 
 void
 os_bsp_init(void)
 {
+    /*
+     * XXX this reference is here to keep this function in.
+     */
+    _sbrk(0);
 }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/6742a24c/hw/bsp/stm32f3discovery/src/os_bsp.c
----------------------------------------------------------------------
diff --git a/hw/bsp/stm32f3discovery/src/os_bsp.c b/hw/bsp/stm32f3discovery/src/os_bsp.c
index ca17758..4bd2614 100644
--- a/hw/bsp/stm32f3discovery/src/os_bsp.c
+++ b/hw/bsp/stm32f3discovery/src/os_bsp.c
@@ -13,8 +13,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include <stddef.h>
+
+void *_sbrk(int incr);
 
 void
 os_bsp_init(void)
 {
+    /*
+     * XXX this reference is here to keep this function in so libc can find it.
+     */
+    _sbrk(0);
 }


Mime
View raw message