fixed compile errors caused by merge
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/0c25b70f Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/0c25b70f Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/0c25b70f Branch: refs/heads/develop Commit: 0c25b70f2421385c5de4fbef579f70a15bde4a37 Parents: 5b589e6 Author: julian <[email protected]> Authored: Mon Nov 21 14:32:10 2016 +0000 Committer: julian <[email protected]> Committed: Mon Nov 21 14:32:10 2016 +0000 ---------------------------------------------------------------------- hw/bsp/ci40/src/hal_bsp.c | 1 + hw/bsp/ci40/src/os_bsp.c | 4 +- hw/mcu/mips/danube/src/hal_cputime2.c | 99 ------------------------------ hw/mcu/mips/danube/src/hal_system.c | 10 +-- kernel/os/src/arch/mips/os_fault.c | 6 +- 5 files changed, 9 insertions(+), 111 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0c25b70f/hw/bsp/ci40/src/hal_bsp.c ---------------------------------------------------------------------- diff --git a/hw/bsp/ci40/src/hal_bsp.c b/hw/bsp/ci40/src/hal_bsp.c index c1187c6..d0dd0b7 100644 --- a/hw/bsp/ci40/src/hal_bsp.c +++ b/hw/bsp/ci40/src/hal_bsp.c @@ -25,3 +25,4 @@ bsp_flash_dev(uint8_t id) { return 0; } + http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0c25b70f/hw/bsp/ci40/src/os_bsp.c ---------------------------------------------------------------------- diff --git a/hw/bsp/ci40/src/os_bsp.c b/hw/bsp/ci40/src/os_bsp.c index 4736898..8980c1e 100644 --- a/hw/bsp/ci40/src/os_bsp.c +++ b/hw/bsp/ci40/src/os_bsp.c @@ -20,7 +20,9 @@ #include "hal/hal_bsp.h" #include "syscfg/syscfg.h" #include "uart/uart.h" +#if MYNEWT_VAL(UART_0) || MYNEWT_VAL(UART_1) #include "uart_hal/uart_hal.h" +#endif #include <assert.h> @@ -35,7 +37,7 @@ static struct uart_dev os_bsp_uart1; void _close(int fd); void -bsp_init(void) +hal_bsp_init(void) { int rc; http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0c25b70f/hw/mcu/mips/danube/src/hal_cputime2.c ---------------------------------------------------------------------- diff --git a/hw/mcu/mips/danube/src/hal_cputime2.c b/hw/mcu/mips/danube/src/hal_cputime2.c deleted file mode 100644 index 373be1c..0000000 --- a/hw/mcu/mips/danube/src/hal_cputime2.c +++ /dev/null @@ -1,99 +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 <stdint.h> -#include <assert.h> -#include "hal/hal_cputime.h" - -/* XXX: - * - Must determine how to set priority of cpu timer interrupt - * - Determine if we should use a mutex as opposed to disabling interrupts - * - Should I use a macro for the timer being used? This is so I can - * easily change the timer from 2 to 5? What about compare channel? - * - Sync to OSTIME. - */ - -void -cputime_disable_ocmp(void) -{ -} - -/** - * cputime set ocmp - * - * Set the OCMP used by the cputime module to the desired cputime. - * - * @param timer Pointer to timer. - */ -void -cputime_set_ocmp(struct cpu_timer *timer) -{ -} - -/** - * tim5 isr - * - * This is the global timer interrupt routine. - * - */ -/*static void -cputime_isr(void) -{ -} -*/ -/** - * cputime hw init - * - * Initialize the cputime hw. This should be called only once and should be - * called before the hardware timer is used. - * - * @param clock_freq The desired cputime frequency, in hertz (Hz). - * - * @return int 0 on success; -1 on error. - */ -int -cputime_hw_init(uint32_t clock_freq) -{ - return 0; -} - -/** - * cputime get64 - * - * Returns cputime as a 64-bit number. - * - * @return uint64_t The 64-bit representation of cputime. - */ -uint64_t -cputime_get64(void) -{ - return 0; -} - -/** - * cputime get32 - * - * Returns the low 32 bits of cputime. - * - * @return uint32_t The lower 32 bits of cputime - */ -uint32_t -cputime_get32(void) -{ - return 0; -} http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0c25b70f/hw/mcu/mips/danube/src/hal_system.c ---------------------------------------------------------------------- diff --git a/hw/mcu/mips/danube/src/hal_system.c b/hw/mcu/mips/danube/src/hal_system.c index 44145fc..ed6e6a3 100644 --- a/hw/mcu/mips/danube/src/hal_system.c +++ b/hw/mcu/mips/danube/src/hal_system.c @@ -22,20 +22,14 @@ #include <stdint.h> void -system_reset(void) +hal_system_reset(void) { while (1) { - if (system_debugger_connected()) { - /* - * If debugger is attached, breakpoint here. - */ - } - /* XXX: NVIC_SystemReset(); */ } } int -system_debugger_connected(void) +hal_debugger_connected(void) { return 0; } http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0c25b70f/kernel/os/src/arch/mips/os_fault.c ---------------------------------------------------------------------- diff --git a/kernel/os/src/arch/mips/os_fault.c b/kernel/os/src/arch/mips/os_fault.c index 8d89f54..a57be54 100644 --- a/kernel/os/src/arch/mips/os_fault.c +++ b/kernel/os/src/arch/mips/os_fault.c @@ -89,12 +89,12 @@ __assert_func(const char *file, int line, const char *func, const char *e) (void)sr; console_blocking_mode(); console_printf("Assert %s; failed in %s:%d\n", e ? e : "", file, line); - if (system_debugger_connected()) { + if (hal_debugger_connected()) { /* * If debugger is attached, breakpoint before the trap. */ } - system_reset(); + hal_system_reset(); } void @@ -119,5 +119,5 @@ os_default_irq(struct trap_frame *tf) trap_to_coredump(tf, ®s); coredump_dump(®s, sizeof(regs)); #endif - system_reset(); + hal_system_reset(); }
