You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2015/10/29 19:47:22 UTC

[3/7] incubator-mynewt-larva git commit: Make sure that mynewt _sbrk() stays available during linking until sbrk from libc is brought in.

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 <ma...@runtime.io>
Authored: Thu Oct 29 10:52:28 2015 -0700
Committer: Marko Kiiskila <ma...@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);
 }