Date   

Re: DATA_DTCM and NETWORKING Hello World

Loic Poulain
 



Le mer. 2 oct. 2019 à 06:28, <alessandro.moroni@...> a écrit :
Hello

I'm just trying to use the NETWORKING using the internal DATA_DTCM.
I can execute the hello world sample with DATA_DTCM=y, but i can't execute it with both:

CONFIG_DATA_DTCM=y
CONFIG_NETWORKING=y

I'm developing in the MIMXRT1050-EVK board.
The problem is that debugging i can't see the step line and the board breaks and i can't reprogram it (to fix the board, i have to use this procedure: https://community.nxp.com/thread/493530#comments ).

I can execute the sample dumb_webserver too with CONFIG_NETWORKING=y, but not with CONFIG_DATA_DTCM=y

AFAIK, Problem is that you can not use highly coupled memory (DTCM) for DMA transfer, since NXP ethernet driver and probably hal driver use transfer buffer for DMA, this breaks. Ideally we should create a kind of __DMAABLE macro for such buffer. To fix that either relocate network data to OCRAM or external SDRAM. Or build with DATA_OCRAM and relocate the code you want in DTCM. 

E.g. 
zephyr_code_relocate(src/main.c DTCM_DATA_BSS)

You'll have to define DTCM section in a custom.ld or in imx rt linker, something like:
+#if (DT_MCUX_DTCM_SIZE > 0) && !defined(CONFIG_DATA_DTCM)
+ DTCM (wx) : ORIGIN = DT_MCUX_DTCM_BASE_ADDRESS, LENGTH = DT_MCUX_DTCM_SIZE
+#endif

Regards, 


Re: GPIO driver & API Changes for Zephyr 2.1

Kumar Gala
 

On Oct 2, 2019, at 4:11 PM, Kumar Gala via Lists.Zephyrproject.Org <kumar.gala=linaro.org@lists.zephyrproject.org> wrote:


If you are on CC you own at least one of the GPIO drivers we have in tree. We’ve set a deadline of Friday Oct 11th for submitting changes to the GPIO drivers.
Its been pointed out the the CC gets munged by the list server. So if there’s confusion, look at issue #18530 for who is expected to work on which driver.

- k


GPIO driver & API Changes for Zephyr 2.1

Kumar Gala
 

All,

We have been working on changes to the GPIO driver layer that we intent to support in the 2.1 Zephyr release. Towards that we need to convert all the GPIO drivers (as well as users) to the new GPIO API.

If you are on CC you own at least one of the GPIO drivers we have in tree. We’ve set a deadline of Friday Oct 11th for submitting changes to the GPIO drivers.

The detail for how to change the driver are documented in this issue:

https://github.com/zephyrproject-rtos/zephyr/issues/18530

Additionally we’ve converted several drivers already that can be used as examples (gecko, sam, mcux, nrfx are merged in the branch) and PRs for (Stellaris, cmsdk_ahb, sx1509b, mcux igpio,

PRs should be made to the `topic-gpio` branch and have [TOPIC-GPIO] in the subject.

If you have questions you can find support from various developers on the #gpio channel on slack.

Peter Bigot has worked on updating the gpio_basic_api (tests/drivers/gpio/gpio_basic_api) test to provide significant coverage of the new API and help validate the driver changes. This test requires a single wire loopback between 2-pins to run.

Thanks everyone.

- k


DATA_DTCM and NETWORKING Hello World

alessandro.moroni@...
 

Hello

I'm just trying to use the NETWORKING using the internal DATA_DTCM.
I can execute the hello world sample with DATA_DTCM=y, but i can't execute it with both:

CONFIG_DATA_DTCM=y
CONFIG_NETWORKING=y

I'm developing in the MIMXRT1050-EVK board.
The problem is that debugging i can't see the step line and the board breaks and i can't reprogram it (to fix the board, i have to use this procedure: https://community.nxp.com/thread/493530#comments ).

I can execute the sample dumb_webserver too with CONFIG_NETWORKING=y, but not with CONFIG_DATA_DTCM=y

Thanks,
Best Regards.

Alessandro Moroni.


WiFi driver

Venkat Subbiah
 

Hello,

I am looking for a wifi driver which I could use to the interface to be used for a wifi driver to hook up to zephyr. I see a few in the zephyr/drivers/wifi/ folder, but they seem to AT command based. Not ones which received packets and sends them up the network stack.

I am looking to port the WHD driver from Cypress over to Zephyr and an existing one would help to try and figure out the how to interface it to zephyr and the network stack. I guess could try to use an ethernet driver, since it most OS's the interface to hookup a WiFi/ethernet driver is the same. Would that be true for zephyr too?

Thanks,
Venkat


Re: question in zephyrproject

Bolivar, Marti
 

Jaemin Choi <jaeminy.choi@samsung.com> writes:

The import error is solved due to you guys. Thank you.
Glad that part is resolved, sorry you're still (maybe) having problems.




1. USER_SITE is the directory where pykwalify was installed
2. ENABLE_USER_SITE is True
3. sys.path contains the directory where pykwalify was installed


These checklists should be added on the website I think.

I figured it out that USER_SITE wasn't the directory where pkywalify was installed.



To make them same, i reinstall python3 with this command

pip install python3 --user --force-reinstall

and also had to remove build directory to make it try to build new setting.



however, I faced another error when Im trying this same command.

west build -b reel_board samples/hello_world --pristine



these are new err message

Zephyr version: 2.0.99
-- Found PythonInterp: /usr/bin/python (found suitable version "3.7.1", minimum required is "3.4")
-- Selected BOARD reel_board
-- Found west: /home1/jaeminy.choi/.local/bin/west (found suitable version "0.6.2", minimum required is "0.6.0")
-- Loading /home1/jaeminy.choi/zephyr/zephyproject/zephyr/boards/arm/reel_board/reel_board.dts as base
-- Overlaying /home1/jaeminy.choi/zephyr/zephyproject/zephyr/dts/common/common.dts
Device tree configuration written to
/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/zephyr/include/generated/generated_dts_board.conf
Parsing Kconfig tree in /home1/jaeminy.choi/zephyr/zephyproject/zephyr/Kconfig
Loaded configuration '/home1/jaeminy.choi/zephyr/zephyproject/zephyr/boards/arm/reel_board/reel_board_defconfig'
Merged configuration '/home1/jaeminy.choi/zephyr/zephyproject/zephyr/samples/hello_world/prj.conf'
Configuration saved to '/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/zephyr/.config'
-- Cache files will be written to: /home1/jaeminy.choi/.cache/zephyr
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
CMake Error at ../../cmake/extensions.cmake:1326 (message):
Assertion failed: The toolchain is unable to build a dummy C file. See
CMakeError.log.
Call Stack (most recent call first):
../../CMakeLists.txt:44 (assert)

-- Configuring incomplete, errors occurred!
See also "/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles/CMakeOutput.log".
See also "/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles/CMakeError.log".
ERROR: command exited with status 1: /usr/local/bin/cmake -B/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build
-S/home1/jaeminy.choi/zephyr/zephyproject/zephyr/samples/hello_world -GNinja -DBOARD=reel_board



----------------------------------------------------------------------------------------------------------------------------------------------------





and these are the contents in /home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles/CMakeError.log



Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
Build flags:
Id flags:

The output was:
1
/usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/b
in/ld: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr
-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
/home/buildslave/src/github.com/zephyrproject-rtos/sdk-ng/build/build_arm/.build/arm-zephyr-eabi/src/newlib/new
lib/libc/stdlib/exit.c:64: undefined reference to `_exit'
Is this still a problem for you? It looks like you are using the zephyr
SDK as your toolchain. I'm not sure why a newlib file is being linked in
for hello_world, though. That sample shouldn't be using newlib.

Thanks,
Marti

collect2: error: ld returned 1 exit status

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++
Build flags:
Id flags:

The output was:
1
/usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/b
in/ld: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr
-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
/home/buildslave/src/github.com/zephyrproject-rtos/sdk-ng/build/build_arm/.build/arm-zephyr-eabi/src/newlib/new
lib/libc/stdlib/exit.c:64: undefined reference to `_exit'
collect2: error: ld returned 1 exit status

--------------------------------------------------------------------------------------------------------------------------





these are the contents in home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles/CMakeOutput.log".



The target system is: Generic - 2.0.99 - arm
The host system is: Linux - 3.13.0-100-generic - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
Build flags:
Id flags: -c

The output was:
0

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"

The C compiler identification is GNU, found in "/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles
/3.15.2/CompilerIdC/CMakeCCompilerId.o"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++
Build flags:
Id flags: -c

The output was:
0

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"

The CXX compiler identification is GNU, found in "/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFil
es/3.15.2/CompilerIdCXX/CMakeCXXCompilerId.o"

Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Founda
tion)":
arm-zephyr-eabi-gcc (crosstool-NG 1.24.0-rc2-dirty) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.







----------------------------------------------------------------------------------





This below is the text error message you asked. (import error message)

jaeminy.choi@lion:~/zephyr/zephyrproject/zephyr (master)$ west build -b qemu_x86 samples/hello_world
-- west build: build configuration:
source directory: /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/samples/hello_world
build directory: /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/build
BOARD: qemu_x86 (origin: command line)
-- west build: generating a build system
Zephyr version: 2.0.0
CMake Warning at /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/cmake/app/boilerplate.cmake:160 (message):
The build directory must be cleaned pristinely when changing boards
Call Stack (most recent call first):
CMakeLists.txt:5 (include)

-- Selected BOARD reel_board
-- Found west: /home1/jaeminy.choi/.local/bin/west (found suitable version "0.6.2", minimum required is "0.6.0")
CMake Error at /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/cmake/zephyr_module.cmake:45 (message):
Traceback (most recent call last):

File "/home1/jaeminy.choi/zephyr/zephyrproject/zephyr/scripts/zephyr_module.py", line 19, in <module>
import pykwalify.core

ImportError: No module named 'pykwalify'

Call Stack (most recent call first):
/home1/jaeminy.choi/zephyr/zephyrproject/zephyr/cmake/app/boilerplate.cmake:429 (include)
CMakeLists.txt:5 (include)

-- Configuring incomplete, errors occurred!
ERROR: command exited with status 1: /usr/local/bin/cmake -B/home1/jaeminy.choi/zephyr/zephyrproject/zephyr/build
-S/home1/jaeminy.choi/zephyr/zephyrproject/zephyr/samples/hello_world -GNinja -DBOARD=qemu_x86







--------- Original Message ---------

Sender : Bolivar, Marti <Marti.Bolivar@nordicsemi.no>

Date : 2019-09-18 05:22 (GMT+9)

Title : RE: [Zephyr-devel] question in zephyrproject



"Kinder, David B" <david.b.kinder@intel.com> writes:



Great!
We’re working on an updated getting started guide that streamlines this setup process so some important steps such as updating the
PATH are not missed (so easily).

Check out https://github.com/zephyrproject-rtos/zephyr/pull/19123
and the build artifacts for the GSG here:
https://builds.zephyrproject.org/zephyrproject-rtos/zephyr/19123/docs/getting_started/index.html


FWIW, recent versions of pip3 install will warn you if ~/.local/bin

(or wherever it installs packages with --user) are not on PATH, so

hopefully this problem will become less common as time goes on.



Comments appreciated.
-- david
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On Behalf Of Lawrence King
Sent: Tuesday, September 17, 2019 12:40 PM
To: Allen Curtis <allen@criticalsoftwaresolutions.com>; Bolivar, Marti <Marti.Bolivar@nordicsemi.no>
Cc: devel@lists.zephyrproject.org; jaeminy.choi@samsung.com
Subject: Re: [Zephyr-devel] question in zephyrproject
I’m with Charles. I had to add this to my .bashrc
export PATH=~/.local/bin:$PATH
Once I did this everything is good.


That is a separate issue as described in the back and forth between

Carles and I.



Let's not confuse the PATH environment variable, which is used to locate

the executable "west" file, with sys.path, which is the variable

Python uses to locate importable modules. The latter can be augmented

using the PYTHONPATH environment variable, but it should not be

necessary if python and pip3 are configured properly (and using the

default configuration for at least Ubuntu and Arch in my testing).



Thanks,

Marti



Lawrence King
Principal Developer
+1(416)627-7302
From: devel@lists.zephyrproject.org<mailto:devel@lists.zephyrproject.org>
<devel@lists.zephyrproject.org<mailto:devel@lists.zephyrproject.org>> On Behalf Of Allen Curtis

Sent: Tuesday, September 17, 2019 3:36 PM
To: Bolivar, Marti <Marti.Bolivar@nordicsemi.no<mailto:Marti.Bolivar@nordicsemi.no>>
Cc: devel@lists.zephyrproject.org<mailto:devel@lists.zephyrproject.org>;
jaeminy.choi@samsung.com<mailto:jaeminy.choi@samsung.com>

Subject: Re: [Zephyr-devel] question in zephyrproject
I did not see the “python -m site” in the instructions.
On Tue, Sep 17, 2019 at 12:33 PM Bolivar, Marti <Marti.Bolivar@nordicsemi.no<mailto:Marti.Bolivar@nordicsemi.no>> wrote:
Allen Curtis <allen@criticalsoftwaresolutions.com<mailto:allen@criticalsoftwaresolutions.com>> writes:
Not my experience. The last time I installed the dependencies went into a
dotlocal directory under the user account. Python couldn’t find them.
What distro are you using? Did you try running python3 -m site as
described below to debug?
On Tue, Sep 17, 2019 at 12:12 PM Bolivar, Marti <Marti.Bolivar@nordicsemi.no<mailto:Marti.Bolivar@nordicsemi.no>>
wrote:
Hi Jaemin, Allen,
"Allen Curtis via Lists.Zephyrproject.Org<http://Lists.Zephyrproject.Org>"
<allen=criticalsoftwaresolutions.com@lists.zephyrproject.org<mailto:criticalsoftwaresolutions.com@lists.zephyrproject.org>>
writes:

I had this same problem. My solution was to export PYTHONPATH to include
the directory containing this module. If you went through the
instructions,
installing all the dependencies, it is installed on your system
somewhere.
Hmm, that shouldn't be needed if the Python dependencies were installed
correctly.
On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org<http://Lists.Zephyrproject.Org>
<jaeminy.choi=
samsung.com@lists.zephyrproject.org<mailto:samsung.com@lists.zephyrproject.org>> wrote:
Hello.
This is Jaemin from Samsung Electronics and we are trying to set the
environment up for Zephyr with
https://docs.zephyrproject.org/latest/getting_started/index.html.
Everything went well with your manuals but when I try this one
west build -b reel_board samples/hello_world
(in my case west build -b qemu_x86 samples/hello_world )
The error which can't find pykwalify comes up like below.
Based on your screenshot, it looks like you are running on Linux, so you
should have installed west using "pip3 install --user west", which it
looks like you did:
-- Found west: /home/jaeminy.choi/.local/bin/west
If so, then pykwalify should have been installed too, because west
declares it as a dependency to pip:
$ pip3 show west | grep Requires:
Requires: colorama, PyYAML, pykwalify, configobj, setuptools
So as Allen said, if you have west but it can't import pykwalify, there
is a problem with the Python path. But you shouldn't need to set
PYTHONPATH; pip and Python's USER_BASE should take care of this for you.
First, you should check that pykwalify is installed, like this:
$ pip3 show -f pykwalify | grep Location:
Location: /home/foo/.local/lib/python3.6/site-packages
If that doesn't work, reinstall west with pip3 to make sure you get it.
Second, run "python3 -m site". The output should contain the pykwalify
installation directory in sys.path. Something like this:
$ python3 -m site
sys.path = [
'/usr/local/lib/python3.6',
'/usr/lib/python36.zip',
'/usr/lib/python3.6',
'/usr/lib/python3.6/lib-dynload',
'/home/foo/.local/lib/python3.6/site-packages',
'/usr/local/lib/python3.6/dist-packages',
'/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/foo/.local' (exists)
USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
ENABLE_USER_SITE: True
Make sure:
1. USER_SITE is the directory where pykwalify was installed
2. ENABLE_USER_SITE is True
3. sys.path contains the directory where pykwalify was installed
For more details, check:
https://docs.python.org/3/library/site.html#site.USER_BASE
I've googled it to solve the problem but i ended up here.
By the way, for the future, please consider cutting and pasting text
instead of using screenshots of your terminal window as discussed in
https://docs.zephyrproject.org/latest/guides/getting-help.html#use-copy-paste
It makes it easier for others to google your exact error message.
Can I have some advices?
Hope this helps.
Thanks,
Marti
(All programs I should install are beyond minimum version and I skipped
set up a toolchain step because I set up the Zephyr SDK toolchains)
Thanks,
Jaemin
--
*Allen Curtis*
Medical Device Architect
*Critical Software Solutions, LLC*
--
*Allen Curtis*
Medical Device Architect
*Critical Software Solutions, LLC*
--
Allen Curtis
Medical Device Architect
Critical Software Solutions, LLC



*
*


Cancelled Event: Zephyr Project: Dev Meeting - Thursday, 31 October 2019 #cal-cancelled

devel@lists.zephyrproject.org Calendar <devel@...>
 

Cancelled: Zephyr Project: Dev Meeting

This event has been cancelled.

When:
Thursday, 31 October 2019
8:00am to 9:00am
(UTC-07:00) America/Los Angeles

Where:
https://zoom.us/j/993312203

Organizer: devel@...

Description:
Join Zoom Meeting
https://zoom.us/j/993312203

One tap mobile
+16699006833,,993312203# US (San Jose)
+16465588656,,993312203# US (New York)

Dial by your location
        +1 669 900 6833 US (San Jose)
        +1 646 558 8656 US (New York)
        +1 877 369 0926 US Toll-free
        +1 855 880 1246 US Toll-free
Meeting ID: 993 312 203
Find your local number: https://zoom.us/u/ankEMRagf


Upcoming Event: Zephyr Project: APIs - Tue, 10/01/2019 9:00am-10:00am, Please RSVP #cal-reminder

devel@lists.zephyrproject.org Calendar <devel@...>
 

Reminder: Zephyr Project: APIs

When: Tuesday, 1 October 2019, 9:00am to 10:00am, (GMT-07:00) America/Los Angeles

Where:https://zoom.us/j/177647878

An RSVP is requested. Click here to RSVP

Organizer: devel@...

Description: Join from PC, Mac, Linux, iOS or Android: https://zoom.us/j/177647878

Or iPhone one-tap :
    US: +16465588656,,177647878# or +16699006833,,177647878# 
Or Telephone:
    Dial(for higher quality, dial a number based on your current location): 
        US: +1 646 558 8656 or +1 669 900 6833 or +1 855 880 1246 (Toll Free) or +1 877 369 0926 (Toll Free)
    Meeting ID: 177 647 878
    International numbers available: https://zoom.us/zoomconference?m=ioAR9GK1OE5LkN1ojt-heTCl7yPcJrhY


 Live meeting minutes: https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit?usp=sharing


API meeting: agenda

Carles Cufi
 

Hi all,

This week we will look at:

- CAN: Unification of the TX error behavior
- https://github.com/zephyrproject-rtos/zephyr/issues/19502

- GPIO: Update on progress
- https://github.com/zephyrproject-rtos/zephyr/issues/18530

Additionally, if time permits and anyone interested is present:

- Status and concerns related to PR #17155 to change how timeout delays are represented:
https://github.com/zephyrproject-rtos/zephyr/pull/17155

- Sensor API: Update on progress

Additional items in the "Triage" column in the GitHub project may be discussed if time permits.
If you want an item included in the meeting, please add it to the GitHub project.

https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion
https://github.com/zephyrproject-rtos/zephyr/projects/18
https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit

Regards,

Carles


Re: sys_dlist_remove: bus fault with CONFIG_NO_OPTIMIZATIONS

Christopher Friedt
 

Hi Maureen / list,

On Mon., Sep. 30, 2019, 11:31 a.m. Christopher Friedt, <chrisfriedt@...> wrote:
Hi Maureen,

On Mon., Sep. 30, 2019, 11:26 a.m. Maureen Helm, <maureen.helm@...> wrote:

Hi Christopher,

It’s possible that a stack overflowed. Kinetis platforms have a “system MPU” instead of the Arm MPU, and memory access violations trigger a bus fault.

That's interesting, because now that I think about it, I did have to disable the MPU to even get to main(). Good catch!

Do you know if Zephyr has a way to instrument stack usage?

I just thought I would follow up on-list in case anyone else has a similar issue.

So I simply enabled

CONFIG_STACK_CANARIES=y

because ARMv7-M supports gcc's stack canaries, and found that the "tx_workq" thread indeed did have a stack overflow.

Great catch Maureen, and thanks for pointing out that the kinetis MPU is not an actual ARM MPU too. I assumed they were the same originally.

Cheers,

C


Re: sys_dlist_remove: bus fault with CONFIG_NO_OPTIMIZATIONS

Christopher Friedt
 

Hi Maureen,

On Mon., Sep. 30, 2019, 11:26 a.m. Maureen Helm, <maureen.helm@...> wrote:

Hi Christopher,

It’s possible that a stack overflowed. Kinetis platforms have a “system MPU” instead of the Arm MPU, and memory access violations trigger a bus fault.

That's interesting, because now that I think about it, I did have to disable the MPU to even get to main(). Good catch!

Do you know if Zephyr has a way to instrument stack usage?

Cheers,

Chris



Re: sys_dlist_remove: bus fault with CONFIG_NO_OPTIMIZATIONS

Maureen Helm
 

Hi Christopher,

It’s possible that a stack overflowed. Kinetis platforms have a “system MPU” instead of the Arm MPU, and memory access violations trigger a bus fault.

 

Maureen

 

From: devel@... <devel@...> On Behalf Of Christopher Friedt via Lists.Zephyrproject.Org
Sent: Monday, September 30, 2019 7:28 AM
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] sys_dlist_remove: bus fault with CONFIG_NO_OPTIMIZATIONS

 

Hi list,

 

I'm experimenting with Zephyr on the kinetis platform and I am encountering a bus fault while running the "samples/net/sockets/dumb_http_server" example.

 

The bus fault only seems to happen when I have CONFIG_NO_OPTIMIZATIONS=y . And is triggered in sys_dlist_remove().

 

Logs show:

 

initializing network

IPv4 address: xxx.xxx.xxx.xxx

Single-threaded dumb HTTP server waits for a connection on port 8080...

eth_mcux: Enabled 100M full-duplex mode

 

At this point, I can ping the device, but as soon as I run curl or use a browser to open the static page, there is a bus fault (imprecise data bus error)

 

The PC was at sys_dlist_remove and the LR was in sys_dlist_get.

 

I don't have a full stack trace unfortunately because I'm unable to catch this issue with the debugger at present.

 

It's a bit concerning to me that disabling optimizations would result in a bus fault in such a critical path. Potentially related to atomic operations?

 

I haven't yet inspected the sys_dlist*() code yet, but just wanted to probe the list and see if this is a known issue.

 

Any thoughts?

 

 

PS:

 

Maybe some suggestions for the documentation in this sample project:

 

User should add/modify samples/net/sockets/dumb_http_server/prj.conf

 

* CONFIG_NET_CONFIG_MY_IPV4_ADDR

* CONFIG_NET_CONFIG_MY_IPV4_NETMASK

* CONFIG_NET_CONFIG_MY_IPV4_GW


sys_dlist_remove: bus fault with CONFIG_NO_OPTIMIZATIONS

Christopher Friedt
 

Hi list,

I'm experimenting with Zephyr on the kinetis platform and I am encountering a bus fault while running the "samples/net/sockets/dumb_http_server" example.

The bus fault only seems to happen when I have CONFIG_NO_OPTIMIZATIONS=y . And is triggered in sys_dlist_remove().

Logs show:

initializing network
IPv4 address: xxx.xxx.xxx.xxx
Single-threaded dumb HTTP server waits for a connection on port 8080...
eth_mcux: Enabled 100M full-duplex mode

At this point, I can ping the device, but as soon as I run curl or use a browser to open the static page, there is a bus fault (imprecise data bus error)

The PC was at sys_dlist_remove and the LR was in sys_dlist_get.

I don't have a full stack trace unfortunately because I'm unable to catch this issue with the debugger at present.

It's a bit concerning to me that disabling optimizations would result in a bus fault in such a critical path. Potentially related to atomic operations?

I haven't yet inspected the sys_dlist*() code yet, but just wanted to probe the list and see if this is a known issue.

Any thoughts?


PS:

Maybe some suggestions for the documentation in this sample project:

User should add/modify samples/net/sockets/dumb_http_server/prj.conf

* CONFIG_NET_CONFIG_MY_IPV4_ADDR
* CONFIG_NET_CONFIG_MY_IPV4_NETMASK
* CONFIG_NET_CONFIG_MY_IPV4_GW


Cancelled Event: Zephyr Project: Dev Meeting - Thursday, 26 September 2019 #cal-cancelled

devel@lists.zephyrproject.org Calendar <devel@...>
 

Cancelled: Zephyr Project: Dev Meeting

This event has been cancelled.

When:
Thursday, 26 September 2019
8:00am to 9:00am
(UTC-07:00) America/Los Angeles

Where:
https://zoom.us/j/993312203

Organizer: devel@...

Description:
Join Zoom Meeting
https://zoom.us/j/993312203

One tap mobile
+16699006833,,993312203# US (San Jose)
+16465588656,,993312203# US (New York)

Dial by your location
        +1 669 900 6833 US (San Jose)
        +1 646 558 8656 US (New York)
        +1 877 369 0926 US Toll-free
        +1 855 880 1246 US Toll-free
Meeting ID: 993 312 203
Find your local number: https://zoom.us/u/ankEMRagf


Re: Need help in establishing client-server socket communication between my Ubuntu PC and PCA10056 board, on which Zephyr is running. #nrf52840 #samples

giriprasad@...
 

Thanks Marc,

I have verified that and it is fine. As mentioned in the previous mails, I am suspecting on the changes that I have made in the file "zephyr/subsys/net/l2/ethernet/ethernet.c". Although, I am not supposed to make changes in that file, I made them for my testing purpose and ping is working only with those changes. Apart from the changes I have mentioned, I haven't done any other changes to the lower layers of Zephyr. I have just done few configurations in the application layer. I am not sure, why enc28j60 is not working directly with Zephyr. Please help me in this regards. Please let me know if more information is needed.

Regards,
Giri


Re: Need help in establishing client-server socket communication between my Ubuntu PC and PCA10056 board, on which Zephyr is running. #nrf52840 #samples

Jukka Rissanen
 

Hi Giri,

can you create an issue in github for this. Trying to resolve your issue in mailing list is not very effective.

Cheers,
Jukka


On Thu, 2019-09-26 at 02:19 -0700, giriprasad@... wrote:
But, without those changes, if I am trying to ping the board on which Zephyr is running, it is not responding to ping requests and wireshark capture in this scenario can be found in the attached file. I am unable to figure out where the mistake is happening. I have been trying in different ways but in vain. Is there any suggestions or check points to resolve this issue. Please help...

Thanks & Regards,
Giri Prasad N.
_._,_._,_


Re: Need help in establishing client-server socket communication between my Ubuntu PC and PCA10056 board, on which Zephyr is running. #nrf52840 #samples

giriprasad@...
 

But, without those changes, if I am trying to ping the board on which Zephyr is running, it is not responding to ping requests and wireshark capture in this scenario can be found in the attached file. I am unable to figure out where the mistake is happening. I have been trying in different ways but in vain. Is there any suggestions or check points to resolve this issue. Please help...

Thanks & Regards,
Giri Prasad N.


Re: Need help in establishing client-server socket communication between my Ubuntu PC and PCA10056 board, on which Zephyr is running. #nrf52840 #samples

Marc Herbert
 

On 24 Sep 2019, at 02:20, giriprasad@semiconsoul.com wrote:

Thanks for the reply. I have verified the ufw status and it is inactive. Is it enough to say that firewall is disabled.
It should but might not be enough because ufw is just a user interface. Use "ip[6]tables -L" to verify the actual state.


Re: Need help in establishing client-server socket communication between my Ubuntu PC and PCA10056 board, on which Zephyr is running. #nrf52840 #samples

Jukka Rissanen
 

The changes that you do there basically turn off ARP, the end result is that the IPv4 connectivity cannot work properly after this.

Cheers,
Jukka


On Wed, 2019-09-25 at 04:15 -0700, giriprasad@... wrote:
Hi Jukka,

"net iface" is returning a valid mac address. But for my Ethernet to work, I have tweaked Zephyr code. I have posted about it in another topic of this mailing list. Please follow this link https://lists.zephyrproject.org/g/devel/message/6325
Please let me understand the problem I am facing, as mentioned in the above link. I am suspecting that, this is causing the issue. Please help me in this regards.

Thanks & regards,
Giri.


Re: Need help in establishing client-server socket communication between my Ubuntu PC and PCA10056 board, on which Zephyr is running. #nrf52840 #samples

giriprasad@...
 

Hi Jukka,

"net iface" is returning a valid mac address. But for my Ethernet to work, I have tweaked Zephyr code. I have posted about it in another topic of this mailing list. Please follow this link https://lists.zephyrproject.org/g/devel/message/6325
Please let me understand the problem I am facing, as mentioned in the above link. I am suspecting that, this is causing the issue. Please help me in this regards.

Thanks & regards,
Giri.

1561 - 1580 of 7903