Compiling sample program on MAC 10.14 gets a compilation error
Sowmya Krishnaswamy <sokrishn@...>
Hi, I am following the steps outlined in On MAC-OS (10.14). brew install gcc-arm-embedded --cask which arm-none-eabi-gdb export ZEPHYR_TOOLCHAIN_VARIANT= export GNUARMEMB_TOOLCHAIN_PATH=/usr/ echo $ZEPHYR_TOOLCHAIN_VARIANT west build -p auto -b nucleo_wb55rg samples/basic/blinky -- west build: making build dir /Users/user/zephyrproject/ -- west build: generating a build system Loading Zephyr default modules (Zephyr base). -- Application: /Users/user/zephyrproject/ -- Found Python3: /usr/local/opt/python@3.9/bin/ -- Cache files will be written to: /Users/user/Library/Caches/ -- Zephyr version: 3.0.99 (/Users/user/zephyrproject/ -- Found west (found suitable version "0.12.0", minimum required is "0.7.1") -- Board: nucleo_wb55rg -- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") -- Found toolchain: gnuarmemb (/usr/local) -- Found BOARD.dts: /Users/user/zephyrproject/ -- Generated zephyr.dts: /Users/user/zephyrproject/ -- Generated devicetree_unfixed.h: /Users/user/zephyrproject/ -- Generated device_extern.h: /Users/user/zephyrproject/ -- Including generated dts.cmake file: /Users/user/zephyrproject/ /Users/user/zephyrproject/ Parsing /Users/user/zephyrproject/ Loaded configuration '/Users/user/zephyrproject/ Merged configuration '/Users/user/zephyrproject/ Configuration saved to '/Users/user/zephyrproject/ Kconfig header saved to '/Users/user/zephyrproject/ -- The C compiler identification is GNU 11.2.1 -- The CXX compiler identification is GNU 11.2.1 -- The ASM compiler identification is GNU -- Found assembler: /usr/local/bin/arm-none-eabi- -- Configuring done -- Generating done -- Build files have been written to: /Users/user/zephyrproject/ -- west build: building application [1/156] Preparing syscall dependency handling [2/156] Generating include/generated/version.h -- Zephyr version: 3.0.99 (/Users/user/zephyrproject/ [19/156] Building C object zephyr/CMakeFiles/zephyr.dir/ FAILED: zephyr/CMakeFiles/zephyr.dir/ ccache /usr/local/bin/arm-none-eabi- /Users/user/zephyrproject/ /Users/user/zephyrproject/ 185 | int64_t ppb64 = (int64_t)((1.0 - (double)skew) * 1E9); | ^~~~~~~ Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.linaro.org/> for instructions. [28/156] Building C object zephyr/CMakeFiles/zephyr.dir/ ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /Users/user/zephyrproject/ users-MacBook-Pro:zephyr user$ Would anyone know what might be the issue and how to resolve this? Best Regards Sowmya
|
|
Re: Suppress line breaks when using LOG_INF etc with RTT and Segger
#debugging
Chruściński, Krzysztof
Hi Justin,
It is an option flag that can be used with log_output module which is a helper module for formatting log messages. Most of backends does not use it. It can be easily added to certain backend if needed as a Kconfig option. Feel free to open a Pull Request or let me know which backend you are using.
Regards, Krzysztof
From: users@... <users@...>
On Behalf Of justin.leavesley via lists.zephyrproject.org
Sent: Saturday, April 2, 2022 11:11 AM To: users@... Subject: [Zephyr-users] Suppress line breaks when using LOG_INF etc with RTT and Segger #debugging
I would have thought this was easy but I cannot seem to find a way to prevent LOG_INF etc from adding a line break to the log string. I have found the following log flag definition in log_output.h #define LOG_OUTPUT_FLAG_CRLF_NONE BIT(4) But I cannot see how to set this flag in the build and config system so that the logging picks it up.
Thanks, Justin
|
|
Suppress line breaks when using LOG_INF etc with RTT and Segger
#debugging
justin.leavesley@...
I would have thought this was easy but I cannot seem to find a way to prevent LOG_INF etc from adding a line break to the log string. I have found the following log flag definition in log_output.h #define LOG_OUTPUT_FLAG_CRLF_NONE BIT(4) But I cannot see how to set this flag in the build and config system so that the logging picks it up.
Thanks, Justin
|
|
Re: help with BLE HCI dual chip setup
Anis
thank you that did the trick :) Anis
On 3/30/22 10:08, Cufi, Carles wrote:
|
|
The Zephyr Developer Summit Schedule is Live!
Maemalynn Meanor <maemalynn@...>
Members of the Zephyr Community:
The schedule for the Zephyr Developer Summit, taking place on June 8-9 (with an intro to Zephyr Day on June 7) in Mountain View, California, is now live! Click here to learn more about the sessions and speakers. We are excited to see you in-person at the Computer History Museum or, if you’re attending virtually, we look forward to chatting with you after the live sessions on Discord. Here are a few links: Register for the event (early bird pricing ends April 1): https://events.linuxfoundation.org/zephyr-developer-summit/register/ Book a hotel room: https://events.linuxfoundation.org/zephyr-developer-summit/attend/venue-travel/#hotel-information Sponsor the summit: https://events.linuxfoundation.org/zephyr-developer-summit/sponsor/ Put your schedule together: https://events.linuxfoundation.org/zephyr-developer-summit/program/schedule/ Connect with us on social: @ZephyrIoT & Zephyr LinkedIn #ZephyrDevSummit #ZephyrRTOS Can’t wait to see you there! Maemalynn Maemalynn Meanor Senior PR & Marketing Manager The Linux Foundation ELISA, Open Mainframe Project, Zephyr Project (602) 541-0356 @Maemalynn
|
|
Zephyr v3.1 release date moved 1 week earlier
Bolivar, Marti
Hi everyone,
During today's Zephyr TSC meeting, we voted to move the release date for Zephyr v3.1 to 1 week earlier. This affects the feature freeze date as well, by the same amount of time. Updated dates are here: https://github.com/zephyrproject-rtos/zephyr/wiki/Program-Management#actual-and-planned-milestone-dates The main reason is to avoid overlap with Zephyr Developer's Summit 2022, which conflicts with the previous release date. Diff from the old dates is here: https://github.com/zephyrproject-rtos/zephyr/wiki/Program-Management/_compare/261a7be2693a8e438a249616fe3e53486636b015...c4df6ea339e0d77c14a1ce8d23511667a42c066a Thanks, Marti and Carles v3.1 release managers
|
|
Re: help with BLE HCI dual chip setup
Carles Cufi
Hi there,
On the board acting as a Host (i.e. the one that is running the app, not the on running hci_uart) you need to add a chosen node for zephyr,bt-uart, like here:
https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/arm/hexiwear_k64/hexiwear_k64.dts#L29
More about zephyr chosen nodes here:
https://docs.zephyrproject.org/latest/reference/devicetree/api.html#id2
Carles
From: users@... <users@...>
On Behalf Of Anis via lists.zephyrproject.org
Sent: 29 March 2022 23:04 To: users@... Subject: [Zephyr-users] help with BLE HCI dual chip setup
Hello, &uart0 { my nrf52dk_nrf52832.conf file is as follows CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
CONFIG_SERIAL=y CONFIG_UART_CONSOLE=n CONFIG_USE_SEGGER_RTT=y CONFIG_RTT_CONSOLE=y CONFIG_LOG=y CONFIG_LOG_DEFAULT_LEVEL=4 CONFIG_SPI_LOG_LEVEL_DBG=y CONFIG_LOG_BACKEND_RTT=y I added the following to prj.conf # Incresed stack due to settings API usage CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_BT=y CONFIG_BT_DEBUG_LOG=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_DIS=y CONFIG_BT_ATT_PREPARE_COUNT=5 CONFIG_BT_BAS=y CONFIG_BT_HRS=y CONFIG_BT_PRIVACY=y CONFIG_BT_DEVICE_NAME="Zephyr Peripheral Sample Long Name" CONFIG_BT_DEVICE_APPEARANCE=833 CONFIG_BT_DEVICE_NAME_DYNAMIC=y CONFIG_BT_DEVICE_NAME_MAX=65
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y CONFIG_BT_SETTINGS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_NVS=y CONFIG_SETTINGS=y
# added these to enable the BLE HCI config CONFIG_GPIO=y CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_BT_HCI=y CONFIG_BT_CTLR=n the project doesn't build. it gives the following error error: '__device_dts_ord_DT_CHOSEN_zephyr_bt_uart_ORD' undeclared (first use in this function)
any advice on how to fix this or how to get get a dual chip setup to work would be very appreciated. Thanks
|
|
help with BLE HCI dual chip setup
Anis
Hello, &uart0 { my nrf52dk_nrf52832.conf file is as follows CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
CONFIG_SERIAL=y CONFIG_UART_CONSOLE=n CONFIG_USE_SEGGER_RTT=y CONFIG_RTT_CONSOLE=y CONFIG_LOG=y CONFIG_LOG_DEFAULT_LEVEL=4 CONFIG_SPI_LOG_LEVEL_DBG=y CONFIG_LOG_BACKEND_RTT=y I added the following to prj.conf # Incresed stack due to settings API usage CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_BT=y CONFIG_BT_DEBUG_LOG=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_DIS=y CONFIG_BT_ATT_PREPARE_COUNT=5 CONFIG_BT_BAS=y CONFIG_BT_HRS=y CONFIG_BT_PRIVACY=y CONFIG_BT_DEVICE_NAME="Zephyr Peripheral Sample Long Name" CONFIG_BT_DEVICE_APPEARANCE=833 CONFIG_BT_DEVICE_NAME_DYNAMIC=y CONFIG_BT_DEVICE_NAME_MAX=65
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y CONFIG_BT_SETTINGS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_NVS=y CONFIG_SETTINGS=y # added these to enable the BLE HCI config
CONFIG_GPIO=y CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_BT_HCI=y CONFIG_BT_CTLR=n the project doesn't build. it gives the following error error: '__device_dts_ord_DT_CHOSEN_zephyr_bt_uart_ORD' undeclared
(first use in this function)
any advice on how to fix this or how to get get a dual chip setup
to work would be very appreciated. Thanks
|
|
Zephyr SDK 0.14.0 Release
Stephanos Ioannidis
Hi,
Zephyr SDK 0.14.0 has been released. https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.14.0 This is the first Zephyr SDK release to support all three major host operating systems: * general * Added multi-platform toolchain support (Linux, macOS and Windows). * Replaced self-extracting archive (SFX) distribution format with conventional archive with a setup script that can be manually run after extraction. * Changed Xtensa target triplet names to include the target SoC name (e.g. xtensa-sample_controller_zephyr-elf). Please refer to the latest "Getting Started Guide" for the instructions on how to install and use the multi-platform Zephyr SDK: https://docs.zephyrproject.org/latest/getting_started/index.html#install-a-toolchain Please try it out and report if you find any issues. Thanks, Stephanos
|
|
Stat system want to return integer
#mcumgr
Vince Mulhollon
I have what's probably a very simple question about the stats system, and likely only need a tiny additional kick in the right direction.
What works: I have stats working for telemetry purposes (counting missed sensor polls, interesting hardware events, that kind of thing). I have multiple stats and I can clear them, increment them, set them to an arbitrary value. I can view my stats by telnet into a shell. I can view my stats by using mcumgr both over serial and over UDP network. And it works great, and its simple, reliable, and easy to use. What doesn't work: There doesn't seem to be anything documented or example code or any terribly obvious getter function or macro to return a stat. I'm gathering the missed sensor poll counts anyway; would be nice to output the same data in a MQTT packet or print to a LCD display. The stat system does not do that out of the box, no problem I can send MQTT packets or do LCD stuff all day IF I have an int to output. So where do I get that int? Obviously I could replicate the stats system outside the stats system and everywhere I run a STATS_INC for mcumgr I could simultaneously run a some_var++; but that seems a waste to have two counters counting the same hardware event separately for multiple outputs. /* I want to know the code that performs similar to this in very general concept */ uint32_t missed_sensor_poll_count = STATS_GETTER_UINT32(sensor_group, missed_poll_counts) Maybe rephrased I'm saying I'm very familiar with the STATS_SET macro and it works great, now where is the STATS_GET macro? Thanks for your time. I fear I'm missing something terribly obvious and the harder I stare at the problem the harder it is to see, as it usually goes LOL.
|
|
Re: Unable to get GPIO controller handle from gpio node using DT_GPIO_CTLR
Bolivar, Marti
Hi Jason,
On Wed, Mar 16 2022, Jason Bens via lists zephyrproject org wrote: I'd like to get the GPIO controller handle, and figured I could do it with something like the following:DT_GPIO_CTLR returns a node identifier: https://docs.zephyrproject.org/latest/reference/devicetree/api.html#c.DT_GPIO_CTLR And node identifiers are not values: https://docs.zephyrproject.org/latest/guides/dts/api-usage.html#node-identifiers-are-not-values You can't do anything useful with a node identifier at runtime -- the devicetree has "vanished" at that point (see https://www.youtube.com/watch?v=sWaxQyIgEBY for what I mean by "vanished"). You need to convert the node identifier to a device pointer with DEVICE_DT_GET: static const struct device *gpio_dev = DEVICE_DT_GET(DT_GPIO_CTLR(DT_NODELABEL(button_sel_role), gpios)); Hope this helps, Martí
|
|
Re: Unable to get GPIO controller handle from gpio node using DT_GPIO_CTLR
Jason Bens
Solved, and yes, it was a stupid question. Given a closer read of the DT_GPIO_CTLR documentation, I noticed that it returns a node identifier, and not, as I expected a device handle. The correct statement: static const struct device *gpio_dev = DEVICE_DT_GET(DT_GPIO_CTLR(DT_NODELABEL(button_sel_role), gpios));
Thank you for everyone’s help,
From: users@... <users@...>
On Behalf Of Jason Bens
Sent: March 16, 2022 7:27 PM To: users@... Subject: [Zephyr-users] Unable to get GPIO controller handle from gpio node using DT_GPIO_CTLR
External Email: Hi,
I’m sure this is a very stupid question, but I haven’t been able to get to get this working. I’ve got the following device tree fragment:
gpio0: gpio@842500 { compatible = "nordic,nrf-gpio"; gpio-controller; reg = < 0x842500 0x300 >; #gpio-cells = < 0x2 >; label = "GPIO_0"; status = "okay"; port = < 0x0 >; phandle = < 0x2 >; };
(and elsewhere…)
buttons { compatible = "gpio-keys"; button_sel_role: button_1 { gpios = < &gpio0 0x2 0x11 >; label = "Push button 1"; }; };
Button_sel_role is on different GPIO controllers on some of the devices I’m developing on. I’d like to get the GPIO controller handle, and figured I could do it with something like the following: static const struct device *gpio_dev = DT_GPIO_CTLR(DT_NODELABEL(button_sel_role), gpios);
Unfortunately, this gives me a long chain of macro expansions, eventually terminating in <build_dir>/zephyr/include/generated/devicetree_unfixed.h:656:52: error: 'DT_N_S_soc_S_peripheral_50000000_S_gpio_842500' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_peripheral_50000000_S_gpio_842500_ORD'? [build] 656 | #define DT_N_S_buttons_S_button_1_P_gpios_IDX_0_PH DT_N_S_soc_S_peripheral_50000000_S_gpio_842500
Using DT_PROP, I can access the label, so I don’t think the expansion of DT_NODELABEL is wrong. I’m not really sure how to continue troubleshooting this. Any advice?
Thanks,
|
|
Re: Using the posix BSP
Rob Meades
Aha, that's it, thank you!
toggle quoted messageShow quoted text
Rob
-----Original Message-----
From: Cufi, Carles [mailto:Carles.Cufi@...] Sent: 17 March 2022 15:45 To: Rob Meades <Rob.Meades@...>; users@... Subject: RE: Using the posix BSP *** This is an EXTERNAL email. It was sent from outside of u-blox. *** Hi Rob, I think you are referring to Zephyr's native_posix port, which we also call "Native port". It currently runs on Linux but Chris Friedt is working on porting it to macOS. You can find more information here: https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.zephyrproject.org%2Flatest%2Fboards%2Fposix%2Fnative_posix%2Fdoc%2Findex.html&data=04%7C01%7CRob.Meades%40u-blox.com%7C9b09109bdbcd4d55f50008da082d099a%7C80c4ffa675114bba9f03e5872a660c9b%7C0%7C0%7C637831286791556809%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=THJvIk%2FNFBtKO2IsgAopyG4YJ5cpEJomJuzTqNgx50Y%3D&reserved=0 Carles P.S.: Say hi to Adam! -----Original Message-----
|
|
Re: Using the posix BSP
Carles Cufi
Hi Rob,
toggle quoted messageShow quoted text
I think you are referring to Zephyr's native_posix port, which we also call "Native port". It currently runs on Linux but Chris Friedt is working on porting it to macOS. You can find more information here: https://docs.zephyrproject.org/latest/boards/posix/native_posix/doc/index.html Carles P.S.: Say hi to Adam!
-----Original Message-----
|
|
Using the posix BSP
Rob Meades
Stoopid question time again I'm afraid: I would like to run Zephyr with Linux as host, so using the posix BSP. I can find information about running a posix application on top of Zephyr but not the other way up.
Can anyone point me at an example or some information concerning how I go about running Zephyr with its posix BSP? Rob
|
|
Unable to get GPIO controller handle from gpio node using DT_GPIO_CTLR
Jason Bens
Hi,
I’m sure this is a very stupid question, but I haven’t been able to get to get this working. I’ve got the following device tree fragment:
gpio0: gpio@842500 { compatible = "nordic,nrf-gpio"; gpio-controller; reg = < 0x842500 0x300 >; #gpio-cells = < 0x2 >; label = "GPIO_0"; status = "okay"; port = < 0x0 >; phandle = < 0x2 >; };
(and elsewhere…)
buttons { compatible = "gpio-keys"; button_sel_role: button_1 { gpios = < &gpio0 0x2 0x11 >; label = "Push button 1"; }; };
Button_sel_role is on different GPIO controllers on some of the devices I’m developing on. I’d like to get the GPIO controller handle, and figured I could do it with something like the following: static const struct device *gpio_dev = DT_GPIO_CTLR(DT_NODELABEL(button_sel_role), gpios);
Unfortunately, this gives me a long chain of macro expansions, eventually terminating in <build_dir>/zephyr/include/generated/devicetree_unfixed.h:656:52: error: 'DT_N_S_soc_S_peripheral_50000000_S_gpio_842500' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_peripheral_50000000_S_gpio_842500_ORD'? [build] 656 | #define DT_N_S_buttons_S_button_1_P_gpios_IDX_0_PH DT_N_S_soc_S_peripheral_50000000_S_gpio_842500
Using DT_PROP, I can access the label, so I don’t think the expansion of DT_NODELABEL is wrong. I’m not really sure how to continue troubleshooting this. Any advice?
Thanks,
|
|
Re: Use of __attribute__((uncached)) using the ARC toolchain
Ruud Derwig
Hi Nikola,
It looks like a similar known issue, see https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/319 Thanks for reporting. In many cases other uncached accessor functions for IO read/writes are used instead of the uncached attribute, but let’s see if I can boost priority for fixing this with your report. Your workaround should be fine for now, let me know if you need more help.
Regards,
Ruud.
From: users@... <users@...>
On Behalf Of nikola.neskovic995@...
Sent: Friday, March 11, 2022 2:49 PM To: users@... Subject: [Zephyr-users] Use of __attribute__((uncached)) using the ARC toolchain
Hi, I am trying to make an array that would bypass cache. I declare it like this:
|
|
Sharing a Zephyr Shell with multiple peripherals or create new Shell instance?
BDesterBEC
Hello,
I am attempting to interface two UART devices with a Nucleo H743ZI so that they have access in some way or another to the Zephyr shell and their own custom commands. Currently, one of them has been assigned to the chosen node's zephyr,shell-uart property. It has been proposed that it may be possible for both devices to share the same shell, but I am unsure how to do this or if it is actually possible. I have been successful in creating an additional shell instance with its own thread, however going down that route I am unsure how to assign commands to it as the macros do not allow for specification of a shell instance. If you have any insight into this please respond and it will be greatly appreciated. Thanks, Brandon
|
|
Re: Configure microphones on ST Discovery kit IoT node
Marco Cavallini
On 12/03/22 12:11, Daniele Bortoluzzi wrote:
Hi, Hi Daniele, 'm not using Zephyr Project at the moment, however showing your DTS and a better description and excerpts would help to figure out the solution. Just my two cents ;-) Distinti Saluti / Best Regards -- Marco Cavallini | KOAN sas Bergamo - Italia embedded software engineering https://KoanSoftware.com
|
|
Re: Configure microphones on ST Discovery kit IoT node
Daniele Bortoluzzi <danieleb88@...>
Hi, I also tried these configurations, according to .dts specs: - prj.conf: CONFIG_DMA=y - app.overlay: / {
}; &i2c4 {
}; But it doesn't compile: Error: disco_l475_iot1.dts.pre.tmp:1939.55-56 syntax error FATAL ERROR: Unable to parse input tree Il giorno mer 9 mar 2022 alle ore 09:48 Daniele Bortoluzzi <danieleb88@...> ha scritto:
|
|