Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smp_svr samle dosen't build for any target #24437

Closed
nvlsianpu opened this issue Apr 17, 2020 · 4 comments
Closed

smp_svr samle dosen't build for any target #24437

nvlsianpu opened this issue Apr 17, 2020 · 4 comments
Assignees
Labels
area: mcumgr area: Samples Samples bug The issue is a bug, or the PR is fixing a bug Regression Something, which was working, does not anymore

Comments

@nvlsianpu
Copy link
Collaborator

nvlsianpu commented Apr 17, 2020

Describe the bug
Can't build smp_svr sample on nrf52 device

To Reproduce
Steps to reproduce the behavior:

  1. west build -d build/smp_svr -b nrf52840dk_nrf52840 ./zephyr/samples/subsys/mgmt/mcumgr/smp_svr/
  2. build land in the error:
/home/anpu/codedev/zephyrproject/modules/lib/mcumgr/cmd/os_mgmt/port/zephyr/src/zephyr_os_mgmt.c: In function 'os_mgmt_impl_reset':
/home/anpu/codedev/zephyrproject/modules/lib/mcumgr/cmd/os_mgmt/port/zephyr/src/zephyr_os_mgmt.c:94:66: error: incompatible type for argument 3 of 'k_timer_start'
   94 |     k_timer_start(&zephyr_os_mgmt_reset_timer, K_MSEC(delay_ms), 0);
      |                                                                  ^
      |                                                                  |
      |                                                                  int
In file included from /home/anpu/codedev/zephyrproject/zephyr/include/kernel.h:5570,
                 from /home/anpu/codedev/zephyrproject/zephyr/include/zephyr.h:18,
                 from /home/anpu/codedev/zephyrproject/modules/lib/mcumgr/cmd/os_mgmt/port/zephyr/src/zephyr_os_mgmt.c:20:
zephyr/include/generated/syscalls/kernel.h:389:92: note: expected 'k_timeout_t' {aka 'struct <anonymous>'} but argument is of type 'int'
  389 | static inline void k_timer_start(struct k_timer * timer, k_timeout_t duration, k_timeout_t period)
      |                                                                                ~~~~~~~~~~~~^~~~~~
[96/125] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj

Expected behavior
sample builds and works

Environment (please complete the following information):
zephyr after #20983 PR was merged
master at 762b521

@nvlsianpu nvlsianpu added bug The issue is a bug, or the PR is fixing a bug Regression Something, which was working, does not anymore labels Apr 17, 2020
@nvlsianpu nvlsianpu self-assigned this Apr 17, 2020
@nvlsianpu
Copy link
Collaborator Author

FYI @aunsbjerg @jukkar

@nvlsianpu
Copy link
Collaborator Author

cc @de-nordic

@nvlsianpu
Copy link
Collaborator Author

nvlsianpu commented Apr 17, 2020

CONFIG_LEGACY_TIMEOUT_API=y fixes the issue.
It should be selected unless #24341 not merged.
temporary solved here: https://github.com/zephyrproject-rtos/zephyr/pull/24126/files

@nvlsianpu nvlsianpu changed the title smp_svr samle dosen't build for nrf52 smp_svr samle dosen't build for any target Apr 17, 2020
@aunsbjerg
Copy link
Collaborator

@nvlsianpu Is there a case for building the SMP sample without any of the overlay configs? The base config does not enable any of the SMP transports, which renders the sample pretty useless as far as I can tell.

This works:
west build -d build/smp_svr -b nrf52840dk_nrf52840 ./zephyr/samples/subsys/mgmt/mcumgr/smp_svr/ -- -DOVERLAY_CONFIG=overlay-bt.conf

Running sanitycheck on the samples also works:
./zephyr/scripts/sanitycheck -T zephyr/samples/subsys/mgmt/mcumgr/smp_svr/ -c builds fine.

de-nordic added a commit to de-nordic/zephyr that referenced this issue Apr 17, 2020
This commit updates mcumgr with latest snapshot from upstream.

Fixes zephyrproject-rtos#24437

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
hakehuang pushed a commit to hakehuang/zephyr that referenced this issue Jun 20, 2020
This commit updates mcumgr with latest snapshot from upstream.

Fixes zephyrproject-rtos#24437

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: mcumgr area: Samples Samples bug The issue is a bug, or the PR is fixing a bug Regression Something, which was working, does not anymore
Projects
None yet
Development

No branches or pull requests

2 participants