How to switch to https://github.com/nrfconnect/sdk-zephyr main branch in ncs/v2.0.2?

After 

west init -m github.com/.../sdk-nrf --mr v2.0.2
west update

I notice ncs/v2.0.2/zephyr has huge difference with github.com/.../sdk-zephyr main

Like there is no 52840 overlay in ncs/v2.0.2/zephyr/sample/driver/adc/board.

I try to delete ncs/v2.0.2/zephyr and git clone https://github.com/nrfconnect/sdk-zephy.

But not working still got message:

=== updating zephyr (zephyr):
Updating files: 100% (10642/10642), done.
HEAD is now at be360e7db2 [nrf fromtree] net: openthread: enable default software tx security in 1.3
WARNING: left behind zephyr branch "main"; to rebase onto the new HEAD:
git -C zephyr rebase be360e7db2db7e1f0e9fcac686a08e62e350bf55 main

How can I switch to sdk-zephyr main?

Parents
  • Solved, but got another error.
    Just use checkout in ncs/v2.0.2/zephyr, and dont west update again.
        $ git checkout main

    After this I add CONFIG_LOG=y , I got this error and still looking for reason.

    undefined reference to `log_strdup'

    Building C object modules/nrf/subsys/mpsl/init/CMakeFiles/..__nrf__subsys__mpsl__init.dir/mpsl_init.c.obj
    In file included from C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\logging\log.h:11,
                     from C:\Users\canic\ncs\v2.0.2\nrf\subsys\mpsl\init\mpsl_init.c:10:
    C:/Users/canic/ncs/v2.0.2/nrf/subsys/mpsl/init/mpsl_init.c: In function 'm_assert_handler':
    C:\Users\canic\ncs\v2.0.2\nrf\subsys\mpsl\init\mpsl_init.c:122:33: warning: implicit declaration of function 'log_strdup' [-Wimplicit-function-declaration]
      122 |  LOG_ERR("MPSL ASSERT: %s, %d", log_strdup(file), line);
          |                                 ^~~~~~~~~~
    C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\logging\log_core.h:167:11: note: in definition of macro 'Z_LOG_TO_PRINTK'
      167 |         ##__VA_ARGS__); \
          |           ^~~~~~~~~~~
    C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\logging\log_core.h:252:2: note: in expansion of macro 'Z_LOG2'
      252 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
          |  ^~~~~~
    C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\logging\log.h:40:25: note: in expansion of macro 'Z_LOG'
       40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
          |                         ^~~~~
    C:\Users\canic\ncs\v2.0.2\nrf\subsys\mpsl\init\mpsl_init.c:122:2: note: in expansion of macro 'LOG_ERR'
      122 |  LOG_ERR("MPSL ASSERT: %s, %d", log_strdup(file), line);
          |  ^~~~~~~
    C:\Users\canic\ncs\v2.0.2\nrf\subsys\mpsl\init\mpsl_init.c:122:10: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat=]
      122 |  LOG_ERR("MPSL ASSERT: %s, %d", log_strdup(file), line);
          |          ^~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~
          |                                 |
          |                                 int
    C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\logging\log_core.h:247:28: note: in definition of macro 'Z_LOG2'
      247 |   z_log_printf_arg_checker(__VA_ARGS__); \
          |                            ^~~~~~~~~~~
    C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\logging\log.h:40:25: note: in expansion of macro 'Z_LOG'
       40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
          |                         ^~~~~
    C:\Users\canic\ncs\v2.0.2\nrf\subsys\mpsl\init\mpsl_init.c:122:2: note: in expansion of macro 'LOG_ERR'
      122 |  LOG_ERR("MPSL ASSERT: %s, %d", log_strdup(file), line);
          |  ^~~~~~~
    C:\Users\canic\ncs\v2.0.2\nrf\subsys\mpsl\init\mpsl_init.c:122:25: note: format string is defined here
      122 |  LOG_ERR("MPSL ASSERT: %s, %d", log_strdup(file), line);
          |                        ~^
          |                         |
          |                         char *
          |                        %d

Reply
  • Solved, but got another error.
    Just use checkout in ncs/v2.0.2/zephyr, and dont west update again.
        $ git checkout main

    After this I add CONFIG_LOG=y , I got this error and still looking for reason.

    undefined reference to `log_strdup'

    Building C object modules/nrf/subsys/mpsl/init/CMakeFiles/..__nrf__subsys__mpsl__init.dir/mpsl_init.c.obj
    In file included from C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\logging\log.h:11,
                     from C:\Users\canic\ncs\v2.0.2\nrf\subsys\mpsl\init\mpsl_init.c:10:
    C:/Users/canic/ncs/v2.0.2/nrf/subsys/mpsl/init/mpsl_init.c: In function 'm_assert_handler':
    C:\Users\canic\ncs\v2.0.2\nrf\subsys\mpsl\init\mpsl_init.c:122:33: warning: implicit declaration of function 'log_strdup' [-Wimplicit-function-declaration]
      122 |  LOG_ERR("MPSL ASSERT: %s, %d", log_strdup(file), line);
          |                                 ^~~~~~~~~~
    C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\logging\log_core.h:167:11: note: in definition of macro 'Z_LOG_TO_PRINTK'
      167 |         ##__VA_ARGS__); \
          |           ^~~~~~~~~~~
    C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\logging\log_core.h:252:2: note: in expansion of macro 'Z_LOG2'
      252 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
          |  ^~~~~~
    C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\logging\log.h:40:25: note: in expansion of macro 'Z_LOG'
       40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
          |                         ^~~~~
    C:\Users\canic\ncs\v2.0.2\nrf\subsys\mpsl\init\mpsl_init.c:122:2: note: in expansion of macro 'LOG_ERR'
      122 |  LOG_ERR("MPSL ASSERT: %s, %d", log_strdup(file), line);
          |  ^~~~~~~
    C:\Users\canic\ncs\v2.0.2\nrf\subsys\mpsl\init\mpsl_init.c:122:10: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat=]
      122 |  LOG_ERR("MPSL ASSERT: %s, %d", log_strdup(file), line);
          |          ^~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~
          |                                 |
          |                                 int
    C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\logging\log_core.h:247:28: note: in definition of macro 'Z_LOG2'
      247 |   z_log_printf_arg_checker(__VA_ARGS__); \
          |                            ^~~~~~~~~~~
    C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\logging\log.h:40:25: note: in expansion of macro 'Z_LOG'
       40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
          |                         ^~~~~
    C:\Users\canic\ncs\v2.0.2\nrf\subsys\mpsl\init\mpsl_init.c:122:2: note: in expansion of macro 'LOG_ERR'
      122 |  LOG_ERR("MPSL ASSERT: %s, %d", log_strdup(file), line);
          |  ^~~~~~~
    C:\Users\canic\ncs\v2.0.2\nrf\subsys\mpsl\init\mpsl_init.c:122:25: note: format string is defined here
      122 |  LOG_ERR("MPSL ASSERT: %s, %d", log_strdup(file), line);
          |                        ~^
          |                         |
          |                         char *
          |                        %d

Children
No Data
Related