Date   

Re: [Networking][Mbedtls] Judicious use of cipher suites

Lubos, Robert
 

Hi Karthik,

 

In order to use cryptography you need a cryptographic library. Our networking applications use mbedTLS, therefore I don’t see a way to disable it, while still using cryptographic features.

 

I’m also surprised about what you write about config-tls-generic.h. It does indeed enable some ciphersuites by default (the ones used by our demo apps), but in fact it’s just a small subset of all ciphersuites available in the mbedTLS library. And they all can be disabled through Kconfig, or a proper configuration in your prj.conf file.

Especially that usage of CONFIG_MBEDTLS_USER_CONFIG_FILE indicates that you do use the generic config, perhaps you wanted to use CONFIG_MBEDTLS_CFG_FILE to use a custom one?

 

Regarding your question on limiting ciphersuites, you can do it in two ways:

  1. You can enable only a subset of available ciphersuites through a socket option, just as you noticed (see TLS_CIPHERSUITE_LIST, or tls_config->cipher_list in case of MQTT). This option accepts an array of integers, with IANA assigned ciphersuite identificatiors (see https://github.com/zephyrproject-rtos/zephyr/blob/master/ext/lib/crypto/mbedtls/include/mbedtls/ssl_ciphersuites.h)

Just note, that this configuration is a runtime configuration – all ciphersuites that were configured in your mbedTLS config file, but are not used, are still compiled in your application.

  1. You can specify a list of ciphersuites that should be available in the mbedTLS by specifying MBEDTLS_SSL_CIPHERSUITES config, see https://github.com/zephyrproject-rtos/zephyr/blob/9983710c442186e477e67fe04895a1e2be0609b2/ext/lib/crypto/mbedtls/configs/config-thread.h#L90 for sample use. This option will compile in only the selected cihpersuites.

 

Of course you can combine both approaches, and limit a compile-time number of ciphersuites, and then use different ciphersuites on different TLS contexts (sockets).

 

Regards,

Robert

 

From: users@... [mailto:users@...] On Behalf Of Prabhu Vinod, Karthik via Lists.Zephyrproject.Org
Sent: Thursday, April 4, 2019 07:25
To: users@...
Cc: users@...
Subject: [Zephyr-users] [Networking][Mbedtls] Judicious use of cipher suites

 

Hi

 

I wanted to check if there is a way to use cryptographic cipher suites without including following config options.

 

CONFIG_MBEDTLS=y

CONFIG_MBEDTLS_BUILTIN=y

 

CONFIG_MBEDTLS_ENABLE_HEAP=y

CONFIG_MBEDTLS_HEAP_SIZE=56240

CONFIG_MBEDTLS_USER_CONFIG_ENABLE=y

CONFIG_MBEDTLS_USER_CONFIG_FILE="user-tls.conf"

 

In most user space application clients like those of mqtt, co-ap https etc,  I have observed we associate a tls_config with a socket as a socket_opt. I wanted to know if we could use a very small set of cipher suites just by providing the list of cipher suites in tls_config->cipher_list  and skip enabling the CONFIG_MBEDTLS, CONFIG_MBEDTLS_BUILTIN. I don’t want to use config-tls-generic config file as the default as it contains almost all the cipher suites

 

At Application level we can do the below:

struct mqtt_sec_config *tls_config = &client->transport.tls.config;

 

tls_config->peer_verify = 2;

tls_config->cipher_list = NULL;

tls_config->sec_tag_list = m_sec_tags;

tls_config->sec_tag_count = ARRAY_SIZE(m_sec_tags);

tls_config->hostname = hostname;

 

 

Look forward to some suggestions here

 

 

Many Regards,

Karthik Prabhu Vinod

 

Help save the planet by choosing not to use single use plastics. Pick paper, bamboo or metal cutlery and carry your own bag to the grocery store. Every little thing you do makes an impact.


[Networking][Mbedtls] Judicious use of cipher suites

Prabhu Vinod, Karthik
 

Hi

 

I wanted to check if there is a way to use cryptographic cipher suites without including following config options.

 

CONFIG_MBEDTLS=y

CONFIG_MBEDTLS_BUILTIN=y

 

CONFIG_MBEDTLS_ENABLE_HEAP=y

CONFIG_MBEDTLS_HEAP_SIZE=56240

CONFIG_MBEDTLS_USER_CONFIG_ENABLE=y

CONFIG_MBEDTLS_USER_CONFIG_FILE="user-tls.conf"

 

In most user space application clients like those of mqtt, co-ap https etc,  I have observed we associate a tls_config with a socket as a socket_opt. I wanted to know if we could use a very small set of cipher suites just by providing the list of cipher suites in tls_config->cipher_list  and skip enabling the CONFIG_MBEDTLS, CONFIG_MBEDTLS_BUILTIN. I don’t want to use config-tls-generic config file as the default as it contains almost all the cipher suites

 

At Application level we can do the below:

struct mqtt_sec_config *tls_config = &client->transport.tls.config;

 

tls_config->peer_verify = 2;

tls_config->cipher_list = NULL;

tls_config->sec_tag_list = m_sec_tags;

tls_config->sec_tag_count = ARRAY_SIZE(m_sec_tags);

tls_config->hostname = hostname;

 

 

Look forward to some suggestions here

 

 

Many Regards,

Karthik Prabhu Vinod

 

Help save the planet by choosing not to use single use plastics. Pick paper, bamboo or metal cutlery and carry your own bag to the grocery store. Every little thing you do makes an impact.


BlueZ PHY CODED scan via HCI UART on nRF52840_pca10056 #ble #nrf52840 #uart #hci

piotr@...
 
Edited

Hi,

I'm trying to force a nRF52840-pca10056 DK to scan for BLE advertisements with PHY set to CODED via HCI and BlueZ 5.50 but keep getting rejected by the hci_uart from Zephyr examples (master branch). I have few scanners and advertisers written on top of nRF15.3 SDK which work so right now I'm trying to test how PHY_CODED works with HCI.
I might (for sure I am) be doing something wrong but I haven't found any good resources on doing that and was thinking that someone on this mailing list has already solved this problem.

What happens is while sending:

$ hcitool cmd 08 41 00 00 04 

the command is correctly recognized by btmon as 

@ RAW Open: hcitool (privileged) version 2.22                {0x0003} [hci0] 5244.434886
< HCI Command: LE Set Extended Scan Para.. (0x08|0x0041) plen 3  #157 [hci0] 5244.435025
        Own address type: Public (0x00)                                                 
        Filter policy: Accept all advertisement (0x00)                                  
        PHYs: 0x04                                                                      
        Entry 0: LE Coded                                                               
          Type: Reserved (0x02)                                                         
          Interval: 13.750 msec (0x0016)                                                
          Window: 0.625 msec (0x0001)                                                   
> HCI Event: Command Complete (0x0e) plen 4                      #158 [hci0] 5271.619061
      LE Set Extended Scan Parameters (0x08|0x0041) ncmd 1                              
            Status: Unknown HCI Command (0x01)                                     


When debugging with GDB i could not send any breakpoints beyond this function call: https://github.com/zephyrproject-rtos/zephyr/blob/21358baa72cea9c23be57444eb91444774842f97/subsys/bluetooth/controller/hci/hci.c#L2235 - for some reason the debugger never stopped anywhere in  https://github.com/zephyrproject-rtos/zephyr/blob/21358baa72cea9c23be57444eb91444774842f97/subsys/bluetooth/controller/hci/hci.c#L1576 


When looking through hci_uart .hex features list I found nothing suspicious:

                                                                         
# BT_HCI_OP_READ_LOCAL_FEATURES           BT_OP(BT_OGF_INFO, 0x0003) 
$ hcitool cmd 04 03                                                          

< HCI Command: Read Local Supported Featu.. (0x04|0x0003) plen 0  #115 [hci0] 865.674540 
> HCI Event: Command Complete (0x0e) plen 12                      #116 [hci0] 865.675121 
      Read Local Supported Features (0x04|0x0003) ncmd 1                                 
        Status: Success (0x00)                                                           
        Features: 0x00 0x00 0x00 0x00 0x60 0x00 0x00 0x00                                
          BR/EDR Not Supported                                                           
          LE Supported (Controller)                                                      


# BT_HCI_OP_READ_SUPPORTED_COMMANDS       BT_OP(BT_OGF_INFO, 0x0002) 
$ hcitool cmd 04 02                                                          
 

< HCI Command: Read Local Supported Comma.. (0x04|0x0002) plen 0  #117 [hci0] 865.679037 
> HCI Event: Command Complete (0x0e) plen 68                      #118 [hci0] 865.680251 
      Read Local Supported Commands (0x04|0x0002) ncmd 1                                 
        Status: Success (0x00)                                                           
        Commands: 65 entries                                                             
          Disconnect (Octet 0 - Bit 5)                                                   
          Read Remote Version Information (Octet 2 - Bit 7)                              
          Set Event Mask (Octet 5 - Bit 6)                                               
          Reset (Octet 5 - Bit 7)                                                        
          Read Transmit Power Level (Octet 10 - Bit 2)                                   
          Set Controller To Host Flow Control (Octet 10 - Bit 5)                         
          Host Buffer Size (Octet 10 - Bit 6)                                            
          Host Number of Completed Packets (Octet 10 - Bit 7)                            
          Read Local Version Information (Octet 14 - Bit 3)                              
          Read Local Supported Features (Octet 14 - Bit 5)                               
          Read BD ADDR (Octet 15 - Bit 1)                                                
          Set Event Mask Page 2 (Octet 22 - Bit 2)                                       
          LE Set Event Mask (Octet 25 - Bit 0)                                           
          LE Read Buffer Size (Octet 25 - Bit 1)                                         
          LE Read Local Supported Features (Octet 25 - Bit 2)                            
          LE Set Random Address (Octet 25 - Bit 4)                                       
          LE Set Advertising Parameters (Octet 25 - Bit 5)                               
          LE Read Advertising Channel TX Power (Octet 25 - Bit 6)                        
          LE Set Advertising Data (Octet 25 - Bit 7)                                     
          LE Set Scan Response Data (Octet 26 - Bit 0)                                   
          LE Set Advertise Enable (Octet 26 - Bit 1)                                     
          LE Set Scan Parameters (Octet 26 - Bit 2)                                      
          LE Set Scan Enable (Octet 26 - Bit 3)                                          
          LE Create Connection (Octet 26 - Bit 4)                                        
          LE Create Connection Cancel (Octet 26 - Bit 5)                                 
          LE Read White List Size (Octet 26 - Bit 6)                                     
          LE Clear White List (Octet 26 - Bit 7)                                         
          LE Add Device To White List (Octet 27 - Bit 0)                                 
          LE Remove Device From White List (Octet 27 - Bit 1)                            
          LE Connection Update (Octet 27 - Bit 2)                                        
          LE Set Host Channel Classification (Octet 27 - Bit 3)                          
          LE Read Channel Map (Octet 27 - Bit 4)                                         
          LE Read Remote Used Features (Octet 27 - Bit 5)                                
          LE Encrypt (Octet 27 - Bit 6)                                                  
          LE Rand (Octet 27 - Bit 7)                                                     
          LE Start Encryption (Octet 28 - Bit 0)                                         
          LE Long Term Key Request Reply (Octet 28 - Bit 1)                              
          LE Long Term Key Request Neg Reply (Octet 28 - Bit 2)                          
          LE Read Supported States (Octet 28 - Bit 3)                                    
          LE Receiver Test (Octet 28 - Bit 4)                                            
          LE Transmitter Test (Octet 28 - Bit 5)                                         
          LE Test End (Octet 28 - Bit 6)                                                 
          Read Authenticated Payload Timeout (Octet 32 - Bit 4)                          
          Write Authenticated Payload Timeout (Octet 32 - Bit 5)                         
          LE Remote Connection Parameter Request Reply (Octet 33 - Bit 4)                
          LE Remote Connection Parameter Request Negative Reply (Octet 33 - Bit 5)       
          LE Set Data Length (Octet 33 - Bit 6)                                          
          LE Read Suggested Default Data Length (Octet 33 - Bit 7)                       
          LE Write Suggested Default Data Length (Octet 34 - Bit 0)                      
          LE Add Device To Resolving List (Octet 34 - Bit 3)                             
          LE Remove Device From Resolving List (Octet 34 - Bit 4)                        
          LE Clear Resolving List (Octet 34 - Bit 5)                                     
          LE Read Resolving List Size (Octet 34 - Bit 6)                                 
          LE Read Peer Resolvable Address (Octet 34 - Bit 7)                             
          LE Read Local Resolvable Address (Octet 35 - Bit 0)                            
          LE Set Address Resolution Enable (Octet 35 - Bit 1)                            
          LE Set Resolvable Private Address Timeout (Octet 35 - Bit 2)                   
          LE Read Maximum Data Length (Octet 35 - Bit 3)                                 
          LE Read PHY (Octet 35 - Bit 4)                                                 
          LE Set Default PHY (Octet 35 - Bit 5)                                          
          LE Set PHY (Octet 35 - Bit 6)                                                  
          LE Enhanced Receiver Test (Octet 35 - Bit 7)                                   
          LE Enhanced Transmitter Test (Octet 36 - Bit 0)                                
          LE Read Transmit Power (Octet 38 - Bit 7)                                      
          LE Set Privacy Mode (Octet 39 - Bit 2)                                         


# BT_HCI_OP_READ_LOCAL_EXT_FEATURES       BT_OP(BT_OGF_INFO, 0x0004) 
$ hcitool cmd 04 04                                                          

< HCI Command: Read Local Extended Features (0x04|0x0004) plen 0  #119 [hci0] 865.683100 
        invalid packet size                                                              
> HCI Event: Command Complete (0x0e) plen 4                       #120 [hci0] 865.684035 
      Read Local Extended Features (0x04|0x0004) ncmd 1                                  
        Status: Unknown HCI Command (0x01)                                               





I've wen't over ninja menuconfig options and all config options seem to be set correctly to enable BLE PHY changes, Bluez 5.50 doesn't seem to be the problem because it just passes the bytes back and forth so what else could be the key to enable BLE PHY CODED scanning and advertising in HCI UART example?


------
Update after more attempts.

I've tried this multiple times but can't get to PHY CODED BLE scanning or even any result when trying to change the radio settings. 
I'm on the master branch of Zephyr and Bluez, kernel 4.15 and nRF52840 running hci_uart example also from Zephyr master branch.
Even the btmgmt "phy" command fails when trying to do anything around coding:

@ MGMT Command: Set PHY Configuration (0x0045) plen 4    
        Selected PHYs: 0x6000
          LE CODED TX
          LE CODED RX
@ MGMT Event: Command Status (0x0002) plen 3             
      Set PHY Configuration (0x0045)
        Status: Unknown Command (0x01)


Config for the project is also in line with what I've found in this mailing list:

CONFIG_CONSOLE=n
CONFIG_STDOUT_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_0_NRF_FLOW_CONTROL=y
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_BT_MAX_CONN=16
CONFIG_BT_TINYCRYPT_ECC=n
CONFIG_BT_CTLR_DTM_HCI=y
CONFIG_BT_CTLR_ASSERT_HANDLER=y
 
CONFIG_BT_CONN=y
CONFIG_BT_CTLR_PHY=y
CONFIG_BT_CTLR_PHY_CODED=y
CONFIG_BT_PHY_UPDATE=y
CONFIG_BT_AUTO_PHY_UPDATE=y
CONFIG_BT_CTLR_TX_BUFFER_SIZE=251
CONFIG_BT_RX_BUF_LEN=258
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
 

Has anyone ever made this work?


nRF52832 silently stops advertising

Christoph Schramm
 

Dear Group,

 

our device based on BL652 / nRF52832 silently stops advertising. After a reboot, everything works perfectly, but after some hours, it will just stop to be visible for other devices. Log gives no errors.

I even re-start advertising every 5 minutes (which should also fail, I guess). By the way, is there any way to check if the API is still advertising?

 

Anyone experienced this before?

 

Thanks,

Chris


Re: STM32 CAN bus driver issues #stm32 #can

Rodrigo Peixoto <rodrigopex@...>
 

*Root directory = project folder

On Mon, 1 Apr 2019 at 22:27 Rodrigo Peixoto <rodrigopex@...> wrote:
Josef,

The BOARD_ROOT works for me even with Stm32 boards. The pinmux is mandatory for alternate functions on st boards.

You can run the following commad to set the board root:

west build -b hvac_sensors -s. -- -DBOARD_ROOT=`pwd`

The code is considering your board is in the root directory following the structure boards/arm/hvac_sensors.

Done. Your board will run properly, I hope :)

At the dts, some configuration are applied to variables only and not affect the code at all. You'll need to use those variables on your code. If you want to check the dts generated variables, you can see the build/zephyr/include/generated/...

Good luck.
Best regards,
Rodrigo Peixoto
On Sat, 30 Mar 2019 at 11:37 Josef Raschen <josef@...> wrote:
Update: CAN bus is working now with my board. I had to move by board
config into the Zephyr tree, then pinmuxing seems to work. I still do
not know the root cause. My configuration (for CAN) was identical to the
one of the STM32F072B Discovery board in the Zephyr tree, but still
pinmuxing was not working - at least for pins PB8 and PB9 where my CAN
transceiver is connected to. Maybe I missed to set a variable for
out-of-tree board definitions, or maybe there is a bug in the build
scripts for out-of-tree builds. I thought that setting the BOARD_ROOT
variable for CMake should be sufficient. Also the CONFIG_* flags were
all set correctly, just my pinmuxing was ignored.

Anyway, I can live with having my board config in the Zephyr tree.

In case anybody is interested, I pushed everything to github:
https://github.com/JosefR/zephyr (board name: hvac_sensors)

Thank you for all your help,
Josef


On 30.03.19 12:13, Josef Raschen wrote:
> Hi,
>
> the driver is built into the kernel, but what I found out yesterday is,
> that the pinmuxing is not set up correctly. And the STM32 CAN controller
> will wait until it has received some bits before it leaves the init
> mode. So I think, when I fix that, it should work.
>
> Thanks,
> Josef
>
>
> On 30.03.19 04:03, Lawrence King wrote:
>> To me, the problem look more like you didn’t include the CAN bus
>> drivers when you built the kernel. Try running ‘make menuconfig’ and
>> turning on the CAN bus, then rebuilding.
>
>
>
>
>



--
Rodrigo Peixoto
Co-founder and Technical guru

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex

.
--
Rodrigo Peixoto
Co-founder and Technical guru

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex

.


Re: STM32 CAN bus driver issues #stm32 #can

Rodrigo Peixoto <rodrigopex@...>
 

Josef,

The BOARD_ROOT works for me even with Stm32 boards. The pinmux is mandatory for alternate functions on st boards.

You can run the following commad to set the board root:

west build -b hvac_sensors -s. -- -DBOARD_ROOT=`pwd`

The code is considering your board is in the root directory following the structure boards/arm/hvac_sensors.

Done. Your board will run properly, I hope :)

At the dts, some configuration are applied to variables only and not affect the code at all. You'll need to use those variables on your code. If you want to check the dts generated variables, you can see the build/zephyr/include/generated/...

Good luck.
Best regards,
Rodrigo Peixoto

On Sat, 30 Mar 2019 at 11:37 Josef Raschen <josef@...> wrote:
Update: CAN bus is working now with my board. I had to move by board
config into the Zephyr tree, then pinmuxing seems to work. I still do
not know the root cause. My configuration (for CAN) was identical to the
one of the STM32F072B Discovery board in the Zephyr tree, but still
pinmuxing was not working - at least for pins PB8 and PB9 where my CAN
transceiver is connected to. Maybe I missed to set a variable for
out-of-tree board definitions, or maybe there is a bug in the build
scripts for out-of-tree builds. I thought that setting the BOARD_ROOT
variable for CMake should be sufficient. Also the CONFIG_* flags were
all set correctly, just my pinmuxing was ignored.

Anyway, I can live with having my board config in the Zephyr tree.

In case anybody is interested, I pushed everything to github:
https://github.com/JosefR/zephyr (board name: hvac_sensors)

Thank you for all your help,
Josef


On 30.03.19 12:13, Josef Raschen wrote:
> Hi,
>
> the driver is built into the kernel, but what I found out yesterday is,
> that the pinmuxing is not set up correctly. And the STM32 CAN controller
> will wait until it has received some bits before it leaves the init
> mode. So I think, when I fix that, it should work.
>
> Thanks,
> Josef
>
>
> On 30.03.19 04:03, Lawrence King wrote:
>> To me, the problem look more like you didn’t include the CAN bus
>> drivers when you built the kernel. Try running ‘make menuconfig’ and
>> turning on the CAN bus, then rebuilding.
>
>
>
>
>



--
Rodrigo Peixoto
Co-founder and Technical guru

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex

.


Re: NXP RT1064 board and JLink Debugging

Maureen Helm
 

Hi Lawrence,

I rewrote the “Programming and Debugging” sections for all the NXP boards in a PR that was just merged on Friday:

https://github.com/zephyrproject-rtos/zephyr/pull/14000

 

For many of the i.MX RT boards I recommend using an external J-Link probe. Only RT1020 and RT1050 have J-Link OpenSDA firmware capable of programming the Hyperflash/QSPI. As Lawrence said, you could use the generic firmware, but you will need to 1) configure your zephyr application to link into internal SRAM (set CONFIG_CODE_ITCM=y and CONFIG_DATA_DTCM=y) and 2) override the Jlink device argument in board.cmake to "--device=Cortex-M7"

 

Maureen

 

From: users@... [mailto:users@...] On Behalf Of Antoine Zen-Ruffinen via Lists.Zephyrproject.Org
Sent: Monday, April 1, 2019 2:20 AM
To: Lawrence King <lawrence.king@...>; Zephyr-users@...
Cc: users@...
Subject: Re: [Zephyr-users] NXP RT1064 board and JLink Debugging

 

Hi Lawrence,

 

I've been trough that too. It seems that two things are missing on your side. First, you need to install the J-Link tools on your development host. Secondly, you should swap the "OpenSDA" firmware of the debug adapter MCU (U23 on the borad) to enable support for JLink. The default OpenSDA firmware support the CIMSIS-DAP that is supported by OpenOCD for instance. But OpenOCD is not able to program the i.MXRT familly for now (It is still good for RAM runs). 

 

To install the J-Link tools, if you are under Ubuntu Linux, you could just run "sudo apt install jlink". It's what I did and it do the job. Else, you have to manually download and install it from https://www.segger.com/downloads/jlink/. That should provide you the "JLinkExe" command that is missing in your logs.

 

The "SEGGER" OpenSDA firmware can be downloaded from https://www.segger.com/downloads/jlink/#JLinkOpenSDAGenericFirmwares. Unfortunately it seems that Segger has not released  firmware specific to the RT1064 eval board yet. I would try the one for the "MIMXRT1050-EVK-Hyperflash" as the chip are very similar from the memory point of view. How to change the firmware is explained in the board user guide, but in short:

 

1) Unplug USB.

2) Press&hold SW4 (reset, near debug USB).

3) Replug USB and hold SW4 for 1 or more seconds.

4) A new drive must show up in your host, named "MAINTENANCE"

5) Drag& drop the new firmware to that firmware. After a short programming time, the board shows up as "SEGGER" in the "lsusb" command.

 

You can revert to the original FW in the same way. The Original FW can be downloaded from https://www.nxp.com/support/developer-resources/run-time-software/kinetis-developer-resources/ides-for-kinetis-mcus/opensda-serial-and-debug-adapter:OPENSDA?&tid=vanOpenSDA.

 

If you can still not program the board, check that you have the right rights for the USB device. That can requires to setup the proper udev daemon rule. If you install JLink form unbunt repository, that should be already set.

 

Hope it helps!

 

Regards,

 

Antoine


From: users@... <users@...> on behalf of Lawrence King <lawrence.king@...>
Sent: Saturday, March 30, 2019 4:21:25 AM
To: Zephyr-users@...
Subject: [Zephyr-users] NXP RT1064 board and JLink Debugging

 

Dear All

 

On my business trip last week I was handed a i.MX RT1064 board, so today I tried to build and install the blinky progam for it. Unfortunately I am having problem getting Ninja flash or ninja debug to run.

 

When I started building at the cmake step I discovered my tools were out of date (zephyr-sdk-0.9.5-setup.run instead of zephyr-sdk-0.10.0-setup.run) no problem download the right tools and install them. Then my west install was out of date, again no problem, ‘west update’. Unfortunately it looks like I don’t have JLink support installed. What do I need to do to get that?

 

Curiously, when I look at the attached USB devices it says my board is ‘ARM DAPLink CIMSIS-DAP [0100]’ which is the same as my nrf52xx boards which run just fine with pyocd. Do I have a i.MX board with a ‘newer’ debugger that is ARM standard, or possibly the people that handed me the board updated it?

 

Of course I haven’t go to the step where the blinky program actually runs…

 

FYI - Here is the error message I get when I try ‘ninja flash’:

 

[0/1] Re-running CMake...

Zephyr version: 1.14.0

-- Selected BOARD mimxrt1060_evk

-- Found west: /home/lawrence/.local/bin/west (found suitable version "0.5.6", minimum required is "0.5.6")

-- Loading /home/lawrence/workspace/rc-demo/zephyr/zephyr/boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts as base

-- Overlaying /home/lawrence/workspace/rc-demo/zephyr/zephyr/dts/common/common.dts

Parsing Kconfig tree in /home/lawrence/workspace/rc-demo/zephyr/zephyr/Kconfig

Loading /home/lawrence/workspace/rc-demo/RT1060/build/zephyr/.config as base

Configuration written to '/home/lawrence/workspace/rc-demo/RT1060/build/zephyr/.config'

-- Cache files will be written to: /home/lawrence/.cache/zephyr

Including module(s): tinycbor

-- Configuring done

-- Generating done

-- Build files have been written to: /home/lawrence/workspace/rc-demo/RT1060/build

[99/105] Linking C executable zephyr/zephyr_prebuilt.elf

Memory region         Used Size  Region Size  %age Used

           FLASH:       24332 B         8 MB      0.29%

            SRAM:        6388 B        32 MB      0.02%

        IDT_LIST:          72 B         2 KB      3.52%

[104/105] Flashing mimxrt1060_evk

Using runner: jlink

Flashing Target Device

Traceback (most recent call last):

  File "/home/lawrence/.local/bin/west", line 11, in <module>

    sys.exit(main())

  File "/home/lawrence/.local/lib/python3.6/site-packages/west/_bootstrap/main.py", line 479, in main

    wrap(wrap_argv)

  File "/home/lawrence/.local/lib/python3.6/site-packages/west/_bootstrap/main.py", line 465, in wrap

    west.main.main(argv)

  File "/home/lawrence/workspace/rc-demo/zephyr/.west/west/src/west/main.py", line 576, in main

    args.handler(args, unknown)

  File "/home/lawrence/workspace/rc-demo/zephyr/.west/west/src/west/main.py", line 331, in ext_command_handler

    command.run(*west_parser.parse_known_args(argv))

  File "/home/lawrence/workspace/rc-demo/zephyr/.west/west/src/west/commands/command.py", line 85, in run

    self.do_run(args, unknown)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/flash.py", line 32, in do_run

    'ZEPHYR_BOARD_FLASH_RUNNER')

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/run_common.py", line 228, in do_run_common

    runner.run(command_name)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/runners/core.py", line 407, in run

    self.do_run(command, **kwargs)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/runners/jlink.py", line 99, in do_run

    self.flash(**kwargs)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/runners/jlink.py", line 150, in flash

    self.check_call(cmd)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/runners/core.py", line 466, in check_call

    subprocess.check_call(cmd)

  File "/usr/lib/python3.6/subprocess.py", line 286, in check_call

    retcode = call(*popenargs, **kwargs)

  File "/usr/lib/python3.6/subprocess.py", line 267, in call

    with Popen(*popenargs, **kwargs) as p:

  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__

    restore_signals, start_new_session)

  File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child

    raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'JLinkExe': 'JLinkExe'

FAILED: zephyr/cmake/flash/CMakeFiles/flash

cd /home/lawrence/workspace/rc-demo/RT1060/build && /usr/local/bin/cmake -E env /home/lawrence/.local/bin/west flash --skip-rebuild

ninja: build stopped: subcommand failed.

 

Lawrence King

Principal Developer

Connected Transport Market Unit

https://www.Irdeto.com

+1(416)627-7302

 

1  2 - linkedin  3 - instagram  4 - youtube  6 - facebook  7

            

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.

 

 

 


Re: NXP RT1064 board and JLink Debugging

Antoine Zen-Ruffinen
 

Hi Lawrence,


I've been trough that too. It seems that two things are missing on your side. First, you need to install the J-Link tools on your development host. Secondly, you should swap the "OpenSDA" firmware of the debug adapter MCU (U23 on the borad) to enable support for JLink. The default OpenSDA firmware support the CIMSIS-DAP that is supported by OpenOCD for instance. But OpenOCD is not able to program the i.MXRT familly for now (It is still good for RAM runs). 


To install the J-Link tools, if you are under Ubuntu Linux, you could just run "sudo apt install jlink". It's what I did and it do the job. Else, you have to manually download and install it from https://www.segger.com/downloads/jlink/. That should provide you the "JLinkExe" command that is missing in your logs.


The "SEGGER" OpenSDA firmware can be downloaded from https://www.segger.com/downloads/jlink/#JLinkOpenSDAGenericFirmwares. Unfortunately it seems that Segger has not released  firmware specific to the RT1064 eval board yet. I would try the one for the "MIMXRT1050-EVK-Hyperflash" as the chip are very similar from the memory point of view. How to change the firmware is explained in the board user guide, but in short:


1) Unplug USB.

2) Press&hold SW4 (reset, near debug USB).

3) Replug USB and hold SW4 for 1 or more seconds.

4) A new drive must show up in your host, named "MAINTENANCE"

5) Drag& drop the new firmware to that firmware. After a short programming time, the board shows up as "SEGGER" in the "lsusb" command.


You can revert to the original FW in the same way. The Original FW can be downloaded from https://www.nxp.com/support/developer-resources/run-time-software/kinetis-developer-resources/ides-for-kinetis-mcus/opensda-serial-and-debug-adapter:OPENSDA?&tid=vanOpenSDA.


If you can still not program the board, check that you have the right rights for the USB device. That can requires to setup the proper udev daemon rule. If you install JLink form unbunt repository, that should be already set.


Hope it helps!


Regards,


Antoine


From: users@... <users@...> on behalf of Lawrence King <lawrence.king@...>
Sent: Saturday, March 30, 2019 4:21:25 AM
To: Zephyr-users@...
Subject: [Zephyr-users] NXP RT1064 board and JLink Debugging
 

Dear All

 

On my business trip last week I was handed a i.MX RT1064 board, so today I tried to build and install the blinky progam for it. Unfortunately I am having problem getting Ninja flash or ninja debug to run.

 

When I started building at the cmake step I discovered my tools were out of date (zephyr-sdk-0.9.5-setup.run instead of zephyr-sdk-0.10.0-setup.run) no problem download the right tools and install them. Then my west install was out of date, again no problem, ‘west update’. Unfortunately it looks like I don’t have JLink support installed. What do I need to do to get that?

 

Curiously, when I look at the attached USB devices it says my board is ‘ARM DAPLink CIMSIS-DAP [0100]’ which is the same as my nrf52xx boards which run just fine with pyocd. Do I have a i.MX board with a ‘newer’ debugger that is ARM standard, or possibly the people that handed me the board updated it?

 

Of course I haven’t go to the step where the blinky program actually runs…

 

FYI - Here is the error message I get when I try ‘ninja flash’:

 

[0/1] Re-running CMake...

Zephyr version: 1.14.0

-- Selected BOARD mimxrt1060_evk

-- Found west: /home/lawrence/.local/bin/west (found suitable version "0.5.6", minimum required is "0.5.6")

-- Loading /home/lawrence/workspace/rc-demo/zephyr/zephyr/boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts as base

-- Overlaying /home/lawrence/workspace/rc-demo/zephyr/zephyr/dts/common/common.dts

Parsing Kconfig tree in /home/lawrence/workspace/rc-demo/zephyr/zephyr/Kconfig

Loading /home/lawrence/workspace/rc-demo/RT1060/build/zephyr/.config as base

Configuration written to '/home/lawrence/workspace/rc-demo/RT1060/build/zephyr/.config'

-- Cache files will be written to: /home/lawrence/.cache/zephyr

Including module(s): tinycbor

-- Configuring done

-- Generating done

-- Build files have been written to: /home/lawrence/workspace/rc-demo/RT1060/build

[99/105] Linking C executable zephyr/zephyr_prebuilt.elf

Memory region         Used Size  Region Size  %age Used

           FLASH:       24332 B         8 MB      0.29%

            SRAM:        6388 B        32 MB      0.02%

        IDT_LIST:          72 B         2 KB      3.52%

[104/105] Flashing mimxrt1060_evk

Using runner: jlink

Flashing Target Device

Traceback (most recent call last):

  File "/home/lawrence/.local/bin/west", line 11, in <module>

    sys.exit(main())

  File "/home/lawrence/.local/lib/python3.6/site-packages/west/_bootstrap/main.py", line 479, in main

    wrap(wrap_argv)

  File "/home/lawrence/.local/lib/python3.6/site-packages/west/_bootstrap/main.py", line 465, in wrap

    west.main.main(argv)

  File "/home/lawrence/workspace/rc-demo/zephyr/.west/west/src/west/main.py", line 576, in main

    args.handler(args, unknown)

  File "/home/lawrence/workspace/rc-demo/zephyr/.west/west/src/west/main.py", line 331, in ext_command_handler

    command.run(*west_parser.parse_known_args(argv))

  File "/home/lawrence/workspace/rc-demo/zephyr/.west/west/src/west/commands/command.py", line 85, in run

    self.do_run(args, unknown)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/flash.py", line 32, in do_run

    'ZEPHYR_BOARD_FLASH_RUNNER')

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/run_common.py", line 228, in do_run_common

    runner.run(command_name)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/runners/core.py", line 407, in run

    self.do_run(command, **kwargs)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/runners/jlink.py", line 99, in do_run

    self.flash(**kwargs)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/runners/jlink.py", line 150, in flash

    self.check_call(cmd)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/runners/core.py", line 466, in check_call

    subprocess.check_call(cmd)

  File "/usr/lib/python3.6/subprocess.py", line 286, in check_call

    retcode = call(*popenargs, **kwargs)

  File "/usr/lib/python3.6/subprocess.py", line 267, in call

    with Popen(*popenargs, **kwargs) as p:

  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__

    restore_signals, start_new_session)

  File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child

    raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'JLinkExe': 'JLinkExe'

FAILED: zephyr/cmake/flash/CMakeFiles/flash

cd /home/lawrence/workspace/rc-demo/RT1060/build && /usr/local/bin/cmake -E env /home/lawrence/.local/bin/west flash --skip-rebuild

ninja: build stopped: subcommand failed.

 

Lawrence King

Principal Developer

Connected Transport Market Unit

https://www.Irdeto.com

+1(416)627-7302

 

1  2 - linkedin  3 - instagram  4 - youtube  6 - facebook  7

            

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.

 

 

 


SSD1306 oled with NRF52840

Rohit Gujarathi
 

Hi everyone,

I am not able to get  ssd1306 working with zephyr. i am trying with nrf52840. The same setup works with adafruit library but not with zephyr. I am using I2C and get ACKs for all the data and commands but nothing gets displayed. I used a logic analyser to see what difference is there and saw a few differences in the commands so i modified the ssd1306 driver for zephyr to align with what adafruit library was sending but still nothing is displayed on the oled. can someone please help. i have attached zephyr logs, modified driver and logic analyser comparison csv. 


Re: STM32 CAN bus driver issues #stm32 #can

Josef Raschen <josef@...>
 

Update: CAN bus is working now with my board. I had to move by board config into the Zephyr tree, then pinmuxing seems to work. I still do not know the root cause. My configuration (for CAN) was identical to the one of the STM32F072B Discovery board in the Zephyr tree, but still pinmuxing was not working - at least for pins PB8 and PB9 where my CAN transceiver is connected to. Maybe I missed to set a variable for out-of-tree board definitions, or maybe there is a bug in the build scripts for out-of-tree builds. I thought that setting the BOARD_ROOT variable for CMake should be sufficient. Also the CONFIG_* flags were all set correctly, just my pinmuxing was ignored.

Anyway, I can live with having my board config in the Zephyr tree.

In case anybody is interested, I pushed everything to github: https://github.com/JosefR/zephyr (board name: hvac_sensors)

Thank you for all your help,
Josef

On 30.03.19 12:13, Josef Raschen wrote:
Hi,
the driver is built into the kernel, but what I found out yesterday is, that the pinmuxing is not set up correctly. And the STM32 CAN controller will wait until it has received some bits before it leaves the init mode. So I think, when I fix that, it should work.
Thanks,
Josef
On 30.03.19 04:03, Lawrence King wrote:
To me, the problem look more like you didn’t include the CAN bus drivers when you built the kernel. Try running ‘make menuconfig’ and turning on the CAN bus, then rebuilding.


Re: STM32 CAN bus driver issues #stm32 #can

Josef Raschen <josef@...>
 

Hi,

the driver is built into the kernel, but what I found out yesterday is, that the pinmuxing is not set up correctly. And the STM32 CAN controller will wait until it has received some bits before it leaves the init mode. So I think, when I fix that, it should work.

Thanks,
Josef

On 30.03.19 04:03, Lawrence King wrote:
To me, the problem look more like you didn’t include the CAN bus drivers when you built the kernel. Try running ‘make menuconfig’ and turning on the CAN bus, then rebuilding.


EIP Register - Unaligned Frame Ptr

vinay.menon@...
 

Hello

Am trying to run the hello_world sample project with code modified to cause a buffer overflow (it's for a course project!). However, instead of the EIP register being written into by the the string, I am getting an "unaligned frame ptr" error which would suggest that some memory setting isn't right. Any suggestions would be welcome!

Thanks in advance!

Thanks

Vinay Menon


NXP RT1064 board and JLink Debugging

Lawrence King
 

Dear All

 

On my business trip last week I was handed a i.MX RT1064 board, so today I tried to build and install the blinky progam for it. Unfortunately I am having problem getting Ninja flash or ninja debug to run.

 

When I started building at the cmake step I discovered my tools were out of date (zephyr-sdk-0.9.5-setup.run instead of zephyr-sdk-0.10.0-setup.run) no problem download the right tools and install them. Then my west install was out of date, again no problem, ‘west update’. Unfortunately it looks like I don’t have JLink support installed. What do I need to do to get that?

 

Curiously, when I look at the attached USB devices it says my board is ‘ARM DAPLink CIMSIS-DAP [0100]’ which is the same as my nrf52xx boards which run just fine with pyocd. Do I have a i.MX board with a ‘newer’ debugger that is ARM standard, or possibly the people that handed me the board updated it?

 

Of course I haven’t go to the step where the blinky program actually runs…

 

FYI - Here is the error message I get when I try ‘ninja flash’:

 

[0/1] Re-running CMake...

Zephyr version: 1.14.0

-- Selected BOARD mimxrt1060_evk

-- Found west: /home/lawrence/.local/bin/west (found suitable version "0.5.6", minimum required is "0.5.6")

-- Loading /home/lawrence/workspace/rc-demo/zephyr/zephyr/boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts as base

-- Overlaying /home/lawrence/workspace/rc-demo/zephyr/zephyr/dts/common/common.dts

Parsing Kconfig tree in /home/lawrence/workspace/rc-demo/zephyr/zephyr/Kconfig

Loading /home/lawrence/workspace/rc-demo/RT1060/build/zephyr/.config as base

Configuration written to '/home/lawrence/workspace/rc-demo/RT1060/build/zephyr/.config'

-- Cache files will be written to: /home/lawrence/.cache/zephyr

Including module(s): tinycbor

-- Configuring done

-- Generating done

-- Build files have been written to: /home/lawrence/workspace/rc-demo/RT1060/build

[99/105] Linking C executable zephyr/zephyr_prebuilt.elf

Memory region         Used Size  Region Size  %age Used

           FLASH:       24332 B         8 MB      0.29%

            SRAM:        6388 B        32 MB      0.02%

        IDT_LIST:          72 B         2 KB      3.52%

[104/105] Flashing mimxrt1060_evk

Using runner: jlink

Flashing Target Device

Traceback (most recent call last):

  File "/home/lawrence/.local/bin/west", line 11, in <module>

    sys.exit(main())

  File "/home/lawrence/.local/lib/python3.6/site-packages/west/_bootstrap/main.py", line 479, in main

    wrap(wrap_argv)

  File "/home/lawrence/.local/lib/python3.6/site-packages/west/_bootstrap/main.py", line 465, in wrap

    west.main.main(argv)

  File "/home/lawrence/workspace/rc-demo/zephyr/.west/west/src/west/main.py", line 576, in main

    args.handler(args, unknown)

  File "/home/lawrence/workspace/rc-demo/zephyr/.west/west/src/west/main.py", line 331, in ext_command_handler

    command.run(*west_parser.parse_known_args(argv))

  File "/home/lawrence/workspace/rc-demo/zephyr/.west/west/src/west/commands/command.py", line 85, in run

    self.do_run(args, unknown)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/flash.py", line 32, in do_run

    'ZEPHYR_BOARD_FLASH_RUNNER')

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/run_common.py", line 228, in do_run_common

    runner.run(command_name)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/runners/core.py", line 407, in run

    self.do_run(command, **kwargs)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/runners/jlink.py", line 99, in do_run

    self.flash(**kwargs)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/runners/jlink.py", line 150, in flash

    self.check_call(cmd)

  File "/home/lawrence/workspace/rc-demo/zephyr/zephyr/scripts/west_commands/runners/core.py", line 466, in check_call

    subprocess.check_call(cmd)

  File "/usr/lib/python3.6/subprocess.py", line 286, in check_call

    retcode = call(*popenargs, **kwargs)

  File "/usr/lib/python3.6/subprocess.py", line 267, in call

    with Popen(*popenargs, **kwargs) as p:

  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__

    restore_signals, start_new_session)

  File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child

    raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'JLinkExe': 'JLinkExe'

FAILED: zephyr/cmake/flash/CMakeFiles/flash

cd /home/lawrence/workspace/rc-demo/RT1060/build && /usr/local/bin/cmake -E env /home/lawrence/.local/bin/west flash --skip-rebuild

ninja: build stopped: subcommand failed.

 

Lawrence King

Principal Developer

Connected Transport Market Unit

https://www.Irdeto.com

+1(416)627-7302

 

1  2 - linkedin  3 - instagram  4 - youtube  6 - facebook  7

            

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.

 

 

 


Re: STM32 CAN bus driver issues #stm32 #can

Lawrence King
 

Hi Josef

 

To me, the problem look more like you didn’t include the CAN bus drivers when you built the kernel. Try running ‘make menuconfig’ and turning on the CAN bus, then rebuilding.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of Erwan Gouriou
Sent: Friday, March 29, 2019 11:21 AM
To: Josef Raschen <josef@...>
Cc: users <users@...>
Subject: Re: [Zephyr-users] STM32 CAN bus driver issues #stm32 #can

 

Hi Joseph,

 

Which board are you using? Did you check that CAN driver is available for this board?

Not sure it has been deployed for the whole STM32 family.

 

Erwan

 

On Fri, 29 Mar 2019 at 10:34, Josef Raschen <josef@...> wrote:

With some more debugging it looks like the STM32 CAN initialization
fails in the STM32 HAL code: At HAL_CAN_Init() the loop waiting for the
INAK bit in the CAN_MSR register to be reset when the initialization
mode of the CAN controller is left. This works with another program (not
using Zephyr) on the same board so I do not expect that my hardware is
broken.



nRF52 Random Fault #nrf52832

rtalbott@...
 

Hello,

I just started working on a new project and giving zephyr a try.  I have came to a problem that I can't seem to easily root cause.

I'm using nRF52832 with BLE running and also running a seperate thread controlling PWM for LED brightness control.  The program runs fine for several minutes and then I will get a hard fault.  This leads me to think there is a memory leak but I'm not doing any dynamic memory allocations.  The "faulting instruction" tends to change from run to run.

Here is output from one run:

- - - - - - - - - - - - - - - - - TARGET RESET - - - - - - - - - - - - - - - - -
***** Booting Zephyr OS v1.14.0-rc1-1366-gcb44b7e76861 *****
 
[00:00:03.423,126] [0m<inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)[0m
[00:00:03.423,126] [0m<inf> bt_hci_core: HW Variant: nRF52x (0x0002)[0m
[00:00:03.423,156] [0m<inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 1.14 Build 0[0m
[00:00:03.423,522] [1;33m<wrn> bt_hci_core: No ID address. Expecting one to come from storage.[0m
Bluetooth initialized
 
[00:00:03.424,102] [0m<inf> bt_hci_core: Identity: d0:97:29:94:70:ec (random)[0m
[00:00:03.424,102] [0m<inf> bt_hci_core: HCI: version 5.0 (0x09) revision 0x0000, manufacturer 0x05f1[0m
[00:00:03.424,102] [0m<inf> bt_hci_core: LMP: version 5.0 (0x09) subver 0xffff[0m
Advertising successfully started
 
starting cycle.
 
***** USAGE FAULT *****
 
  Illegal load of EXC_RETURN into PC
 
***** Hardware exception *****
 
Current thread ID = 0x20000064
Faulting instruction address = 0xb1c
 
Fatal fault in essential thread! Spinning...
----------------------------------------------------------------------------------------------
using addr2line with address set to 0xb1c returns:
/home/buildslave/src/github.com/zephyrproject-rtos/sdk-ng/build/build_arm/.build/arm-zephyr-eabi/src/gcc/libgcc/libgcc2.c:1082 (discriminator 7)


Now trying with CONFIG_NO_OPTIMIZATIONS=y results in not being able to run and faults immediately after start:
- - - - - - - - - - - - - - - - - TARGET RESET - - - - - - - - - - - - - - - - -
***** Booting Zephyr OS v1.14.0-rc1-1366-gcb44b7e76861 *****
 
***** USAGE FAULT *****
 
  Illegal use of the EPSR
 
***** Hardware exception *****
 
Current thread ID = 0x200008b0
Faulting instruction address = 0x2dd32
 
Fatal fault in thread 0x200008b0! Aborting.
 
starting cycle.
----------------------------------------------------------------------------------------------
 
using addr2line with address 0x2dd32 returns:
/home/rick/repos/project/app/zephyr/subsys/bluetooth/controller/ll_sw/ll_filter.c:805
 
Any idea what is going on here?

Thanks




Re: STM32 CAN bus driver issues #stm32 #can

Erwan Gouriou
 

Hi Joseph,

Which board are you using? Did you check that CAN driver is available for this board?
Not sure it has been deployed for the whole STM32 family.

Erwan


On Fri, 29 Mar 2019 at 10:34, Josef Raschen <josef@...> wrote:
With some more debugging it looks like the STM32 CAN initialization
fails in the STM32 HAL code: At HAL_CAN_Init() the loop waiting for the
INAK bit in the CAN_MSR register to be reset when the initialization
mode of the CAN controller is left. This works with another program (not
using Zephyr) on the same board so I do not expect that my hardware is
broken.




Re: STM32 CAN bus driver issues #stm32 #can

josef@...
 

With some more debugging it looks like the STM32 CAN initialization fails in the STM32 HAL code: At HAL_CAN_Init() the loop waiting for the INAK bit in the CAN_MSR register to be reset when the initialization mode of the CAN controller is left. This works with another program (not using Zephyr) on the same board so I do not expect that my hardware is broken.


Zephyr v1.14.0-rc3 Tagged

Kumar Gala
 

Hi all,

We have just tagged Zephyr 1.14.0-rc3.

At this point ONLY PRs related to docs or related to a GitHub issue / bug will go in. If a PR fixes a bug it MUST have an associated GitHub issue.

Our bug counts are looking pretty good for the release at this point:

6 - High [Goal 0]
26 - Medium [Goal 20]
57 - Low [Goal 50]

The final release is tentatively scheduled for the 12th of April.

The full release log can be found here:
https://github.com/zephyrproject-rtos/zephyr/releases/tag/v1.14.0-rc3

Thanks to everybody who contributed to this release!

Kumar


How to set the system date time?

Stefan Jaritz
 

Hey,

I have a question about date and time generation in ZephyrOS.

Current I am building a demo in which I am receiving samples. Now I like to add a timestamp to them. How can I do this in ZephyrOS? and how to get the best time resolution?

When runing several devices in parallel I like to sync the time of them. So I like to set the local system time.  How can I do this?

I am thinking using the time.h lib. I can get the current time via the "time(NULL)" call. There is no official way in the ANSI C lib to set the sys date & time. So Zephyr has it's own. How I can use external timers/RTC?

Kind regards!

Stefan


STM32 CAN bus driver issues #stm32 #can

josef@...
 

Hi, 

I am trying to get the STM32 CAN bus driver running with the latest revision from git. Unfortunately calling device_get_binding() fails and the reason for that is that the pointer 'driver_api' in the device struct is 0. 

I am now wondering if that's a bug (there were some reworks done in the CAN driver lately) or if I might have an issue in my code. Any ideas?

Thanks, 
Josef

1241 - 1260 of 2609