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 Reply Children
  • Hi Karl,

    Thanks, that is the problem that I face. 

    Like I can build SDK/zephyr/samples/drivers/led_ws2812 on ubuntu.

    But on Windows and Mac, Ban... always miss some file. etc. zephyr/drivers/adc.h

    And when I copy adc.h from Linux to Windows, another error again.

    In file included from C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\toolchain.h:50,
                     from C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\init.h:10,
                     from C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\device.h:29,
                     from C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\drivers\adc.h:16,
                     from C:\Users\canic\ncs\v2.0.2\boards\arm\furry_project\furry_project.dts:9,
                     from <command-line>:
    C:\Users\canic\ncs\v2.0.2\zephyr\include\zephyr\toolchain\gcc.h:89:10: fatal error: stdbool.h: No such file or directory
       89 | #include <stdbool.h>
          | 

  • Hello again,

    Wols said:
    that is the problem that I face. 

    Could you clarify - are you now switching to working with an official nRF Connect SDK release, as downloaded through the Toolchain Manager application (which will have the correct Zephyr version too), or are you still trying to incorporate a particular file from upstream into your current Zephyr installation?

    Furthermore, it seems very strange to me that you are missing files such as 'adc.h' and 'stdbool.h' - in fact, I would think that this points to the Zephyr installation having failed / been incomplete. Did you use the Toolchain Manager to perform the installation of the SDK you are working with right now, or did you install it manually?

    Could you perform a reinstallation of the toolchain (use toolchain manager to download and install nRF Connect SDK >= v2.0.0, and see if you see this same issue with the fresh install?

    Best regards,
    Karl

  • Hi Karl,

    Sorry for the late reply.

    It's really confusing me that I can't find the correct ncs SDK for useing ADC example on nrf52840dk_nrf52840.

    I think that beacause in page 
    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/zephyr/samples/drivers/adc/README.html

    This sample does not work on Nordic platforms where there is a distinction between channel and analog input that requires additional configuration.
    See samples/boards/nrf/battery for an example of using the ADC infrastructure on Nordic hardware.

    So again I have no idea why i can build om linux, but ncs SDK do not suppout zephyr ADC example.

    I think I have to rewrite my adc code.

  • Hello again,

    Wols said:
    Sorry for the late reply.

    No problem at all - we can continue this whenever you have the chance, no worries! :) 

    Wols said:
    It's really confusing me that I can't find the correct ncs SDK for useing ADC example on nrf52840dk_nrf52840.

    I am not sure what you mean by this, could you elaborate?
    We do not have a dedicated SAADC usage example in the nRF Connect SDK (similar to the peripheral example we had in the nRF5 SDK) if this is what you mean, but you could take a look here to see how you easily can use the SAADC in the nRF Connect SDK.

    Did you have a look at my remining questions from my previous comment? Did you do a fresh reinstallation of the nRF Connect SDK through the Toolchain Manager?

    Best regards,
    Karl

  • Hi Karl,

    I have had reinstall nRF Connect SDK through the Toolchain Manager, but the sample " ncs/v2.0.2/zephyr/sample/driver/adc " still not working. (I guess this example works on my Linux just beacuse my environment is nasty... :'(  )

    And I think the reason I can't use the sample " ncs/v2.0.2/zephyr/sample/driver/adc ", is because there is no any nrf board config in adc/board, which means it's not support this example on nrf board.


    Now I am using " ncs/v2.0.2/zephyr/sample/board/nrf/bettery ", and trying to rewrite to fit my nrf52832dk(Which I currently have.).

    What the difference between the light_control example and " ncs/v2.0.2/zephyr/sample/board/nrf/bettery ",

    Are they both support nrf52832?

     

Related