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/04/22 00:37:37 UTC
[1/2] incubator-mynewt-core git commit: cortex-m0;
trap on divide-by-zero.
Repository: incubator-mynewt-core
Updated Branches:
refs/heads/develop 27705013e -> c2959dc7c
cortex-m0; trap on divide-by-zero.
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/c2959dc7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/c2959dc7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/c2959dc7
Branch: refs/heads/develop
Commit: c2959dc7c9eb869b4100650740e7095874dd4256
Parents: f0556b1
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Thu Apr 21 15:36:21 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Thu Apr 21 15:37:16 2016 -0700
----------------------------------------------------------------------
libs/os/src/arch/cortex_m0/m0/HAL_CM0.s | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c2959dc7/libs/os/src/arch/cortex_m0/m0/HAL_CM0.s
----------------------------------------------------------------------
diff --git a/libs/os/src/arch/cortex_m0/m0/HAL_CM0.s b/libs/os/src/arch/cortex_m0/m0/HAL_CM0.s
index 7cc7f1c..03d7957 100644
--- a/libs/os/src/arch/cortex_m0/m0/HAL_CM0.s
+++ b/libs/os/src/arch/cortex_m0/m0/HAL_CM0.s
@@ -200,6 +200,23 @@ SysTick_Handler:
.fnend
.size SysTick_Handler, .-SysTick_Handler
+/* divide-by-zero */
+ .thumb_func
+ .type __aeabi_idiv0, %function
+ .global __aeabi_idiv0
+ .global __aeabi_ldiv0
+__aeabi_idiv0:
+__aeabi_ldiv0:
+ .fnstart
+ .cantunwind
+ push {r0,r1,r5}
+ ldr r0, =file_name
+ ldr r1, =__LINE__
+ ldr r5, =__assert_func
+ bx r5
+ .fnend
+ .size __aeabi_idiv0, .-__aeabi_idiv0
+
/*-------------------------- Defalt IRQ --------------------------------*/
.thumb_func
.type os_default_irq_asm, %function
@@ -251,6 +268,9 @@ using_msp_as_sp:
.section ".data"
.global __aeabi_unwind_cpp_pr0
__aeabi_unwind_cpp_pr0:
+ .section ".rodata"
+file_name:
+ .asciz __FILE__
.end
/*----------------------------------------------------------------------------
[2/2] incubator-mynewt-core git commit: CM0 fault handler;
print newline at the end of last line of output.
Posted by ma...@apache.org.
CM0 fault handler; print newline at the end of last line of output.
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/f0556b18
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/f0556b18
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/f0556b18
Branch: refs/heads/develop
Commit: f0556b1887ab8e1797f4ef4ee56d0c631b69e6da
Parents: 2770501
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Thu Apr 21 15:25:17 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Thu Apr 21 15:37:16 2016 -0700
----------------------------------------------------------------------
libs/os/src/arch/cortex_m0/os_fault.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/f0556b18/libs/os/src/arch/cortex_m0/os_fault.c
----------------------------------------------------------------------
diff --git a/libs/os/src/arch/cortex_m0/os_fault.c b/libs/os/src/arch/cortex_m0/os_fault.c
index 4c67f6c..c46f8a8 100644
--- a/libs/os/src/arch/cortex_m0/os_fault.c
+++ b/libs/os/src/arch/cortex_m0/os_fault.c
@@ -81,7 +81,7 @@ os_default_irq(struct trap_frame *tf)
tf->r8, tf->r9, tf->r10, tf->r11);
console_printf("r12:0x%08lx lr:0x%08lx pc:0x%08lx psr:0x%08lx\n",
tf->ef->r12, tf->ef->lr, tf->ef->pc, tf->ef->psr);
- console_printf("ICSR:0x%08lx ",SCB->ICSR);
+ console_printf("ICSR:0x%08lx\n", SCB->ICSR);
system_reset();
}