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 2016/05/20 16:54:11 UTC

[1/2] incubator-mynewt-core git commit: bsp; add bsp_core_dump() to report which areas to dump.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop a4f466e54 -> 4660d9075


bsp; add bsp_core_dump() to report which areas to dump.


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/fd1c8533
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/fd1c8533
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/fd1c8533

Branch: refs/heads/develop
Commit: fd1c853319337af32e70ad788d33066389ffb635
Parents: a4f466e
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Fri May 20 09:49:46 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Fri May 20 09:49:46 2016 -0700

----------------------------------------------------------------------
 hw/bsp/nrf51-arduino_101/include/bsp/bsp.h    |  3 +++
 hw/bsp/nrf51-arduino_101/nrf51-arduino_101.ld |  2 ++
 hw/bsp/nrf51-arduino_101/src/hal_bsp.c        | 22 +++++++++++++++++++++-
 3 files changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fd1c8533/hw/bsp/nrf51-arduino_101/include/bsp/bsp.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/include/bsp/bsp.h b/hw/bsp/nrf51-arduino_101/include/bsp/bsp.h
index d81c149..4414bec 100644
--- a/hw/bsp/nrf51-arduino_101/include/bsp/bsp.h
+++ b/hw/bsp/nrf51-arduino_101/include/bsp/bsp.h
@@ -31,6 +31,9 @@ extern "C" {
 /* More convenient section placement macros. */
 #define bssnz_t
 
+extern uint8_t _ram_start;
+#define RAM_SIZE        0x4000
+
 /* LED pins */
 #define LED_BLINK_PIN   (21)
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fd1c8533/hw/bsp/nrf51-arduino_101/nrf51-arduino_101.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/nrf51-arduino_101.ld b/hw/bsp/nrf51-arduino_101/nrf51-arduino_101.ld
index 73fd254..631f446 100755
--- a/hw/bsp/nrf51-arduino_101/nrf51-arduino_101.ld
+++ b/hw/bsp/nrf51-arduino_101/nrf51-arduino_101.ld
@@ -161,6 +161,8 @@ SECTIONS
     /* Heap starts after BSS */
     __HeapBase = .;
 
+    _ram_start = ORIGIN(RAM);
+
     /* .stack_dummy section doesn't contains any symbols. It is only
      * used for linker to calculate size of stack sections, and assign
      * values to stack symbols later */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fd1c8533/hw/bsp/nrf51-arduino_101/src/hal_bsp.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/src/hal_bsp.c b/hw/bsp/nrf51-arduino_101/src/hal_bsp.c
index d694c7b..22c54a4 100644
--- a/hw/bsp/nrf51-arduino_101/src/hal_bsp.c
+++ b/hw/bsp/nrf51-arduino_101/src/hal_bsp.c
@@ -19,7 +19,10 @@
 
 #include <stdint.h>
 #include <stddef.h>
-#include "mcu/nrf51_hal.h"
+
+#include <mcu/nrf51_hal.h>
+#include <hal/hal_bsp.h>
+#include "bsp/bsp.h"
 
 static const struct nrf51_uart_cfg uart_cfg = {
     .suc_pin_tx = 9,
@@ -28,6 +31,16 @@ static const struct nrf51_uart_cfg uart_cfg = {
     .suc_pin_cts = 10
 };
 
+/*
+ * What memory to include in coredump.
+ */
+static const struct bsp_mem_dump dump_cfg[] = {
+    [0] = {
+        .bmd_start = &_ram_start,
+        .bmd_size = RAM_SIZE
+    }
+};
+
 const struct nrf51_uart_cfg *bsp_uart_config(void)
 {
     return &uart_cfg;
@@ -44,3 +57,10 @@ bsp_flash_dev(uint8_t id)
     }
     return &nrf51_flash_dev;
 }
+
+const struct bsp_mem_dump *
+bsp_core_dump(int *area_cnt)
+{
+    *area_cnt = sizeof(dump_cfg) / sizeof(dump_cfg[0]);
+    return dump_cfg;
+}


[2/2] incubator-mynewt-core git commit: hal/bsp; add hal_bsp.h, which exports common BSP APIs.

Posted by ma...@apache.org.
hal/bsp; add hal_bsp.h, which exports common BSP APIs.


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/4660d907
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/4660d907
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/4660d907

Branch: refs/heads/develop
Commit: 4660d907587ff00d4a9c36d9357e4e32bb2cf179
Parents: fd1c853
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Fri May 20 09:53:54 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Fri May 20 09:53:54 2016 -0700

----------------------------------------------------------------------
 hw/bsp/nrf51-arduino_101/include/bsp/bsp.h | 2 --
 hw/bsp/nrf51-arduino_101/src/libc_stubs.c  | 1 -
 hw/bsp/nrf51-arduino_101/src/os_bsp.c      | 2 +-
 3 files changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/4660d907/hw/bsp/nrf51-arduino_101/include/bsp/bsp.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/include/bsp/bsp.h b/hw/bsp/nrf51-arduino_101/include/bsp/bsp.h
index 4414bec..b931282 100644
--- a/hw/bsp/nrf51-arduino_101/include/bsp/bsp.h
+++ b/hw/bsp/nrf51-arduino_101/include/bsp/bsp.h
@@ -40,8 +40,6 @@ extern uint8_t _ram_start;
 /* UART info */
 #define CONSOLE_UART    0
 
-int bsp_imgr_current_slot(void);
-
 #define NFFS_AREA_MAX    (8)
 
 #ifdef __cplusplus

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/4660d907/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
index d880d32..f9bb5a9 100644
--- a/hw/bsp/nrf51-arduino_101/src/libc_stubs.c
+++ b/hw/bsp/nrf51-arduino_101/src/libc_stubs.c
@@ -19,7 +19,6 @@
 
 #include <hal/hal_system.h>
 
-void * _sbrk(int c);
 int _close(int fd);
 int _fstat(int fd, void *s);
 void _exit(int s);

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/4660d907/hw/bsp/nrf51-arduino_101/src/os_bsp.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/src/os_bsp.c b/hw/bsp/nrf51-arduino_101/src/os_bsp.c
index 888519b..116840f 100644
--- a/hw/bsp/nrf51-arduino_101/src/os_bsp.c
+++ b/hw/bsp/nrf51-arduino_101/src/os_bsp.c
@@ -17,6 +17,7 @@
  * under the License.
  */
 #include <hal/flash_map.h>
+#include <hal/hal_bsp.h>
 #include "bsp/cmsis_nvic.h"
 #include "mcu/nrf51.h"
 #include "mcu/nrf51_bitfields.h"
@@ -52,7 +53,6 @@ static struct flash_area bsp_flash_areas[] = {
     }
 };
 
-void *_sbrk(int incr);
 void _close(int fd);
 
 /*