Re: k_sleep on mimxrt1050_evk board


marco.hoefle@...
 

Hello Maureen,
Sure, I tried blinky and synchronisation.
Both didn't work.

Here the detailed steps:

marco@L-xx:~/projects/misc/zephyr/samples/basic/blinky/build$ export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk/
marco@L-xx:~/projects/misc/zephyr/samples/basic/blinky/build$ export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
marco@L-xx:~/projects/misc/zephyr/samples/basic/blinky/build$ source ~/projects/misc/zephyr/zephyr-env.sh
marco@L-xx:~/projects/misc/zephyr/samples/basic/blinky/build$ cmake -DBOARD=mimxrt1050_evk ..
CMake Deprecation Warning at /home/marco/projects/misc/zephyr/cmake/app/boilerplate.cmake:38 (cmake_policy):
  The OLD behavior for policy CMP0000 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:1 (include)


-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.5", minimum required is "3.4")
-- Selected BOARD mimxrt1050_evk
Zephyr version: 1.12.0
Parsing Kconfig tree in /home/marco/projects/misc/zephyr/Kconfig
Using /home/marco/projects/misc/zephyr/boards/arm/mimxrt1050_evk/mimxrt1050_evk_defconfig as base
Merging /home/marco/projects/misc/zephyr/samples/basic/blinky/prj.conf
/home/marco/projects/misc/zephyr/samples/basic/blinky/prj.conf:1: warning: GPIO (defined at drivers/gpio/Kconfig:9, /home/marco/projects/misc/zephyr/arch/arm/soc/nordic_nrf/Kconfig.defconfig:15, arch/arm/soc/nxp_imx/mcimx7_m4/Kconfig.defconfig.mcimx7_m4:29, /home/marco/projects/misc/zephyr/arch/arm/soc/nxp_imx/rt/Kconfig.defconfig.mimxrt1052:30, /home/marco/projects/misc/zephyr/arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f12:36, /home/marco/projects/misc/zephyr/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.defconfig.lpc54114_m0:22, /home/marco/projects/misc/zephyr/arch/arm/soc/silabs_exx32/efm32wg/Kconfig.defconfig.efm32wg:15) set more than once. Old value: "y", new value: "y".
/home/marco/projects/misc/zephyr/samples/basic/blinky/prj.conf:2: warning: SERIAL (defined at drivers/serial/Kconfig:9) set more than once. Old value: "y", new value: "n".
warning: OSC_EXTERNAL (defined at /home/marco/projects/misc/zephyr/arch/arm/soc/nxp_kinetis/Kconfig:57) was assigned the value "y" but got the value "n" -- check dependencies
warning: UART_CONSOLE (defined at drivers/console/Kconfig:40) was assigned the value "y" but got the value "n" -- check dependencies
-- Generating zephyr/include/generated/generated_dts_board.h
mimxrt1050_evk.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@0 has a unit name, but no reg property
mimxrt1050_evk.dts_compiled: Warning (unit_address_vs_reg): Node /gpio_keys/button@0 has a unit name, but no reg property
-- Cache files will be written to: /home/marco/.cache/zephyr
-- The C compiler identification is GNU 6.2.0
-- The CXX compiler identification is GNU 6.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc
-- Performing Test toolchain_is_ok
-- Performing Test toolchain_is_ok - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/marco/projects/misc/zephyr/samples/basic/blinky/build
marco@L-xx:~/projects/misc/zephyr/samples/basic/blinky/build$ make
Scanning dependencies of target kobj_types_h_target
[  1%] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h
[  1%] Built target kobj_types_h_target
Scanning dependencies of target syscall_macros_h_target
[  2%] Generating include/generated/syscall_macros.h
[  2%] Built target syscall_macros_h_target
Scanning dependencies of target syscall_list_h_target
[  3%] Generating always_rebuild
Building for board mimxrt1050_evk
[  4%] Generating misc/generated/syscalls.json
[  5%] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
[  5%] Built target syscall_list_h_target
Scanning dependencies of target driver_validation_h_target
[  6%] Generating include/generated/driver-validation.h
[  6%] Built target driver_validation_h_target
Scanning dependencies of target offsets
[  7%] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
[  8%] Linking C static library liboffsets.a
[  8%] Built target offsets
Scanning dependencies of target offsets_h
[  9%] Generating include/generated/offsets.h
[  9%] Built target offsets_h
Scanning dependencies of target app
[ 10%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdlib/atoi.c.obj
[ 11%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdlib/strtol.c.obj
[ 12%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdlib/strtoul.c.obj
[ 13%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/string/strncasecmp.c.obj
[ 14%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/string/strstr.c.obj
[ 15%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/string/string.c.obj
[ 16%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdout/prf.c.obj
[ 17%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdout/stdout_console.c.obj
[ 18%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdout/sprintf.c.obj
[ 19%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdout/fprintf.c.obj
[ 20%] Building C object CMakeFiles/app.dir/src/main.c.obj
[ 21%] Linking C static library libapp.a
[ 21%] Built target app
Scanning dependencies of target kernel
[ 22%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/alert.c.obj
[ 23%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/device.c.obj
[ 24%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj
[ 25%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/idle.c.obj
[ 26%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj
[ 27%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mailbox.c.obj
[ 28%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj
[ 29%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mempool.c.obj
[ 30%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/msg_q.c.obj
[ 31%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mutex.c.obj
[ 32%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/pipes.c.obj
[ 34%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/queue.c.obj
[ 35%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sched.c.obj
[ 36%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sem.c.obj
[ 37%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/stack.c.obj
[ 38%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sys_clock.c.obj
[ 39%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/system_work_q.c.obj
[ 40%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread.c.obj
[ 41%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread_abort.c.obj
[ 42%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/version.c.obj
[ 43%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/work_q.c.obj
[ 44%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/smp.c.obj
[ 45%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj
[ 46%] Linking C static library libkernel.a
[ 46%] Built target kernel
Scanning dependencies of target linker_script
[ 47%] Generating linker.cmd
[ 47%] Built target linker_script
Scanning dependencies of target zephyr
[ 48%] Building C object zephyr/CMakeFiles/zephyr.dir/arch/common/isr_tables.c.obj
[ 49%] Building C object zephyr/CMakeFiles/zephyr.dir/arch/arm/soc/nxp_imx/rt/soc.c.obj
[ 50%] Building C object zephyr/CMakeFiles/zephyr.dir/arch/arm/soc/nxp_imx/rt/arm_mpu_regions.c.obj
[ 51%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/thread_entry.c.obj
[ 52%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/crc/crc16_sw.c.obj
[ 53%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/crc/crc8_sw.c.obj
[ 54%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/mempool/mempool.c.obj
[ 55%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/rbtree/rb.c.obj
[ 56%] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
[ 57%] Building C object zephyr/CMakeFiles/zephyr.dir/ext/hal/nxp/mcux/devices/MIMXRT1052/fsl_clock.c.obj
[ 58%] Building C object zephyr/CMakeFiles/zephyr.dir/ext/hal/nxp/mcux/drivers/imx/fsl_gpio.c.obj
[ 59%] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/clock_control/clock_control_mcux_ccm.c.obj
[ 60%] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/timer/sys_clock_init.c.obj
[ 61%] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/timer/cortex_m_systick.c.obj
[ 62%] Linking C static library libzephyr.a
[ 62%] Built target zephyr
Scanning dependencies of target arch__arm__core
[ 63%] Building ASM object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/exc_exit.S.obj
[ 64%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/irq_init.c.obj
[ 65%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/swap.c.obj
[ 67%] Building ASM object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/swap_helper.S.obj
[ 68%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/fault.c.obj
[ 69%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/irq_manage.c.obj
[ 70%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/thread.c.obj
[ 71%] Building ASM object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/cpu_idle.S.obj
[ 72%] Building ASM object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/fault_s.S.obj
[ 73%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/fatal.c.obj
[ 74%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/sys_fatal_error_handler.c.obj
[ 75%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/thread_abort.c.obj
[ 76%] Building ASM object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/isr_wrapper.S.obj
[ 77%] Linking C static library libarch__arm__core.a
[ 77%] Built target arch__arm__core
Scanning dependencies of target arch__arm__core__cortex_m
[ 78%] Building ASM object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/vector_table.S.obj
[ 79%] Building ASM object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/reset.S.obj
[ 80%] Building ASM object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/nmi_on_reset.S.obj
[ 81%] Building C object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/prep_c.c.obj
[ 82%] Building C object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/scb.c.obj
[ 83%] Building C object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/nmi.c.obj
[ 84%] Building C object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/exc_manage.c.obj
[ 85%] Linking C static library libarch__arm__core__cortex_m.a
[ 85%] Built target arch__arm__core__cortex_m
Scanning dependencies of target arch__arm__core__cortex_m__mpu
[ 86%] Building C object zephyr/arch/arm/core/cortex_m/mpu/CMakeFiles/arch__arm__core__cortex_m__mpu.dir/arm_core_mpu.c.obj
[ 87%] Building C object zephyr/arch/arm/core/cortex_m/mpu/CMakeFiles/arch__arm__core__cortex_m__mpu.dir/arm_mpu.c.obj
[ 88%] Linking C static library libarch__arm__core__cortex_m__mpu.a
[ 88%] Built target arch__arm__core__cortex_m__mpu
Scanning dependencies of target boards__arm__mimxrt1050_evk
[ 89%] Building C object zephyr/boards/boards/arm/mimxrt1050_evk/CMakeFiles/boards__arm__mimxrt1050_evk.dir/pinmux.c.obj
[ 90%] Linking C static library libboards__arm__mimxrt1050_evk.a
[ 90%] Built target boards__arm__mimxrt1050_evk
Scanning dependencies of target drivers__gpio
[ 91%] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_mcux_igpio.c.obj
[ 92%] Linking C static library libdrivers__gpio.a
[ 92%] Built target drivers__gpio
Scanning dependencies of target zephyr_prebuilt
[ 93%] Building C object zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj
[ 94%] Linking C executable zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:        8976 B       128 KB      6.85%
            SRAM:        3844 B       128 KB      2.93%
        IDT_LIST:          84 B         2 KB      4.10%
[ 94%] Built target zephyr_prebuilt
Scanning dependencies of target linker_pass_final_script
[ 95%] Generating linker_pass_final.cmd
[ 95%] Built target linker_pass_final_script
[ 96%] Generating isr_tables.c
Scanning dependencies of target kernel_elf
[ 97%] Building C object zephyr/CMakeFiles/kernel_elf.dir/misc/empty_file.c.obj
[ 98%] Building C object zephyr/CMakeFiles/kernel_elf.dir/isr_tables.c.obj
[100%] Linking C executable zephyr.elf
Generating files from zephyr.elf for board: mimxrt1050_evk

marco@L-xx:~/projects/misc/zephyr/samples/basic/blinky/build$ make debug
[  1%] Built target kobj_types_h_target
[  2%] Built target syscall_macros_h_target
[  3%] Generating always_rebuild
Building for board mimxrt1050_evk
[  4%] Generating misc/generated/syscalls.json
[  5%] Built target syscall_list_h_target
[  6%] Built target driver_validation_h_target
[  8%] Built target offsets
[  9%] Built target offsets_h
[ 33%] Built target kernel
[ 45%] Built target app
[ 46%] Built target linker_script
[ 62%] Built target zephyr
[ 76%] Built target arch__arm__core
[ 84%] Built target arch__arm__core__cortex_m
[ 87%] Built target arch__arm__core__cortex_m__mpu
[ 89%] Built target boards__arm__mimxrt1050_evk
[ 91%] Built target drivers__gpio
[ 93%] Built target zephyr_prebuilt
[ 94%] Built target linker_pass_final_script
[ 98%] Built target kernel_elf
[100%] Debugging mimxrt1050_evk
Using runner: jlink
J-Link GDB server running on port 2331
SEGGER J-Link GDB Server V6.32b Command Line Version

JLinkARM.dll V6.32b (DLL compiled May  8 2018 18:28:22)

-----GDB Server start settings-----
GDBInit file:                  none
GDB Server Listening port:     2331
SWO raw output listening port: 2332
Terminal I/O port:             2333
Accept remote connection:      yes
Generate logfile:              off
Verify download:               off
Init regs on start:            off
Silent mode:                   on
Single run mode:               on
Target connection timeout:     0 ms
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 Cortex-M7
Target interface:              SWD
Target interface speed:        auto
Target endian:                 little

GNU gdb (GDB) 7.11.0.20160511-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-pokysdk-linux --target=arm-zephyr-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/marco/projects/misc/zephyr/samples/basic/blinky/build/zephyr/zephyr.elf...done.
Remote debugging using :2331
0xa05f0000 in ?? ()
Resetting target
Loading section text, size 0x2176 lma 0x0
Loading section .ARM.exidx, size 0x8 lma 0x2178
Loading section devconfig, size 0x54 lma 0x2180
Loading section rodata, size 0xc0 lma 0x21d4
Loading section datas, size 0x28 lma 0x2294
Loading section initlevel, size 0x54 lma 0x22bc
Start address 0x14e4, load size 8974
Transfer rate: 83 KB/sec, 1121 bytes/write.
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xa05f0000 in ?? ()
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xa05f0000 in ?? ()
(gdb)

(gdb) mon reset 0
Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
(gdb) load ~/projects/misc/zephyr/samples/basic/blinky/build/zephyr/zephyr.elf
Loading section text, size 0x2176 lma 0x0
Loading section .ARM.exidx, size 0x8 lma 0x2178
Loading section devconfig, size 0x54 lma 0x2180
Loading section rodata, size 0xc0 lma 0x21d4
Loading section datas, size 0x28 lma 0x2294
Loading section initlevel, size 0x54 lma 0x22bc
Start address 0x14e4, load size 8974
Transfer rate: 85 KB/sec, 1121 bytes/write.
(gdb) break main.c:37
Note: breakpoint 4 also set at pc 0xbbc.
Breakpoint 5 at 0xbbc: file /home/marco/projects/misc/zephyr/samples/basic/blinky/src/main.c, line 37.
(gdb) c
Continuing.

Breakpoint 3, main () at /home/marco/projects/misc/zephyr/samples/basic/blinky/src/main.c:26
26    {
(gdb) c
Continuing.

Breakpoint 4, main () at /home/marco/projects/misc/zephyr/samples/basic/blinky/src/main.c:37
37            cnt++;
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xa05f0000 in ?? ()

Marco

Join users@lists.zephyrproject.org to automatically receive all group messages.