Kumar Gala
On Mar 25, 2021, at 6:15 PM, Bob Recny <bob@...> wrote:How are you invoking twister? You can do the following for new boards: ./scripts/twister -p <NEW BOARD NAME> That will limit twister to just build tests for the new board you are adding. You can also add `-M` to help reduce disk usage - k
|
|
Bob Recny <bob@...>
Greetings,
I'm preparing some PRs to add our u-blox nRF52 and nRF53 EVK boards to Zephyr. I'd like to run twister locally and seem to have things working. I'm running out of drive space due to the size of the twister output. What's the best way to either limit what gets tested (i.e. don't need other than nRF5x), or what size drive should I allocate to my VM? Thanks, Bob Recny brec-u-blox
|
|
Re: Compiling windbond spi flash driver
Bolivar, Marti
Hi Raz,
toggle quoted messageShow quoted text
I'm curious what version of Zephyr you're running. Since your error message mentions devicetree_fixups.h, it seems it might be on the older side. The DT "fixups" feature was deprecated in Zephyr 2.3 when the current devicetree.h API was first introduced. If you're using that version or later, you should probably move away from using fixup files. The build system will warn you about this deprecation if it discovers any DTS fixup files. For documentation on the jedec,spi-nor compatible in Kumar's example as it is used in the current Zephyr tree, see its page in the bindings index: https://docs.zephyrproject.org/latest/reference/devicetree/bindings/jedec%2Cspi-nor-spi.html#jedec-spi-nor-spi If you're using fixup files because you are on Zephyr v1.14 LTS, you will need to check the binding YAML file in dts/bindings/mtd/jedec,spi-nor.yaml directly, as the generated bindings index pages are not available in the LTS docs: https://github.com/zephyrproject-rtos/zephyr/blob/v1.14.2/dts/bindings/mtd/jedec%2Cspi-nor.yaml Note the LTS YAML bindings syntax is different than what you'll see v2.x bindings. "Kumar Gala via lists.zephyrproject.org" <kumar.gala=linaro.org@...> writes:
Here’s an example:
|
|
Re: Message Queues
Olga Syrbachova <syrba4eva28@...>
I have found msgdev.c under samples/scheduler/kernel/metairq_dispatch/src. And according to this example I'm quite sure my code is right. I have updated it here https://github.com/syrba4eva/Zephyr-RTOS/blob/main/main.c But I still have some errors when I try ol@ol-H270M-DS3H:~/zephyrproject/zephyr$ west build -b qemu_x86 samples/synchronization --pristine ... expected declaration specifiers or '...' before '&' token 40 | k_msgq_init(&my_msgq, my_msgq_buffer, sizeof(struct data_item_type), 10); | ^ /home/ol/zephyrproject/zephyr/samples/synchronization/src/main.c:40:23: error: expected declaration specifiers or '...' before 'my_msgq_buffer' 40 | k_msgq_init(&my_msgq, my_msgq_buffer, sizeof(struct data_item_type), 10); | ^~~~~~~~~~~~~~ /home/ol/zephyrproject/zephyr/samples/synchronization/src/main.c:40:39: error: expected declaration specifiers or '...' before 'sizeof' 40 | k_msgq_init(&my_msgq, my_msgq_buffer, sizeof(struct data_item_type), 10); | ^~~~~~ /home/ol/zephyrproject/zephyr/samples/synchronization/src/main.c:40:70: error: expected declaration specifiers or '...' before numeric constant 40 | k_msgq_init(&my_msgq, my_msgq_buffer, sizeof(struct data_item_type), 10); | ^~ /home/ol/zephyrproject/zephyr/samples/synchronization/src/main.c: In function 'threadA': /home/ol/zephyrproject/zephyr/samples/synchronization/src/main.c:62:21: error: storage size of 'data' isn't known 62 | struct data_item_t data; | ^~~~ /home/ol/zephyrproject/zephyr/samples/synchronization/src/main.c:62:21: warning: unused variable 'data' [-Wunused-variable] [54/118] Building C object zephyr/arch.../arch__x86__core.dir/ia32/thread.c.obj ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/ol/zephyrproject/zephyr/build And I still have this question: is it the right way to build my own application by modifying a
"synchronization" sample? I'm doing it right under
$HOME/zephyrproject/zephyr/samples/synchronization/src. Or should I create a new file in another directory?
On Thu, 25 Mar 2021 at 19:45, Olga Syrbachova <syrba4eva28@...> wrote:
|
|
Re: Error by building own app
Bolivar, Marti
Hello,
toggle quoted messageShow quoted text
Please refer to this troubleshooting item: https://docs.zephyrproject.org/latest/guides/west/troubleshooting.html#invalid-choice-build-or-flash-etc "Olga Syrbachova via lists.zephyrproject.org" <syrba4eva28=gmail.com@...> writes:
Hi! I want to create my own app. So I've followed the instructions given on
|
|
Re: Message Queues
Olga Syrbachova <syrba4eva28@...>
Thank you very much for your reply! Unfortunately I can't find samples/scheduler/metairq_dispatch neither on the website of zephyrproject nor on GIT. Could you please tell me where I can find msgdev.c? And also I would like to know if it's the right way to build my own application by modifying a "synchronization" sample? I'm doing it right under $HOME/zephyrproject/zephyr/samples/synchronization/src. Or should I create a new file in another directory? Many thanks in advance!
On Thu, 25 Mar 2021 at 07:52, Kim Boendergaard <kim.boendergaard@...> wrote:
|
|
Re: DeviceTree binding problem
#dts
#customboard
Kumar Gala
On Mar 25, 2021, at 10:57 AM, wbasser@... wrote: Do you have a dts binding for compatible = “gpio”. - k
|
|
DeviceTree binding problem
#dts
#customboard
wbasser@...
I created some local GPIO pins in a custom device tree for the project. It build correctly and I can see the entries in both the "build/zephyr.dts" and "build/includes/generated/devicetree_unfixed.h".
A snippet below shows the entries in the DTS file for the board /* These aliases are provided for compatibility with samples */
aliases {
led0 = &led0;
pwm-led0 = &pwm_led0;
sw0 = &user_button;
i2c-0 = &sercom2;
test1 = &test1;
test2 = &test2;
};
outputs {
compatible = "gpio";
test1: test1_0 {
gpios = <&porta 16 0>;
label = "TEST1";
};
test2: test2_0 {
gpios = <&porta 17 0>;
label = "TEST2";
};
};
In main: #include <zephyr.h>
#include <sys/printk.h>
#include <devicetree.h>
#include <drivers/gpio.h>
#define TEST1_ALIAS DT_ALIAS( test1 )
void main(void)
{
uint32_t uPin;
uPin = DT_GPIO_PIN( TEST1_ALIAS, gpios );
printk("Hello World! %s\n", CONFIG_ARCH);
}
I get an error on the pin assignment ephyr/include/generated/devicetree_unfixed.h:905:30: error: 'DT_N_S_outputs_S_test1_0_P_gpios_IDX_0_VAL_pin' undeclared (first use in this function); did you mean 'DT_N_S_buttons_S_button_0_P_gpios_IDX_0_VAL_pin'? 905 | #define DT_N_ALIAS_test1 DT_N_S_outputs_S_test1_0 | ^~~~~~~~~~~~~~~~~~~~~~~~ /
|
|
Re: CANbus to USB using Zephyr ?
Henrik Brix Andersen
Hi,
toggle quoted messageShow quoted text
I was actually working on one a while back. It was not native USB, but used USB CDC-ACM for exposing an Serial-Line Discipline CAN (slcan) compatible interface. I will see if I can resurrect it and submit it as a sample. Brgds, Brix -- Henrik Brix Andersen
On 24 Mar 2021, at 22.40, popeye22202 <kjh@...> wrote:
|
|
Re: Message Queues
Kim Boendergaard
Consider having a look at msgdev.c in samples/scheduler/metairq_dispatch
I think that clearly answer your questions
Best regards, Kim Bøndergaard
|
Software Tech Lead, Esco Medical
From: users@... <users@...>
On Behalf Of Olga Syrbachova
Sent: Wednesday, 24 March 2021 15.29 To: users@... Subject: [Zephyr-users] Message Queues
EXTERNAL — Use caution when opening link(s) or attachment(s) Hi! I'm trying to create my own app. I decided to start by modifying a "synchronization" sample. In my app I want to have 2 threads and 1 queue, so one thread can send messages to this queue and another thread is reading messages from the queue. I didn't find any sample with queues and I'm not sure how exactly to make queues. And I don't understand what I should put in "data" here:
void producer_thread(void) {
struct data_item_type data;
while (1) {
/* create data item to send (e.g. measurement, timestamp, ...) */
data = ...
/* send data to consumers */
while (k_msgq_put(&my_msgq, &data, K_NO_WAIT) != 0) {
/* message queue is full: purge old data & try again */
k_msgq_purge(&my_msgq);
}
/* data item was successfully added to message queue */
}
}
Data is of type struct data_item_type and it has 3 items in the example on the website. Does it mean I have to initialize my data in this way for example: data.field1 = 2; /* int = 2 */ data.field2 = 3; /* int = 3 */
I followed the tutorial on the website, but not all steps are clear to me. You can find my code on github: https://github.com/syrba4eva/Zephyr-RTOS/blob/main/main.c
Can you please suggest any sample with queues or tell me what I am doing wrong? Many thanks in advance. [The information contained in this email (including any attachments) is confidential and is intended solely for the use of the named addressee. Any unauthorized use, disclosure, reproduction, copying, distribution, or other form of unauthorized dissemination of the contents is expressly prohibited. If you have received this communication in error, please notify the sender immediately by email and delete the original message. Opinions, conclusions and other information in this message represent the opinion of the sender and do not necessarily represent or reflect the views and opinions of Esco Group companies.]
|
|
CANbus to USB using Zephyr ?
popeye22202
Is there CANbus to USB code using Zephyr ? I seem to recall seeing a
reference to one in a slide deck ... but didn't make a note of it. FYI, there is a number of "bare metal" code : https://github.com/kkuchera/canalyze-fw ... part of https://kkuchera.github.io/canalyze ... https://github.com/normaldotcom/candleLight_fw https://github.com/krumboeck/usb2can_firmware (for STR750FV2)
|
|
Re: Performance analysis tooling
Cap Able
Thank you, it certainly is a viable option to consider.
|
|
Re: Compiling windbond spi flash driver
Raz <raziebe@...>
how do i describe winbond in the device tree ? i have the spi addresses but what about the flash ? is there an example ?
On Wed, Mar 24, 2021 at 5:56 PM Kumar Gala <kumar.gala@...> wrote: Is the device described in the devicetree for the board you are building for?
|
|
Re: Compiling windbond spi flash driver
Kumar Gala
Here’s an example:
toggle quoted messageShow quoted text
https://github.com/zephyrproject-rtos/zephyr/blob/63ca48a7a9b8e9a85d9c18c5dbaf894968bbc35d/boards/arm/black_f407ve/black_f407ve.dts#L101 - k
On Mar 24, 2021, at 11:27 AM, Raz <raziebe@...> wrote:
|
|
Re: Compiling windbond spi flash driver
Kumar Gala
Is the device described in the devicetree for the board you are building for?
toggle quoted messageShow quoted text
- k
On Mar 24, 2021, at 10:52 AM, Raz <raziebe@...> wrote:
|
|
Compiling windbond spi flash driver
Raz <raziebe@...>
Hello I am fail to compile winbond spi flash driver (SPI_FLASH_W25QXXD)I fail to compile: I get errors like : zephyr/include/generated/devicetree_fixups.h:205:32: error: 'DT_ST_STM32_SPI_FIFO_40003C00_BASE_ADDRESS' undeclared here (not in a f Am I missing a step ? Kind regards Raz
|
|
Re: Performance analysis tooling
Kevin Townsend
I’d you’re using a Segger J-Link, you might find this useful:
On Wed, 24 Mar 2021 at 16:20, Cap Able <capablegh@...> wrote:
|
|
Message Queues
Olga Syrbachova <syrba4eva28@...>
Hi! I'm trying to create my own app. I decided to start by modifying a "synchronization" sample. In my app I want to have 2 threads and 1 queue, so one thread can send messages to this queue and another thread is reading messages from the queue. I didn't find any sample with queues and I'm not sure how exactly to make queues. And I don't understand what I should put in "data" here: void producer_thread(void) { struct data_item_type data; while (1) { /* create data item to send (e.g. measurement, timestamp, ...) */ data = ... /* send data to consumers */ while (k_msgq_put(&my_msgq, &data, K_NO_WAIT) != 0) { /* message queue is full: purge old data & try again */ k_msgq_purge(&my_msgq); } /* data item was successfully added to message queue */ } } Data is of type struct data_item_type and it has 3 items in the example on the website. Does it mean I have to initialize my data in this way for example: data.field1 = 2; /* int = 2 */ data.field2 = 3; /* int = 3 */ I followed the tutorial on the website, but not all steps are clear to me. You can find my code on github: https://github.com/syrba4eva/Zephyr-RTOS/blob/main/main.c Can you please suggest any sample with queues or tell me what I am doing wrong? Many thanks in advance.
|
|
Performance analysis tooling
Cap Able
Hello. Are there any performance analysis tools that can help gain a sense of where and how much CPU time is consumed more? For comparison, the gprof tool under Linux provides such capability for user space programs. For Linux kernel profiling one is oprofile.
|
|
tech support
Dmitry Shichenko <dsh@...>
Hello! I'm Dmitry, working in Moeco to create IoT solutions for the b2b market. We're settling a new project - bluetooth temperature \ himidity sensor in connection with gateway, based on bluetooth long range. Right now we're testing nRF52840-DK on Zephyr hci-UART firmware to operate in HCI-UART (HCI only driver) mode, and Raspberri PI4 to operate host mode. We faced some problems caused by the Linux kernel (Raspberry pi4) using BlueZ stack, which does not support Bluetooth long range. Could you please help to find a bluetooth stack supported long range technology under linux kernel? Due to the fact Zephyr supports BT long range, there was info regarding this technology counterpiece. Thanks for your help! --
|
|