Error in services launch sequence
#debugging
#eclipse
#gdb
Peter <nimac.peter@...>
Hello,
I am trying to setup Eclipse with GNU MCU Eclipse plugin as an IDE debugger for Zephyr under Ubuntu 19.04. That is mainly in hopes to be able to debug with multiple threads, since I can't seem to get the gdb to detect more than thread at a time, even with the application configured with CONFIG_OPENOCD_SUPPORT=y set. For the test I'm using the Philosophers example provided by Zephyr. So far I've been following the guide in the zephyr documentation and completed the configuration, but when I try to debug the program I get the following error:
However, I can run the gdb debugger or simply flash the code just fine by using following commands: west debug west debugserver west flash Below are the screenshots of my configuration. I am passing the --pack option since I'm using STM Nucleo-144 F446ZE, which is not installed with pyOCD by default and I cannot install it using other means. Anyway, according to the error message it seems to me the command is called correctly. Any help is greatly appreciated. Best regards! Peter
|
|
Re: west and (no) data loss, was: Re: [Zephyr-users] Do not use west v0.6.1; upgrade to v0.6.2
Paul Sokolovsky
Hello Marti,
On Fri, 6 Sep 2019 17:41:56 +0000 "Bolivar, Marti" <Marti.Bolivar@nordicsemi.no> wrote: Hi Paul,[] Of course, no test suite is perfect, but I hope this addresses yourIt definitely does, and I much appreciate the detailed response (hopefully you wrote it not just as a response, but also a checklist for yourself, confirming there're no obvious things missed). It actually took some time to go in detail thru it, and I agree that good thought was put into various cases, it works close to the best possible (and I'm conservative only because I didn't use it much enough). To address a potential follow-up, I am looking into adding betterSounds great, and even the test file you referred to is 20K, so testing coverage is definitely not "bare". My only concern would be that maintaining west has become a non-trivial endeavor, but I guess, that part is covered, so all readers of the original and this thread should be happy about it! Thanks again! Thanks, -- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|
API meeting: Agenda
Carles Cufi
Hi all,
This week we will look at: - GPIO: Update on progress - Roadmap for GPIO inclusion: https://github.com/zephyrproject-rtos/zephyr/issues/18530 - Merge https://github.com/zephyrproject-rtos/zephyr/pull/16648 to topic-gpio - V4Z: Quick update on PR status https://github.com/zephyrproject-rtos/zephyr/pull/17194 - Sensor API: Update on progress Additional items in the "Triage" column in the GitHub project may be discussed if time permits. If you want an item included in the meeting, please add it to the GitHub project. https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion https://github.com/zephyrproject-rtos/zephyr/projects/18 https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit Regards,
|
|
Bluetooth security
#ble
Nick Ward
Hi, I was sent the below link recently regarding CVE2018-5383 and I was curious if there was any issue with Zephyr's Bluetooth implementation. I did a search through the mailing list, github and documentation but couldn't find anything. http://www.cs.technion.ac.il/~biham/BT/bt-fixed-coordinate-invalid-curve-attack.pdf Is there a status on this? Thanks
|
|
Re: west and (no) data loss, was: Re: [Zephyr-users] Do not use west v0.6.1; upgrade to v0.6.2
Carles Cufi
Thanks Martí for the extensive explanation.
I just want to add one more comment This is also the rationale behind leaving west projects in a detached HEAD state. If we were to use a specific branch name there would be potential for name collisions with local branches, as well as the potential for the emergence of serious bugs in the logic that would handle the branch maintenance and switching.b) "Is it true that west, whenThe default "west update" behavior uses "git checkout --detach". Carles
|
|
Re: west and (no) data loss, was: Re: [Zephyr-users] Do not use west v0.6.1; upgrade to v0.6.2
Bolivar, Marti
Hi Paul,
These are important questions, and I'm glad you've asked them. I will try to provide a fair amount of detail along with short answers. Paul Sokolovsky <paul.sokolovsky@linaro.org> writes: Hello Marti,Short answer is "yes". First, west doesn't change the contents of the manifest repository, ever. In upstream zephyr's case, that means builtin west commands won't edit files in the zephyr repository, only read them. The lone exception is "west init", which is used upstream to clone the zephyr repository itself. And if you try to run "west init" again in a way that would touch an existing installation, it aborts without doing anything -- in part, to avoid touching existing files in unexpected ways. This behavior is tested, e.g.: https://github.com/zephyrproject-rtos/west/blob/master/tests/test_project.py#L227 You can of course shoot yourself in the foot with something like this: $ west forall -c "rm -rf .git *" # DO NOT RUN THIS but I don't think that's what you're asking about. Side note: this is unlike Google repo, which pulls and can rebase the manifest repository when you run "repo sync", then attempts to rebase all your local working copies. I've seen this cause lots of problems, so not touching zephyr (and not rebasing modules by default) was an important constraint when we were designing west. Second, none of the west extension commands in the zephyr repository (completion, boards, build, sign, flash, debug, debugserver, attach) run git, so they won't check out any changes that way. There are of course ways to shoot yourself in the foot with the zephyr extensions by asking them to overwrite a file in your working copy or build directory you care about, e.g.: $ west sign [...] -B some-file-i-care-about $ west build --pristine=always -d build-dir-with-unsaved-.config-changes But, well, "you asked for it, you got it" (YAFIYGI). 2) To likewise never overwrite those changes on "west update"?Not by default; see below. Updates to modules via git only happens during west update -- again, barring YAFIYGI commands like: $ west forall -c "git reset --hard HEAD" West doesn't perform unattended updates. I personally hate tools that update me without asking first. West won't download updates and ask you if you want to apply them (like a web browser), either: you need to explicitly ask west to pull changes from the network and/or apply them to your working trees. b) "Is it true that west, whenThe default "west update" behavior uses "git checkout --detach". From git-checkout(1): Prepare to work on top of <commit>, by detaching HEAD at it (see "DETACHED HEAD" section), and updating the index and the files in the working tree. Local modifications to the files in the working tree are kept, so that the resulting working tree will be the state recorded in the commit plus the local modifications. Beyond preserving working tree state (unless there is a bug in git itself), this leaves your existing branches behind untouched. This is also tested, e.g.: https://github.com/zephyrproject-rtos/west/blob/master/tests/test_project.py#L186 Note that if local changes conflict with what would be checked out, git checkout --detach simply fails with "Your local changes to the following files would be overwritten by checkout: <list-of-files>". In that case, "west update" fails on that project, keeps going to the others, and ultimately exits with an error. I would argue it has done the right thing by leaving your code alone in the problematic project, while trying to do its job everywhere it can. When that happens, "west update" also prints an error at the very end of the command output alerting you that something went wrong, like this: ERROR: update failed for projects: <list-of-failed-projects> This is meant to help the user in case the error output scrolls past their terminal window too quickly. Now, you *can* ask west to rebase locally checked out branches with "west update --rebase" -- YAFIYGI. Of course, no test suite is perfect, but I hope this addresses your concerns, or at least answers your questions. We're always trying to improve the test suite and welcome any suggestions. To address a potential follow-up, I am looking into adding better coverage metrics to the test suite (it's tricky because a lot of the code is run in python subprocesses, as is the case in the above test_project.py example, so coverage from those runs needs to be collected and combined to produce meaningful results). From there, we can look at what's missing and make improvements. That of course does not address behavioral concerns like "what happens to my working tree in this situation?", which is a separate and ongoing effort. If you have any specific concerns, please let me know and I'll do my best to add missing tests as needed. Thanks, Marti
|
|
west and (no) data loss, was: Re: [Zephyr-users] Do not use west v0.6.1; upgrade to v0.6.2
Paul Sokolovsky
Hello Marti,
On Wed, 4 Sep 2019 16:39:22 +0000 "Bolivar, Marti" <marti.bolivar@nordicsemi.no> wrote: Marti Bolivar <marti.bolivar@nordicsemi.no> writes:Hi, Speaking of data loss... I figure I have local changes in modules managed (stroked thru) initially checked out by west. Can west be trusted: 1) To never touch those changes during normal development process, i.e. building and running apps? 2) To likewise never overwrite those changes on "west update"? I guess it boils down to questions: a) "Is it true that west never tries to perform any unattended module updates, and does that only if explicitly asked (west update)" and b) "Is it true that west, when asked to update modules, doesn't run any workcopy-destructive commands, like git reset, some forms of git checkout; or, if it does, it first performs (regression-tested) check for local changes in the corresponding modules ?" Thanks. [] -- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|
#usb wifi adapter support
#usb
thomasu1@...
I'm looking for information on supporting a #usb based wifi adapter, with or without off-loaded stack support?
--tnx --tom
|
|
How to configure BLE scanning for optimal effective time scanning
#ble
#bluetooth
nick.ward@...
Hi all,
We are trying to optimise our device for BLE advertisement reception. We are using Zephyr 1.14 with a nRF52832 module that is configured for up to 4 BLE connections (with our device acting as the peripheral). The scanning is set as passive and is set for 100% scanning with a interval of 60ms and a window of 60ms. Also we are not currently using the experimental split controller. We are also using the default BLE connection perferred parameters: CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=y
CONFIG_BT_PERIPHERAL_PREF_MIN_INT=24
CONFIG_BT_PERIPHERAL_PREF_MAX_INT=40
CONFIG_BT_PERIPHERAL_PREF_SLAVE_LATENCY=0
From what I have read the default Zephyr 1.14 BLE controller doesn't always switch to scanning when not servicing connections or advertising but can be blocked from scanning if a schedualled advertising/connection need conflicts. Without empirically testing I was wondering if I could get some theoretical tips on what would be a good starting point? Thanks, Nick Ward
|
|
BLE advertising channel selection for nRF52840
Venkat Rao Vallapaneni <vallapaneni@...>
Hi,
Please let me know if there is a way to restrict advertising to a given primary channel. I am using nRF52840 USB dongle. Rgds, Venkat.
|
|
Re: C++ support (Eclipse CDT4) - 'printk' could not be resolved
#west
Bolivar, Marti
"leonardomt via Lists.Zephyrproject.Org"
<leonardomt=gmail.com@lists.zephyrproject.org> writes: Hi and thanks for your prompt response!No, sorry, I just built it on the command line. I'm not an Eclipse user, sorry :(. It does sound like there's something wrong with the way either linking or symbol resolution is going on in Eclipse, though. Sorry I couldn't be more help. I thought you were seeing this issue on the command line. Marti
|
|
Re: C++ support (Eclipse CDT4) - 'printk' could not be resolved
#west
Hi and thanks for your prompt response!
I tried both toolchains, gnuarmemb and zephyr. I can successfully load a zephyr project *without cpp support* into Segger (as in the link) or Eclipse and compile, flash and debug just fine. Also, you are right in that everything works as expected when using the command line, no matter if the project is c or cpp. The issue only occurs when you use Eclipse to import a project that requires cpp support: Eclipse wont recognize some functions (such as printk) and some symbols, instead it will highlight them as if they were not declared anywhere. Just to make sure I understood correctly, you successfully built the project (the cpp version; main.c --> main.cpp), but did you import it into Eclipse and got no errors after indexing finished? I read that Eclipse has two separate tools for indexing and resolving symbols/function so I wonder if this error has anything to do with the configuration in Eclipse as opposed to the cmake generator. Another likely situation is that I am not setting things right... either way, help is appreciated! Thanks! Leo
|
|
Re: C++ support (Eclipse CDT4) - 'printk' could not be resolved
#west
Bolivar, Marti
"leonardomt via Lists.Zephyrproject.Org"
<leonardomt=gmail.com@lists.zephyrproject.org> writes: Hello!Hi again! I copied these into samples/hello_world/prj.conf, but: I can't reproduce this on my Arch Linux machine with ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb, toolchain version gcc-arm-none-eabi-7-2018-q2-update. The build finishes successfully for me, and works when I flash it to my board. What toolchain are you using? Can you try with gnuarmemb? https://docs.zephyrproject.org/latest/getting_started/toolchain_3rd_party_x_compilers.html#gnu-arm-embedded One warning:BTW, since you mentioned Segger and you're using nRF: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_programming.html#building-with-ses Best, Marti
|
|
Re: nrf.h missing....
Thanks Johjan
toggle quoted messageShow quoted text
Yes I had just figured that out, the change to my source code is trivial, and not an issue, but I do find it strange that APIs are changing between rc1 and rc2. I would have thought that a change in API required a rev in the second digit of the release number. Lawrence King Principal Developer +1(416)627-7302
-----Original Message-----
From: Hedberg, Johan <johan.hedberg@intel.com> Sent: Wednesday, September 4, 2019 3:02 PM To: Lawrence King <lawrence.king@irdeto.com> Cc: Bolivar, Marti <Marti.Bolivar@nordicsemi.no>; Nashif, Anas <anas.nashif@intel.com>; Zephyr-users@lists.zephyrproject.org; users@lists.zephyrproject.org Subject: Re: [Zephyr-users] nrf.h missing.... Hi, On 4 Sep 2019, at 21.30, Lawrence King <lawrence.king@irdeto.com> wrote: P.S, of course in the process of upgrading the kernel step-by-step my app is broken somewhere between rc1 and rc2, but that is a separate problem for a separate thread if I can't figure it out. " error: macro "BT_GATT_CCC" passed 2 arguments, but takes just 1 “See this commit: https://github.com/zephyrproject-rtos/zephyr/pull/18270/commits/730778b4864abdd6a79cc38c071d03ae0aa6e015 Basically the fix is just to drop your custom bt_gatt_ccc_cfg array and not pass it as a parameter to BT_GATT_CCC(). Johan
|
|
Re: nrf.h missing....
Bolivar, Marti
Lawrence King <lawrence.king@irdeto.com> writes:
It all becomes clear now...Sure thing! I am glad that fixed your issue. Marti
|
|
Re: nrf.h missing....
Hi,
On 4 Sep 2019, at 21.30, Lawrence King <lawrence.king@irdeto.com> wrote: P.S, of course in the process of upgrading the kernel step-by-step my app is broken somewhere between rc1 and rc2, but that is a separate problem for a separate thread if I can't figure it out. " error: macro "BT_GATT_CCC" passed 2 arguments, but takes just 1 “See this commit: https://github.com/zephyrproject-rtos/zephyr/pull/18270/commits/730778b4864abdd6a79cc38c071d03ae0aa6e015 Basically the fix is just to drop your custom bt_gatt_ccc_cfg array and not pass it as a parameter to BT_GATT_CCC(). Johan
|
|
Re: [Zephyr-devel] Do not use west v0.6.1; upgrade to v0.6.2
Marc Herbert
it seems extremely serious, considering that west basically has one job (versioning).One of those jobs that everyone needs but no one wants to do? PS: versioning plus a bit more https://docs.zephyrproject.org/latest/guides/west/why.html
|
|
Re: nrf.h missing....
It all becomes clear now...
toggle quoted messageShow quoted text
I checked out various revisions of zephyr (rc1, rc2, etc) and ran west update at each step. You are correct it compiles correctly if I run 'west update' AFTER checking out a particular kernel (I had done 'west update' BEFORE checking out the latest kernel). Thanks for your help. P.S, of course in the process of upgrading the kernel step-by-step my app is broken somewhere between rc1 and rc2, but that is a separate problem for a separate thread if I can't figure it out. " error: macro "BT_GATT_CCC" passed 2 arguments, but takes just 1 " Lawrence King Principal Developer +1(416)627-7302
-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@nordicsemi.no> Sent: Wednesday, September 4, 2019 2:22 PM To: Lawrence King <lawrence.king@irdeto.com>; Nashif, Anas <anas.nashif@intel.com>; Zephyr-users@lists.zephyrproject.org Cc: users@lists.zephyrproject.org Subject: Re: [Zephyr-users] nrf.h missing.... "Lawrence King via Lists.Zephyrproject.Org" <lawrence.king=irdeto.com@lists.zephyrproject.org> writes: Yes, in fact it was the process of running ‘west update’ that broke myCan you provide details on this? As explained in the documentation PR, if you change your zephyr repository without running west update, the other repositories (in this case, the nRF HAL) may be either missing or out of sync with the main zephyr repository. This will lead to bad results. You can think of "west update" as being like "git submodule update". Thanks, Marti
|
|
Re: nrf.h missing....
Bolivar, Marti
"Lawrence King via Lists.Zephyrproject.Org"
<lawrence.king=irdeto.com@lists.zephyrproject.org> writes: Yes, in fact it was the process of running ‘west update’ that broke myCan you provide details on this? As explained in the documentation PR, if you change your zephyr repository without running west update, the other repositories (in this case, the nRF HAL) may be either missing or out of sync with the main zephyr repository. This will lead to bad results. You can think of "west update" as being like "git submodule update". Thanks, Marti
|
|
Re: nrf.h missing....
Bolivar, Marti
"Nashif, Anas via Lists.Zephyrproject.Org"
<anas.nashif=intel.com@lists.zephyrproject.org> writes: Did you run `west update` ?Probably should add this to the getting started guide: https://github.com/zephyrproject-rtos/zephyr/pull/18911
|
|