You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2022/04/09 00:02:23 UTC

[incubator-nuttx] 05/05: boards/lx_cpu: Enable up_perf API

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit c235c0fa4335944b2ed7bc3dadd459ca6c94d844
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Apr 5 17:25:56 2022 +0800

    boards/lx_cpu: Enable up_perf API
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/lpc17xx_40xx/Make.defs                           | 2 +-
 boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/lpc17xx_40xx/Make.defs b/arch/arm/src/lpc17xx_40xx/Make.defs
index 72c63e532c..016a281549 100644
--- a/arch/arm/src/lpc17xx_40xx/Make.defs
+++ b/arch/arm/src/lpc17xx_40xx/Make.defs
@@ -31,7 +31,7 @@ CMN_CSRCS += arm_releasestack.c arm_reprioritizertr.c arm_schedulesigaction.c
 CMN_CSRCS += arm_sigdeliver.c arm_stackframe.c arm_trigger_irq.c
 CMN_CSRCS += arm_unblocktask.c arm_usestack.c arm_doirq.c arm_hardfault.c
 CMN_CSRCS += arm_svcall.c arm_checkstack.c arm_vfork.c arm_switchcontext.c
-CMN_CSRCS += arm_systemreset.c arm_puts.c arm_tcbinfo.c
+CMN_CSRCS += arm_systemreset.c arm_puts.c arm_tcbinfo.c arm_perf.c
 
 ifeq ($(CONFIG_SCHED_BACKTRACE),y)
 CMN_CSRCS += arm_backtrace_thumb.c
diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c
index f0110c6b85..367bf6a41d 100644
--- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c
+++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c
@@ -51,6 +51,10 @@
 
 void lpc17_40_boardinitialize(void)
 {
+#ifdef CONFIG_SCHED_IRQMONITOR
+  up_perf_init((FAR void *)LPC17_40_CCLK);
+#endif
+
   /* Initialize the EMC, and SDRAM */
 
 #ifndef BOARD_EMC_CONFIG_BY_LOADER