Re: C library re-entrancy under Zephyr
Rob Meades
Thanks for the swift response. That's a shame. I will go look at the PR at your link as shifting to the re-entrant versions just for Zephyr is going to be painful.
toggle quoted messageShow quoted text
Rob
-----Original Message-----
From: users@... <users@...> On Behalf Of Kumar Gala Sent: 11 March 2021 17:54 To: Rob Meades <Rob.Meades@...> Cc: users@... Subject: Re: [Zephyr-users] C library re-entrancy under Zephyr *** This is an EXTERNAL email. It was sent from outside of u-blox. *** Re-entrant support between newlib and zephyr is not currently supported. There’s an old PR on the subject https://github.com/zephyrproject-rtos/zephyr/pull/21518 - k On Mar 11, 2021, at 11:51 AM, Rob Meades via lists.zephyrproject.org <Rob.Meades=u-blox.com@...> wrote:
|
|
Re: C library re-entrancy under Zephyr
Kumar Gala
Re-entrant support between newlib and zephyr is not currently supported.
toggle quoted messageShow quoted text
There’s an old PR on the subject https://github.com/zephyrproject-rtos/zephyr/pull/21518 - k
On Mar 11, 2021, at 11:51 AM, Rob Meades via lists.zephyrproject.org <Rob.Meades=u-blox.com@...> wrote:
|
|
C library re-entrancy under Zephyr
Rob Meades
Should I expect C library functions (e.g. strtok()) under Zephyr to be re-entrant or must I call the re-entrant versions (i.e. in this case strtok_r())?
I ask because I am building/running nRF52840 (cortex-m4) and strok() _appears_ to NOT be re-entrant: I'd like to understand if this is expected or if I've messed up a configuration somewhere. My prj.conf file is attached in case it is helpful in answering the question. Rob
|
|
Re: [Zephyr-devel] Changing default branch name on GitHub - possible action required
Jack Rosenthal <jrosenth@...>
The typical way I've seen this done is: Phase 1: Create the main branch at the same commit hash as master. Repo maintainers make sure that the main branch is synced to master. Phase 2: Set the default branch to "main". Continue syncing "main" and "master". Phase 3: Stop syncing "main" and "master". Master goes stale. Phase 4: Delete the (now stale) master branch. I'm not sure if GitHub has tools for branch syncing, but it can be done easy enough from the command line by someone with push access.
On Thu, Mar 11, 2021 at 10:38 AM Kumar Gala <kumar.gala@...> wrote: Jack,
|
|
Re: [Zephyr-devel] Changing default branch name on GitHub - possible action required
Kumar Gala
Jack,
toggle quoted messageShow quoted text
We are utilizing what GitHub provides and as far as I can tell once we make the change to the default branch from ‘master’ to ‘main’ the ‘master’ branch will no longer exist in the repository. So downstream users will need to adjust after the change is made. If you have some means to handle such a synchronization its something that we can discuss. - k
On Mar 11, 2021, at 10:12 AM, Jack Rosenthal <jrosenth@...> wrote:
|
|
Re: [Zephyr-devel] Changing default branch name on GitHub - possible action required
Jack Rosenthal <jrosenth@...>
Hi, Will there be a period of time that we have two main branches ("master" and "main") that are auto-synced to give time for people to adjust their tools? Thanks, Jack
On Thu, Mar 11, 2021 at 6:32 AM Kumar Gala <kumar.gala@...> wrote: We will be changing the default branch on github from ‘master' to ‘main' on Friday (Mar 11, 2021).
|
|
Re: [Zephyr-devel] Changing default branch name on GitHub (delayed)
Kumar Gala
All,
toggle quoted messageShow quoted text
We’ve identified some changes we need to make to west to make the transition of branch name cleaner. We will delay the branch name change until these changes are made to west and a version of west is released. Sorry for the inconvenience. - k
On Mar 11, 2021, at 7:32 AM, Kumar Gala via lists.zephyrproject.org <kumar.gala=linaro.org@...> wrote:
|
|
Changing default branch name on GitHub - possible action required
Kumar Gala
We will be changing the default branch on github from ‘master' to ‘main' on Friday (Mar 11, 2021).
There is no action required for any open PRs, however you’ll need to update your local git clone as follows: git branch -m master main git fetch origin git branch -u origin/main main Will announce here when this change is made on Friday. thanks - k
|
|
Re: Building error on linux.
#west
Carles Cufi
Hi there,
This means that you don’t have a full zephyr environment.
Please follow the Getting Started Guide from scratch and you should be able to get this working:
https://docs.zephyrproject.org/latest/getting_started/index.html
Carles
From: users@... <users@...>
On Behalf Of wbasser via lists.zephyrproject.org
Sent: 09 March 2021 22:01 To: users@... Subject: [Zephyr-users] Building error on linux. #west
I created this project on windows and built it successfully. Migrated to Linux as this is our normal build environment. Checked the file out of git and upon attempting to build I get the following error. wbasser@ubuntu:~/strongarmtech/git/fuse-zephyr$ dir CMakeLists.txt prj.conf README.md src wbasser@ubuntu:~/strongarmtech/git/fuse-zephyr$ west build -p auto -b nrf52dk_nrf52832 usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ... west: error: argument <command>: invalid choice: 'build' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')
<pre><font color="#4E9A06"><b>wbasser@ubuntu</b></font>:<font color="#3465A4"><b>~/zephyrproject/zephyr</b></font>$ west build -p auto -b nrf52dk_nrf52832 ~/strongarmtech/git/fuse-zephyr <font color="#8AE234">-- west build: generating a build system</font> CMake Error: The source "/home/wbasser/strongarmtech/git/fuse-zephyr/CMakeLists.txt" does not match the source "/home/wbasser/zephyrproject/zephyr/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory. <font color="#EF2929">FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/wbasser/zephyrproject/zephyr/build -S/home/wbasser/strongarmtech/git/fuse-zephyr -GNinja -DBOARD=nrf52dk_nrf52832</font> <font color="#4E9A06"><b>wbasser@ubuntu</b></font>:<font color="#3465A4"><b>~/zephyrproject/zephyr</b></font>$ </pre>
|
|
Building error on linux.
#west
wbasser@...
I created this project on windows and built it successfully. Migrated to Linux as this is our normal build environment. Checked the file out of git and upon attempting to build I get the following error.
wbasser@ubuntu:~/strongarmtech/git/fuse-zephyr$ dir
CMakeLists.txt prj.conf README.md src
wbasser@ubuntu:~/strongarmtech/git/fuse-zephyr$ west build -p auto -b nrf52dk_nrf52832
usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
west: error: argument <command>: invalid choice: 'build' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')
If I go to zephyprojects/zephyr and execute the following command, I get the following: <pre><font color="#4E9A06"><b>wbasser@ubuntu</b></font>:<font color="#3465A4"><b>~/zephyrproject/zephyr</b></font>$ west build -p auto -b nrf52dk_nrf52832 ~/strongarmtech/git/fuse-zephyr
<font color="#8AE234">-- west build: generating a build system</font>
CMake Error: The source "/home/wbasser/strongarmtech/git/fuse-zephyr/CMakeLists.txt" does not match the source "/home/wbasser/zephyrproject/zephyr/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
<font color="#EF2929">FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/wbasser/zephyrproject/zephyr/build -S/home/wbasser/strongarmtech/git/fuse-zephyr -GNinja -DBOARD=nrf52dk_nrf52832</font>
<font color="#4E9A06"><b>wbasser@ubuntu</b></font>:<font color="#3465A4"><b>~/zephyrproject/zephyr</b></font>$
</pre>
Any ideas
|
|
Re: DTS own node DT_N_S_ undeclared
Piotr Barszczewski <piotr@...>
Thank you very much. I understand more now and was able to find my mistake. I’ve focused too much on trying to get DT_N_S_vbatt_S_vbatt0 to be defined while the mistake was somewhere else - in my case it was a DEVICE_DT_GET(DT_IO_CHANNELS_CTLR(VBATT_LIPO)) further - as you previously indicated that there might be the source of the problem. Thank you again for your time and help!
Best regards
|
|
Re: DTS own node DT_N_S_ undeclared
Kumar Gala
On Mar 5, 2021, at 11:26 AM, Piotr Barszczewski <piotr@...> wrote:So you are seeing correct behavior. The are several ways to get a NODE reference (DT_PATH and DT_NODELABEL) are 2 of them. They should expand to DT_N_S_vbatt_S_vbatt0. (This is meant to be concatenated with other identifies to resolve to an actual define in the generated header - via the macros on devicetree.h). It will not resolve to a meaningful value that can be compiled by itself. It has to be used in connection with another macro in devicetree.h to get some data from the dts node. For example if you wanted the "output-ohms” for vbatt0 you’d do something like: int out_ohms = DT_PROP(VBATT_LIPO, output_ohms); That would resolve to: int out_ohms = 3300000; - k
|
|
Re: DTS own node DT_N_S_ undeclared
Piotr Barszczewski <piotr@...>
Hello, Thank you for your response. My code is very similar to https://github.com/zephyrproject-rtos/zephyr/blob/master/samples/boards/nrf/battery/src/battery.c with the change that I’ve refactored it to accept different instances instead of supporting single #define VBATT DT_PATH(vbatt) . It’s practically 1:1 with what I needed so it seemed more reasonable to approach this way. Regarding #define VBATT_LIPO DT_NODELABEL(vbatt_lipo) and #define VBATT_LIPO DT_PATH(vbatt, vbatt0) I’ve tried this but the result is that in the end /* Existence and alternate IDs: */ #define DT_N_S_vbatt_S_vbatt0_EXISTS 1 #define DT_N_INST_0_voltage_divider DT_N_S_vbatt_S_vbatt0 #define DT_N_NODELABEL_vbatt_lipo DT_N_S_vbatt_S_vbatt0 Always points to non-existing DT_N_S_vbatt_S_vbatt0. It’s not clear to me where it should it be defined if not from DTS. Best regards
|
|
Re: DTS own node DT_N_S_ undeclared
Kumar Gala
On Mar 5, 2021, at 9:55 AM, Piotr Barszczewski <piotr@...> wrote: Oh, noticed your DT_PATH(batt, vbatt_lipo) is not correct. Try: #define VBATT_LIPO DT_PATH(batt, vbatt0) or #define VBATT_LIPO DT_NODELABEL(vbatt_lipo) - k
|
|
Re: DTS own node DT_N_S_ undeclared
Kumar Gala
On Mar 5, 2021, at 9:55 AM, Piotr Barszczewski <piotr@...> wrote:That looks normal. What does the code you are building look like? What else should I do to make my own DTS node be usable in the source file? I'm following the docs, referencing it by #define VBATT_LIPO DT_PATH(vbatt, vbatt_lipo) which is in line with the guides and docs but the DT_N_S_* is missing and I don't have a clue on how could I fix this.I think the .dts you have looks reasonable, my guess is the issue is more on the code usage side. Your define of VBATT_LIPO will give you a node reference which by its self is not useful. Its useful only w/regards to the macros in include/devicetree.h If you can share a snip of what the code looks like will probably be easier to see what might be the issue. - k
|
|
DTS own node DT_N_S_ undeclared
Piotr Barszczewski <piotr@...>
Hello, I'm writing an application for nrf52832 based board ADC + voltage divider functionalty as in the great nRF battery example https://docs.zephyrproject.org/latest/samples/boards/nrf/battery/README.html. I'm adapting it to support multiple vbatt nodes from DTS and while on the code layer it's quite simple I'm struggling with the DTS. My board dts file contains this part:
The devicetree snippet seems ok /* Existence and alternate IDs: */ #define DT_N_S_vbatt_S_vbatt0_EXISTS 1 #define DT_N_INST_0_voltage_divider DT_N_S_vbatt_S_vbatt0 #define DT_N_NODELABEL_vbatt_lipo DT_N_S_vbatt_S_vbatt0 except for the DT_N_S_vbatt_S_vbatt0 which is not defined anywhere and as a result I'm getting: zephyr/include/devicetree.h:73:17: error: 'DT_N_S_vbatt_S_vbatt_lipo' undeclared here (not in a function); did you mean 'DT_N_S_vbatt_S_vbatt_lipo_ORD'? What else should I do to make my own DTS node be usable in the source file? I'm following the docs, referencing it by #define VBATT_LIPO DT_PATH(vbatt, vbatt_lipo) which is in line with the guides and docs but the DT_N_S_* is missing and I don't have a clue on how could I fix this. Did anyone experience this before and could point me to where I could find a solution? Been trying for days now without result. Best regards
|
|
Zephyr on VEGABoard - Can't flash the hello_world demo
#flash
#west
#risc-v
#vegaboard
#rv32m1
jean-baptiste.edde@...
Hello,
I’m a student in electronics and I’m trying to use Zephyr on the VEGABoard, but I’m facing some issues. I’ve been able to run some demos provided by openisa in the sdk, and modify some, using GPIOs, etc. With Zephyr though, when I’m using the toolchain of the VEGABoard and build the Zephyr hello_wolrd example with “west build …”, I’ve got an error: “Can’t build a dummy C file”. But when I build using “cmake …” then “ninja”, it works. I’ve tried with other toolchains and I’ve got no problems at all. But the issue comes when I want to flash the Zephyr app on the VEGABoard (nothing appears on the serial terminal connected to port of openSDA), it doesn’t works. Here is what I get: -- west flash: using runner openocdI’ve tried with both the RI5CY and ZERO_RISCY cores.
Could you help me figure out where the problem is and how it can be fixed please? Thank you
|
|
arne@...
With a 5.10.11 linux kernel and bluez-5.55, setting PHY in btmgmt still doesn't work due to a bug in the kernel. You can easily work around that by using hcitool:
[mgmt]# phy Supported phys: LE1MTX LE1MRX LE2MTX LE2MRX LECODEDTX LECODEDRX Configurable phys: LE2MTX LE2MRX LECODEDTX LECODEDRX Selected phys: LECODEDTX LECODEDRX Then I had to change some zephyr code to report support for extended scan parameters and LE extended creation connection: index 82c7785068..a46a6680f9 100644 --- a/subsys/bluetooth/controller/hci/hci.c +++ b/subsys/bluetooth/controller/hci/hci.c @@ -671,6 +671,11 @@ static void read_supported_commands(struct net_buf *buf, struct net_buf **evt) BIT(6) | BIT(7); /* LE Remove Adv Set, LE Clear Adv Sets */ rp->commands[37] |= BIT(0) | BIT(1); + + /* LE Set Extended Scan Parameters, set extended scan enable */ + rp->commands[37] |= BIT(5) | BIT(6); + /* LE Extended Create Connection */ + rp->commands[37] |= BIT(7); #endif /* CONFIG_BT_CTLR_ADV_EXT */ #endif /* CONFIG_BT_BROADCASTER */ [bluetooth]# scan on Discovery started [CHG] Controller F7:7C:28:9D:3F:43 Discovering: yes [CHG] Device DA:BC:1B:2C:89:2D RSSI: -46 [CHG] Device DA:BC:1B:2C:89:2D RSSI: -63 HCI Event: LE Meta Event (0x3e) plen 42 #1148 [hci0] 82955.304690 LE Extended Advertising Report (0x0d) Num reports: 1 Entry 0 Event type: 0x0021 Props: 0x0001 Connectable Data status: Incomplete, more data to come Address type: Random (0x01) Address: DA:BC:1B:2C:89:2D (Static) Primary PHY: LE Coded Secondary PHY: LE Coded SID: 0x00 TX power: 127 dBm RSSI: -45 dBm (0xd3) Periodic advertising invteral: 0.00 msec (0x0000) Direct address type: Public (0x00) Direct address: 00:00:00:00:00:00 (OUI 00-00-00) Data length: 0x10 02 01 06 0f 09 4e 6f 72 64 69 63 5f 41 54 54 5f .....Nordic_ATT_ @ MGMT Event: Device Found (0x0012) plen 14 {0x0002} [hci0] 82955.311211 LE Address: 00:00:00:00:00:00 (OUI 00-00-00) RSSI: 0 dBm (0x00) Flags: 0x00000000 Data length: 0
|
|
Re: Using the Cortex M4 on IMX7D
Arnaud POULIQUEN
Hi,
This is the generic elf parser functions that are available here: https://elixir.bootlin.com/linux/latest/source/drivers/remoteproc/remoteproc_elf_loader.c Have you specified the firmware name? Here is the sequence to load a firmware from Linux user application: cp $1 /lib/firmware/ echo $1> /sys/class/remoteproc/remoteproc0/firmware echo start >/sys/class/remoteproc/remoteproc0/state with $1 is the firmware to load This function return NULL or the address of the resource table, but not return an error Do you have a kernel error message ?
This is mainly done in https://elixir.bootlin.com/linux/latest/source/drivers/remoteproc/remoteproc_elf_loader.c Regards, Arnaud
|
|
Mohamed Belaroussi
Hello,
I am getting this error Error: nrf5340pdk_nrf5340_cpuapp.dts.pre.tmp:710.1-6 Label or path temp not found when I try to load a project in SES v5.34a (File > Open nRF Connect SDK Project ...). Here is the complete log from SES Output window, Creating solution spi_test_LR1110-2-TX-RX-CMAC-AES.emProject
C:/Zypher/v1.5.0-rc1/toolchain/opt/bin/cmake.exe -GNinja -DBOARD=nrf5340pdk_nrf5340_cpuapp -DBOARD_DIR=C:\Zypher\v1.5.0-rc1\zephyr\boards\arm\nrf5340dk_nrf5340 -BC:\Dev\PID-4\spi_test_LR1110-2-TX-RX-CMAC-AES\build_nrf5340pdk_nrf5340_cpuapp_Zypher_v1.50rc1_temp -SC:\Dev\PID-4\spi_test_LR1110-2-TX-RX-CMAC-AES -DNCS_TOOLCHAIN_VERSION=1.5.0 -DDTC_OVERLAY_FILE=C:\Dev\PID-4\spi_test_LR1110-2-TX-RX-CMAC-AES/nrf5340pdk_nrf5340_cpuapp.overlay -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:\Zypher\v1.5.0-rc1\toolchain\segger_embedded_studio/html/configure_nordic_project_menuconfig.py
-- Application: C:/Dev/PID-4/spi_test_LR1110-2-TX-RX-CMAC-AES
-- Zephyr version: 2.4.99 (C:/Zypher/v1.5.0-rc1/zephyr)
-- Found Python3: C:/Zypher/v1.5.0-rc1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.9.0", minimum required is "0.7.1")
-- Board: nrf5340pdk_nrf5340_cpuapp
-- Cache files will be written to: C:/Zypher/v1.5.0-rc1/zephyr/.cache
-- Found dtc: C:/Zypher/v1.5.0-rc1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Zypher/v1.5.0-rc1/toolchain/opt)
-- Found BOARD.dts: C:/Zypher/v1.5.0-rc1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340pdk_nrf5340_cpuapp.dts
-- Found devicetree overlay: C:/Dev/PID-4/spi_test_LR1110-2-TX-RX-CMAC-AES/nrf5340pdk_nrf5340_cpuapp.overlay
-- Configuring incomplete, errors occurred!
Including boilerplate (Zephyr base): C:/Zypher/v1.5.0-rc1/zephyr/cmake/app/boilerplate.cmake
-- Using NCS Toolchain 1.5.0 for building. (C:/Zypher/v1.5.0-rc1/toolchain/cmake)
Error: nrf5340pdk_nrf5340_cpuapp.dts.pre.tmp:710.1-6 Label or path temp not found
FATAL ERROR: Syntax error parsing input tree
CMake Error at C:/Zypher/v1.5.0-rc1/zephyr/cmake/dts.cmake:205 (message):
command failed with return code: 1
Call Stack (most recent call first):
C:/Zypher/v1.5.0-rc1/zephyr/cmake/app/boilerplate.cmake:533 (include)
C:/Zypher/v1.5.0-rc1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
C:/Zypher/v1.5.0-rc1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:15 (find_package)
error: cmake failed
create_nordic_project.py failed (1) Thank you for your help. Kind regards Mohamed
|
|