Date   

Re: flashing tinytile

Dharmappa, Savinay <savinay.dharmappa@...>
 

Hi Tamra,

Flash sample/synchronization/ application you will be able to see the prints. Flashing via dfu-util for tinytile works fine. After flashing "hello world" sample application ,a reset is required which is disconnecting /dev/ttyACM0 not sure
Why it is happening.

Regards
savinay

-----Original Message-----
From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...] On Behalf Of zephyr-devel-request@...
Sent: Thursday, September 21, 2017 3:35 PM
To: zephyr-devel@...
Subject: Zephyr-devel Digest, Vol 9, Issue 41

Send Zephyr-devel mailing list submissions to
zephyr-devel@...

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel
or, via email, send a message with subject or body 'help' to
zephyr-devel-request@...

You can reach the person managing the list at
zephyr-devel-owner@...

When replying, please edit your Subject line so it is more specific than "Re: Contents of Zephyr-devel digest..."


Today's Topics:

1. Is it possible to have two processes communicate in ARM Qemu?
(Hui Yie Teh)
2. Re: Is it possible to have two processes communicate in ARM
Qemu? (Andrei Emeltchenko)
3. Re: flash tinytile (Buriez, Patrice)


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

Message: 1
Date: Thu, 21 Sep 2017 21:16:21 +1200
From: Hui Yie Teh <hteh703@...>
To: zephyr-devel@...
Subject: [Zephyr-devel] Is it possible to have two processes
communicate in ARM Qemu?
Message-ID:
<CAPLZ2xMBUo66S92EUQWOQGA1Bj7NhfUSVO9ynoWtKwUCZKwwbg@...>
Content-Type: text/plain; charset="utf-8"

Hi,

Is there an inter-process communication functionality on Zephyr running on Linux for Qemu?

I have an application on Zephyr that gets data from an external source.
However, since I do not have the actual device, I will be emulating this on Qemu. So I will have 2 applications, one solely for generating the output.

However, how can these two applications communicate? I know this can be done in C using named pipes. Is it possible to do that with Zephyr as well?

Any help would be much appreciated. Thanks.

Cheers,
Yie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zephyrproject.org/pipermail/zephyr-devel/attachments/20170921/ab9c3e62/attachment-0001.html>

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

Message: 2
Date: Thu, 21 Sep 2017 12:54:05 +0300
From: Andrei Emeltchenko <andrei.emeltchenko.news@...>
To: Hui Yie Teh <hteh703@...>
Cc: zephyr-devel@...
Subject: Re: [Zephyr-devel] Is it possible to have two processes
communicate in ARM Qemu?
Message-ID: <20170921095403.gbbhmcsbzxk6upgc@...>
Content-Type: text/plain; charset=iso-8859-1

Hi,

On Thu, Sep 21, 2017 at 09:16:21PM +1200, Hui Yie Teh wrote:
Hi,

Is there an inter-process communication functionality on Zephyr running on
Linux for Qemu??
I have an application on Zephyr that gets data from an external source.
However, since I do not have the actual device, I will be emulating this
on Qemu. So I will have 2 applications, one solely for generating the
output.?
However, how can these two applications communicate? I know this can be
done in C using named pipes. Is it possible to do that with Zephyr as
well?
We use QEMU_EXTRA_FLAGS for providing this parameter for QEMU, for example in bluetooth we may run btproxy on Linux host and QEMU_EXTRA_FLAGS like following:

QEMU_EXTRA_FLAGS = -serial unix:/tmp/bt-server-bredr

Best regards
Andrei Emeltchenko


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

Message: 3
Date: Thu, 21 Sep 2017 10:04:46 +0000
From: "Buriez, Patrice" <patrice.buriez@...>
To: Tamra Oyama <tamrako@...>,
"zephyr-devel@..."
<zephyr-devel@...>
Subject: Re: [Zephyr-devel] flash tinytile
Message-ID:
<8BBE948C60307D47AD16B5B5B92A387E96922654@...>

Content-Type: text/plain; charset="utf-8"

Hi Tamra,

I don?t have a tinytile at hand, but you might want to try the following command:
ZEPHYR_FLASH_OVER_DFU=y make BOARD=tinytile flash

You will find more information about make-assisted dfu-util method at: https://www.zephyrproject.org/doc/boards/x86/arduino_101/doc/board.html#flashing

Regards,
Patrice

From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...] On Behalf Of Tamra Oyama
Sent: Thursday, September 21, 2017 9:09 AM
To: zephyr-devel@...
Subject: [Zephyr-devel] flash tinytile

Hello all,

I am trying to flash my tinytile. When I use the commands make BOARD=tinytile flash or make flash or the dfu-util command, I get the errors below. Tinytile does not have a jtag connection and it seems like it's looking for a jtag connection. I want to flash using the dfu-util command. I was able to do this with my arduino_101. I am trying to use the same command, dfu-util -a x86_app -D outdir/tinytile/zephyr.bin. This part is successful. However, when I open minicom, minicom freezes and it appears the code is not being executed. Since I can't see anything in minicom, I am not sure how to debug this issue or what's really going on. Any ideas? It would be super great if someone could point us in the right direction. Thank you for your time!

tamrako@tamrako-Inspiron-13-7378:~/CODK/zephyr/samples/bluetooth/beacon$ make BOARD=tinytile
make[1]: Entering directory '/home/tamrako/CODK/zephyr'
make[2]: Entering directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/tinytile'
CHK include/generated/generated_dts_board.conf
Using /home/tamrako/CODK/zephyr as source for kernel
GEN ./Makefile
CHK include/generated/version.h
CHK include/generated/generated_dts_board.h
CHK misc/generated/configs.c
CHK include/generated/offsets.h
make[2]: Leaving directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/tinytile'
make[1]: Leaving directory '/home/tamrako/CODK/zephyr'
tamrako@tamrako-Inspiron-13-7378:~/CODK/zephyr/samples/bluetooth/beacon$ make flash
Using /home/tamrako/CODK/zephyr/boards/x86/qemu_x86/qemu_x86_defconfig as base
Merging /home/tamrako/CODK/zephyr/kernel/configs/kernel.config
Merging prj.conf
#
# configuration written to .config
#
make[1]: Entering directory '/home/tamrako/CODK/zephyr'
make[2]: Entering directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/qemu_x86'
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/generated/generated_dts_board.conf
UPD include/generated/generated_dts_board.conf
CHK include/generated/generated_dts_board.conf
Flashing not supported with this board.
Please check the documentation for alternate instructions.
make[2]: Leaving directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/qemu_x86'
make[1]: Leaving directory '/home/tamrako/CODK/zephyr'

tamrako@tamrako-Inspiron-13-7378:~/CODK/zephyr/samples/bluetooth/beacon$ make BOARD=tinytile flash
make[1]: Entering directory '/home/tamrako/CODK/zephyr'
make[2]: Entering directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/tinytile'
CHK include/generated/generated_dts_board.conf
Using /home/tamrako/CODK/zephyr as source for kernel
GEN ./Makefile
CHK include/generated/version.h
CHK include/generated/generated_dts_board.h
CHK misc/generated/configs.c
CHK include/generated/offsets.h
Flashing tinytile
Flashing Target Device
Open On-Chip Debugger 0.9.0-dirty (2017-05-16-18:46)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
adapter speed: 1000 kHz
trst_only separate trst_push_pull
jtag_ntrst_delay: 300
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description 'Flyswatter2' and serial '*'

/home/tamrako/CODK/zephyr/Makefile:1330: recipe for target 'flash' failed
make[2]: *** [flash] Error 1
make[2]: Leaving directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/tinytile'
Makefile:178: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/tamrako/CODK/zephyr'
/home/tamrako/CODK/zephyr/Makefile.inc:88: recipe for target 'flash' failed
make: *** [flash] Error 2

Sincerely,
Tamra
Intel Corporation NV/SA
Kings Square, Veldkant 31
2550 Kontich
RPM (Bruxelles) 0415.497.718.
Citibank, Brussels, account 570/1031255/09

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zephyrproject.org/pipermail/zephyr-devel/attachments/20170921/361149ab/attachment.html>

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

_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@...
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel


End of Zephyr-devel Digest, Vol 9, Issue 41
*******************************************


Re: flash tinytile

Patrice Buriez
 

Hi Tamra,

 

I don’t have a tinytile at hand, but you might want to try the following command:

ZEPHYR_FLASH_OVER_DFU=y make BOARD=tinytile flash

 

You will find more information about make-assisted dfu-util method at: https://www.zephyrproject.org/doc/boards/x86/arduino_101/doc/board.html#flashing

 

Regards,

Patrice

 

From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...] On Behalf Of Tamra Oyama
Sent: Thursday, September 21, 2017 9:09 AM
To: zephyr-devel@...
Subject: [Zephyr-devel] flash tinytile

 

Hello all,

 

I am trying to flash my tinytile. When I use the commands make BOARD=tinytile flash or make flash or the dfu-util command, I get the errors below. Tinytile does not have a jtag connection and it seems like it's looking for a jtag connection. I want to flash using the dfu-util command. I was able to do this with my arduino_101. I am trying to use the same command, dfu-util -a x86_app -D outdir/tinytile/zephyr.bin. This part is successful. However, when I open minicom, minicom freezes and it appears the code is not being executed. Since I can't see anything in minicom, I am not sure how to debug this issue or what's really going on. Any ideas? It would be super great if someone could point us in the right direction. Thank you for your time!

 

tamrako@tamrako-Inspiron-13-7378:~/CODK/zephyr/samples/bluetooth/beacon$ make BOARD=tinytile

make[1]: Entering directory '/home/tamrako/CODK/zephyr'

make[2]: Entering directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/tinytile'

  CHK     include/generated/generated_dts_board.conf

  Using /home/tamrako/CODK/zephyr as source for kernel

  GEN     ./Makefile

  CHK     include/generated/version.h

  CHK     include/generated/generated_dts_board.h

  CHK     misc/generated/configs.c

  CHK     include/generated/offsets.h

make[2]: Leaving directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/tinytile'

make[1]: Leaving directory '/home/tamrako/CODK/zephyr'

tamrako@tamrako-Inspiron-13-7378:~/CODK/zephyr/samples/bluetooth/beacon$ make flash

Using /home/tamrako/CODK/zephyr/boards/x86/qemu_x86/qemu_x86_defconfig as base

Merging /home/tamrako/CODK/zephyr/kernel/configs/kernel.config

Merging prj.conf

#

# configuration written to .config

#

make[1]: Entering directory '/home/tamrako/CODK/zephyr'

make[2]: Entering directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/qemu_x86'

  GEN     ./Makefile

scripts/kconfig/conf --silentoldconfig Kconfig

  CHK     include/generated/generated_dts_board.conf

  UPD     include/generated/generated_dts_board.conf

  CHK     include/generated/generated_dts_board.conf

Flashing not supported with this board.

Please check the documentation for alternate instructions.

make[2]: Leaving directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/qemu_x86'

make[1]: Leaving directory '/home/tamrako/CODK/zephyr'

 

tamrako@tamrako-Inspiron-13-7378:~/CODK/zephyr/samples/bluetooth/beacon$ make BOARD=tinytile flash

make[1]: Entering directory '/home/tamrako/CODK/zephyr'

make[2]: Entering directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/tinytile'

  CHK     include/generated/generated_dts_board.conf

  Using /home/tamrako/CODK/zephyr as source for kernel

  GEN     ./Makefile

  CHK     include/generated/version.h

  CHK     include/generated/generated_dts_board.h

  CHK     misc/generated/configs.c

  CHK     include/generated/offsets.h

Flashing tinytile

Flashing Target Device

Open On-Chip Debugger 0.9.0-dirty (2017-05-16-18:46)

Licensed under GNU GPL v2

For bug reports, read

Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.

adapter speed: 1000 kHz

trst_only separate trst_push_pull

jtag_ntrst_delay: 300

Error: no device found

Error: unable to open ftdi device with vid 0403, pid 6010, description 'Flyswatter2' and serial '*'

 

/home/tamrako/CODK/zephyr/Makefile:1330: recipe for target 'flash' failed

make[2]: *** [flash] Error 1

make[2]: Leaving directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/tinytile'

Makefile:178: recipe for target 'sub-make' failed

make[1]: *** [sub-make] Error 2

make[1]: Leaving directory '/home/tamrako/CODK/zephyr'

/home/tamrako/CODK/zephyr/Makefile.inc:88: recipe for target 'flash' failed

make: *** [flash] Error 2

 

Sincerely,

Tamra

Intel Corporation NV/SA
Kings Square, Veldkant 31
2550 Kontich
RPM (Bruxelles) 0415.497.718.
Citibank, Brussels, account 570/1031255/09

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.


Re: Is it possible to have two processes communicate in ARM Qemu?

Andrei
 

Hi,

On Thu, Sep 21, 2017 at 09:16:21PM +1200, Hui Yie Teh wrote:
Hi,

Is there an inter-process communication functionality on Zephyr running on
Linux for Qemu? 
I have an application on Zephyr that gets data from an external source.
However, since I do not have the actual device, I will be emulating this
on Qemu. So I will have 2 applications, one solely for generating the
output. 
However, how can these two applications communicate? I know this can be
done in C using named pipes. Is it possible to do that with Zephyr as
well?
We use QEMU_EXTRA_FLAGS for providing this parameter for QEMU, for
example in bluetooth we may run btproxy on Linux host and
QEMU_EXTRA_FLAGS like following:

QEMU_EXTRA_FLAGS = -serial unix:/tmp/bt-server-bredr

Best regards
Andrei Emeltchenko


Is it possible to have two processes communicate in ARM Qemu?

Yie
 

Hi,

Is there an inter-process communication functionality on Zephyr running on Linux for Qemu? 

I have an application on Zephyr that gets data from an external source. However, since I do not have the actual device, I will be emulating this on Qemu. So I will have 2 applications, one solely for generating the output. 

However, how can these two applications communicate? I know this can be done in C using named pipes. Is it possible to do that with Zephyr as well?

Any help would be much appreciated. Thanks.

Cheers,
Yie


flash tinytile

Tamra Oyama <tamrako@...>
 

Hello all,

I am trying to flash my tinytile. When I use the commands make BOARD=tinytile flash or make flash or the dfu-util command, I get the errors below. Tinytile does not have a jtag connection and it seems like it's looking for a jtag connection. I want to flash using the dfu-util command. I was able to do this with my arduino_101. I am trying to use the same command, dfu-util -a x86_app -D outdir/tinytile/zephyr.bin. This part is successful. However, when I open minicom, minicom freezes and it appears the code is not being executed. Since I can't see anything in minicom, I am not sure how to debug this issue or what's really going on. Any ideas? It would be super great if someone could point us in the right direction. Thank you for your time!

tamrako@tamrako-Inspiron-13-7378:~/CODK/zephyr/samples/bluetooth/beacon$ make BOARD=tinytile
make[1]: Entering directory '/home/tamrako/CODK/zephyr'
make[2]: Entering directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/tinytile'
  CHK     include/generated/generated_dts_board.conf
  Using /home/tamrako/CODK/zephyr as source for kernel
  GEN     ./Makefile
  CHK     include/generated/version.h
  CHK     include/generated/generated_dts_board.h
  CHK     misc/generated/configs.c
  CHK     include/generated/offsets.h
make[2]: Leaving directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/tinytile'
make[1]: Leaving directory '/home/tamrako/CODK/zephyr'
tamrako@tamrako-Inspiron-13-7378:~/CODK/zephyr/samples/bluetooth/beacon$ make flash
Using /home/tamrako/CODK/zephyr/boards/x86/qemu_x86/qemu_x86_defconfig as base
Merging /home/tamrako/CODK/zephyr/kernel/configs/kernel.config
Merging prj.conf
#
# configuration written to .config
#
make[1]: Entering directory '/home/tamrako/CODK/zephyr'
make[2]: Entering directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/qemu_x86'
  GEN     ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/generated/generated_dts_board.conf
  UPD     include/generated/generated_dts_board.conf
  CHK     include/generated/generated_dts_board.conf
Flashing not supported with this board.
Please check the documentation for alternate instructions.
make[2]: Leaving directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/qemu_x86'
make[1]: Leaving directory '/home/tamrako/CODK/zephyr'

tamrako@tamrako-Inspiron-13-7378:~/CODK/zephyr/samples/bluetooth/beacon$ make BOARD=tinytile flash
make[1]: Entering directory '/home/tamrako/CODK/zephyr'
make[2]: Entering directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/tinytile'
  CHK     include/generated/generated_dts_board.conf
  Using /home/tamrako/CODK/zephyr as source for kernel
  GEN     ./Makefile
  CHK     include/generated/version.h
  CHK     include/generated/generated_dts_board.h
  CHK     misc/generated/configs.c
  CHK     include/generated/offsets.h
Flashing tinytile
Flashing Target Device
Open On-Chip Debugger 0.9.0-dirty (2017-05-16-18:46)
Licensed under GNU GPL v2
For bug reports, read
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
adapter speed: 1000 kHz
trst_only separate trst_push_pull
jtag_ntrst_delay: 300
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description 'Flyswatter2' and serial '*'

/home/tamrako/CODK/zephyr/Makefile:1330: recipe for target 'flash' failed
make[2]: *** [flash] Error 1
make[2]: Leaving directory '/home/tamrako/CODK/zephyr/samples/bluetooth/beacon/outdir/tinytile'
Makefile:178: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/tamrako/CODK/zephyr'
/home/tamrako/CODK/zephyr/Makefile.inc:88: recipe for target 'flash' failed
make: *** [flash] Error 2

Sincerely,
Tamra


Re: How to reduce footprint and size of applications in Zephyr

Yie
 

I see. That makes a lot of sense. Thank you Maciek! 

I have another question, if you dont mind. 

I have an app that's taking about ~5MB of RAM and ~5.6MB of ROM judging from the 'ram_report' and 'rom_report'. Is there a way to reduce the size of those? It is much bigger because I've included other functionalities such as multi-threading and networking. Do I remove functionalities I don't need using 'make menuconfig'?

Cheers,
Yie

On 21 September 2017 at 18:28, Maciek Borzecki <maciek.borzecki@...> wrote:
On Thu, Sep 21, 2017 at 7:57 AM, Hui Yie Teh <hteh703@...> wrote:
>
> Hi Thiago,
>
> Thank you so much for the reply. I am running Zephyr on Linux and building the hello_world app on ARM using qemu_cortex_m3.
>
> I've got the numbers from the following:
>
> The 8MB of memory is measured using the system monitor
>
>
> The 3.8MB is seen by clicking properties of the folder created after building the hello_world app. I am assuming that the folder in ../outdir/BOARD will be the folder that is going to be installed on the board itself. Am I understanding this correctly?
>
>
> I'm not sure if those are the right numbers to get, sorry if this is a stupid question.
>
>
> Also, may I know what these numbers from' make ram_report' and 'make rom_report' mean?
>
> ram_report
>
>
> rom_report
>
> Any help would be really appreciated. Thanks!


qemu-system-arm is just a VM that can emulate, among others, Cortex-M
MCUs. `qemu_cortext_m3` board is in fact emulated by qemu. Memory
usage of a running Qemu process does not directly (or otherwise
easily) translate to the memory usage in the target system.

Haven't looked at the reports for some time, but `ram_report` is
likely a listing statically allocated data that would normally be
copied into RAM during system initialization. `rom_report` likely
lists the size of each symbol (i.e. non-inlined function in the code).
So, you're more realistically looking at ~4kB of RAM and ~7kB of
flash.

>
> Cheers,
> Yie
>
>
>
>
> On 21 September 2017 at 06:15, Thiago Silveira <thiago@...> wrote:
>>
>> Hi Yie,
>>
>> That definitely isn't right. In which environment are you running Zephyr, and how are you measuring this?
>>
>> Try 'make rom_report' and 'make ram_report' to get a nice report of how much each function is consuming.
>>
>> Best regards,
>> Thiago
>>
>>
>>
>> 2017-09-20 13:00 GMT-03:00 Hui Yie Teh <hteh703@...>:
>>>
>>> Hi,
>>>
>>> I read that Zephyr allows small footprint of a few KBs. However, the sample hello world application already takes up 8MB of memory and has a size of 3.8MB. I am not sure if I am running this right.
>>>
>>> I would appreciate if I can get any help on this or someone to point me at the right direction.
>>>
>>> Cheers,
>>> Yie
>>>
>>> _______________________________________________
>>> Zephyr-devel mailing list
>>> Zephyr-devel@lists.zephyrproject.org
>>> https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel
>>>
>>
>
>
> _______________________________________________
> Zephyr-devel mailing list
> Zephyr-devel@lists.zephyrproject.org
> https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel
>



--
Maciek Borzecki


Re: How to reduce footprint and size of applications in Zephyr

Maciek Borzecki <maciek.borzecki@...>
 

On Thu, Sep 21, 2017 at 7:57 AM, Hui Yie Teh <hteh703@...> wrote:

Hi Thiago,

Thank you so much for the reply. I am running Zephyr on Linux and building the hello_world app on ARM using qemu_cortex_m3.

I've got the numbers from the following:

The 8MB of memory is measured using the system monitor


The 3.8MB is seen by clicking properties of the folder created after building the hello_world app. I am assuming that the folder in ../outdir/BOARD will be the folder that is going to be installed on the board itself. Am I understanding this correctly?


I'm not sure if those are the right numbers to get, sorry if this is a stupid question.


Also, may I know what these numbers from' make ram_report' and 'make rom_report' mean?

ram_report


rom_report

Any help would be really appreciated. Thanks!

qemu-system-arm is just a VM that can emulate, among others, Cortex-M
MCUs. `qemu_cortext_m3` board is in fact emulated by qemu. Memory
usage of a running Qemu process does not directly (or otherwise
easily) translate to the memory usage in the target system.

Haven't looked at the reports for some time, but `ram_report` is
likely a listing statically allocated data that would normally be
copied into RAM during system initialization. `rom_report` likely
lists the size of each symbol (i.e. non-inlined function in the code).
So, you're more realistically looking at ~4kB of RAM and ~7kB of
flash.


Cheers,
Yie




On 21 September 2017 at 06:15, Thiago Silveira <thiago@...> wrote:

Hi Yie,

That definitely isn't right. In which environment are you running Zephyr, and how are you measuring this?

Try 'make rom_report' and 'make ram_report' to get a nice report of how much each function is consuming.

Best regards,
Thiago



2017-09-20 13:00 GMT-03:00 Hui Yie Teh <hteh703@...>:

Hi,

I read that Zephyr allows small footprint of a few KBs. However, the sample hello world application already takes up 8MB of memory and has a size of 3.8MB. I am not sure if I am running this right.

I would appreciate if I can get any help on this or someone to point me at the right direction.

Cheers,
Yie

_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@...
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel

_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@...
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel


--
Maciek Borzecki


Re: How to reduce footprint and size of applications in Zephyr

Yie
 

Hi Thiago,

Thank you so much for the reply. I am running Zephyr on Linux and building the hello_world app on ARM using qemu_cortex_m3. 

I've got the numbers from the following:
  • The 8MB of memory is measured using the system monitor

    Inline images 2
  • The 3.8MB is seen by clicking properties of the folder created after building the hello_world app. I am assuming that the folder in ../outdir/BOARD will be the folder that is going to be installed on the board itself. Am I understanding this correctly? 

    Inline images 3
I'm not sure if those are the right numbers to get, sorry if this is a stupid question. 


Also, may I know what these numbers from' make ram_report' and 'make rom_report' mean? 
  • ram_report

    Inline images 8
  • rom_report
    Inline images 9
Any help would be really appreciated. Thanks!

Cheers,
Yie




On 21 September 2017 at 06:15, Thiago Silveira <thiago@...> wrote:
Hi Yie,

That definitely isn't right. In which environment are you running Zephyr, and how are you measuring this?

Try 'make rom_report' and 'make ram_report' to get a nice report of how much each function is consuming.

Best regards,
Thiago



2017-09-20 13:00 GMT-03:00 Hui Yie Teh <hteh703@...>:
Hi,

I read that Zephyr allows small footprint of a few KBs. However, the sample hello world application already takes up 8MB of memory and has a size of 3.8MB. I am not sure if I am running this right.

I would appreciate if I can get any help on this or someone to point me at the right direction.

Cheers,
Yie

_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@...ct.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel




Re: How to reduce footprint and size of applications in Zephyr

Thiago Silveira
 

Hi Yie,

That definitely isn't right. In which environment are you running Zephyr, and how are you measuring this?

Try 'make rom_report' and 'make ram_report' to get a nice report of how much each function is consuming.

Best regards,
Thiago



2017-09-20 13:00 GMT-03:00 Hui Yie Teh <hteh703@...>:

Hi,

I read that Zephyr allows small footprint of a few KBs. However, the sample hello world application already takes up 8MB of memory and has a size of 3.8MB. I am not sure if I am running this right.

I would appreciate if I can get any help on this or someone to point me at the right direction.

Cheers,
Yie

_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel



Re: RFC: Stopping Zephyr networking from being painful by enabling error logging by default

Paul Sokolovsky
 

Hello David,

I appreciate the detailed response, with many points coinciding with
what I wrote previously. And my hypothesis that many of these points
would apply not just to "hobbyist" usage, but also to "company" or
"commercial" users. Because we truly live in "Arduino" world, and
by now there're enough cross-pollination between different areas,
and that's how "IoT" is different from the ol' good "embedded".

Anyway, I guess the background should be set well enough by now, many
people agree that logging/error reporting in Zephyr can be improved.
I'm now diving into the technical side, with few initial patches having
been already merged, and further ideas how to proceed, to be tested.

Thanks,
Paul


On Fri, 15 Sep 2017 11:31:31 -0500
david zuhn <zoo@...> wrote:


I don't think discussion in this direction would be productive.
Because I too don't like choices made for me, and don't appreciate
someone thinking that code size if more important than error
reporting, and making me spend hours again and again debugging
whole range of issues, from trivial to complex.
This is an incredibly astute comment.

I am coming to the RTOS world from years of Unix & Linux development,
with a recent foray into the Arduino world, which has led me to
slightly larger systems which end up in the RTOS space. I do not
consider myself an experienced RTOS developer, but I am an
experienced developer who is now trying to look into other systems.
Issues like code size or power consumption are not my primary concern
right now. I *am* very concerned with getting things running,
achieving basic functionality.

As I get things running, then I might become concerned with trying to
optimize the configuration. As a hobbyist, I'm buying boards that are
way overpowered and overfeatured. But I'm buying 1 or 2, not 10,000
at a time. I don't need to try hard to fit into the 32K RAM
component instead of the 64K piece because the $1.93 price
differential is 20% of my profit margin. I'm just trying to make
something work.

As such, I have expectations that capabilities that are touted as
features of a product should be relatively easy to understand out of
the box. Documentation is critical. Examples are great. I don't
believe that providing sparse comments in Kconfig files constitutes
good documentation. Having to fully understand the multitude of
config options and how they interact in order to get basic
functionality (like an IP stack) working seems newcomer-hostile.
Yup, maybe the extra 6K of code size matters to the large-scale
production oriented user. But not out of the box to the hobbyist.
Right now, I've got a part with 512K of flash.

I do understand that the microcontroller universe is a complex space,
and it's not the same as Unix. But if you have to already be an
expert in working in the microcontroller space to work in the
microcontroller space, there's a chicken and egg problem. Right now
it seems like one has to be completely knowledgeable about the
microcontroller itself, all of Zephyr, *and* the Linux kernel config
system in order to work with Zephyr. That's a tall order.


*Afterwards* someone can debug their stuff, and optimize code size
by disabling logging.

Once someone has been able to develop something worthwhile, they will
have also picked up on the skills needed to consider the steps needed
for optimization. But if I can't even get my basic functionality
working, I'll never even consider using Zephyr. Something else out
there will have been able to meet my hobbyist needs.

I'm seeing now the layers of abstraction that the Arduino developers
put into play, keeping me from having to worry about quite a number
of things. Some of those things are now issues that I need to address
because I've hit the limits of the abstraction. But to step into a
project and codebase that is focused on tiniest-device-production and
not user entry is problematic. It doesn't have to be one XOR the
other. And being able to tweak my system to achieve the
tiniest-device capabilities is a good thing. But in my experience, I
found Zephyr to be hard to achieve basic capabilities. I'm finding
it easier to achieve those capabilities in other freely available
RTOS packages.

david zuhn
zoo @ statebeltrailway.org


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


How to reduce footprint and size of applications in Zephyr

Yie
 

Hi,

I read that Zephyr allows small footprint of a few KBs. However, the sample hello world application already takes up 8MB of memory and has a size of 3.8MB. I am not sure if I am running this right.

I would appreciate if I can get any help on this or someone to point me at the right direction.

Cheers,
Yie


HTTP Request Timeout Not Working

Yie
 

Hi,

I am currently running a HTTP client in QEMU_cortex_m3 and I was trying to set the timeout for the http_client_send_req(..) function and it doesn't seem to work.

It still does not return immediately even after I've set the timeout to 0.

Can I get any help on this?

Cheers.


Zephyr SDK issue tracking moved to github

Nashif, Anas
 

Hi,

As part of the migration to Github Issues, we moved the SDK Jira project and made the Jira project  read-only. All new SDK issues should be reported to

 

https://github.com/zephyrproject-rtos/meta-zephyr-sdk/issues

 

During the week we will migrate the ZEP project and will make JIRA read-only and keep it running for some time. Please take a look at the above and lets us know if you have any comments on how the JIRA tickets were migrated.

 

Thanks,

Anas

 


Re: RFC: Stopping Zephyr networking from being painful by enabling error logging by default

Boie, Andrew P
 

Re (1): in this spirit, I would also enable CONFIG_ASSERT by default...
I definitely think it makes sense to do this by default for our QEMU based targets, since they have lots of ram and we don't gather performance metrics for emulated targets.

Andrew


Re: RFC: Stopping Zephyr networking from being painful by enabling error logging by default

Nashif, Anas
 

Re (1): in this spirit, I would also enable CONFIG_ASSERT by default...
Re (4): SYS_LOG itself is not the issue, it is the layers added on top of it to enable logging in subsystems such as the IP stack which is confusing to say the least and has been discussed in this thread. We will have situations where we do want to using printk and family to print out kernel level exceptions and oopses, even if the logging was disabled for whatever reason, although the SYS_LOG could be optimized to handle such cases as well, we do have logger hooks that can for example write to a file system instead of the console in production systems, so depending on printk for all messages (and assuming console is always connected) is already not ideal.

This goes beyond the original thread topic and is probably worth a bug/enhancement request to be tracked.

Anas

-----Original Message-----
From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...] On Behalf Of Boie, Andrew P
Sent: Friday, September 15, 2017 1:52 PM
To: Paul Sokolovsky <paul.sokolovsky@...>; Luiz Augusto von Dentz <luiz.dentz@...>
Cc: zephyr-devel@...
Subject: Re: [Zephyr-devel] RFC: Stopping Zephyr networking from being painful by enabling error logging by default

My views on this topic:

1) Right now we have very inconsistent error/debug logging. In lots of places in the kernel, when a bad situation is encountered the problem is simply reported with a printk(). In other places we are using SYS_LOG_*. The default experience for the user is that all the SYS_LOG messages are suppressed, but the printks are emitted. This is not an ideal default configuration, in fact words like "horrible" and "baffling" come to mind when considering it.

2) I still think that SYS_LOG should be turned on by default for error and warning situations, just like printk() is on by default.

3) If people are concerned about code size, there should be some kind of global flag which suppresses all debug output, including printk(). In the future, for very RAM constrained devices we could implement a backend to SYS_LOG which uses tricks like storing format strings completely outside the binary, in an external file used to decode raw log data, stuff like that.

4) The way SYS_LOG_* is configured in Kconfig is currently a confusing disaster and I look forward to seeing what Paul comes up with to clean it up. I think the difficulty in using this mechanism is at least partly why large parts of the kernel do not use it and just do printks instead.

5) We may consider making printk() a thin wrapper for a particular level of SYS_LOG().

Andrew
_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@...
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel


Re: RFC: Stopping Zephyr networking from being painful by enabling error logging by default

Boie, Andrew P
 

My views on this topic:

1) Right now we have very inconsistent error/debug logging. In lots of places in the kernel, when a bad situation is encountered the problem is simply reported with a printk(). In other places we are using SYS_LOG_*. The default experience for the user is that all the SYS_LOG messages are suppressed, but the printks are emitted. This is not an ideal default configuration, in fact words like "horrible" and "baffling" come to mind when considering it.

2) I still think that SYS_LOG should be turned on by default for error and warning situations, just like printk() is on by default.

3) If people are concerned about code size, there should be some kind of global flag which suppresses all debug output, including printk(). In the future, for very RAM constrained devices we could implement a backend to SYS_LOG which uses tricks like storing format strings completely outside the binary, in an external file used to decode raw log data, stuff like that.

4) The way SYS_LOG_* is configured in Kconfig is currently a confusing disaster and I look forward to seeing what Paul comes up with to clean it up. I think the difficulty in using this mechanism is at least partly why large parts of the kernel do not use it and just do printks instead.

5) We may consider making printk() a thin wrapper for a particular level of SYS_LOG().

Andrew


Re: RFC: Stopping Zephyr networking from being painful by enabling error logging by default

david zuhn
 

I don't think discussion in this direction would be productive. Because
I too don't like choices made for me, and don't appreciate someone
thinking that code size if more important than error reporting, and
making me spend hours again and again debugging whole range of issues,
from trivial to complex.

This is an incredibly astute comment. 

I am coming to the RTOS world from years of Unix & Linux development, with a recent foray into the Arduino world, which has led me to slightly larger systems which end up in the RTOS space.   I do not consider myself an experienced RTOS developer, but I am an experienced developer who is now trying to look into other systems.   Issues like code size or power consumption are not my primary concern right now.  I *am* very concerned with getting things running, achieving basic functionality.  

As I get things running, then I might become concerned with trying to optimize the configuration. As a hobbyist, I'm buying boards that are way overpowered and overfeatured.   But I'm buying 1 or 2, not 10,000 at a time.   I don't need to try hard to fit into the 32K RAM component instead of the 64K piece because the $1.93 price differential is 20% of my profit margin.   I'm just trying to make something work.   

As such, I have expectations that capabilities that are touted as features of a product should be relatively easy to understand out of the box.   Documentation is critical.  Examples are great.   I don't believe that providing sparse comments in Kconfig files constitutes good documentation.  Having to fully understand the multitude of config options and how they interact in order to get basic functionality (like an IP stack) working seems newcomer-hostile.   Yup, maybe the extra 6K of code size matters to the large-scale production oriented user.   But not out of the box to the hobbyist.  Right now, I've got a part with 512K of flash.     

I do understand that the microcontroller universe is a complex space, and it's not the same as Unix.   But if you have to already be an expert in working in the microcontroller space to work in the microcontroller space, there's a chicken and egg problem.   Right now it seems like one has to be completely knowledgeable about the microcontroller itself, all of Zephyr, *and* the Linux kernel config system in order to work with Zephyr.   That's a tall order.
 
 *Afterwards* someone can debug their stuff, and optimize code size by disabling logging.

Once someone has been able to develop something worthwhile, they will have also picked up on the skills needed to consider the steps needed for optimization.   But if I can't even get my basic functionality working, I'll never even consider using Zephyr.  Something else out there will have been able to meet my hobbyist needs.

I'm seeing now the layers of abstraction that the Arduino developers put into play, keeping me from having to worry about quite a number of things.  Some of those things are now issues that I need to address because I've hit the limits of the abstraction.   But to step into a project and codebase that is focused on tiniest-device-production and not user entry is problematic.   It doesn't have to be one XOR the other.   And being able to tweak my system to achieve the tiniest-device capabilities is a good thing.   But in my experience, I found Zephyr to be hard to achieve basic capabilities.   I'm finding it easier to achieve those capabilities in other freely available RTOS packages.   

david zuhn

 

 


Adding Nucleo-F030R8 support to Zephyr - CI fails due to low SOC RAM (8k)

Bobby
 

Hello Macjie,

the pull request #1103 seems to fail some CI tests due to not enough RAM space (8k only).
The missing amount of RAM is above 1.5k so disabling the RAM vector table (~400 bytes) will not help either.   

It seems the stack sizes are too big.

E.g. in benchmark/latency_measure:
  "region `SRAM' overflowed by 1704 bytes"

The stack sizes are:

_k_thread_stack_tt_id 0x400
y_stack_area  0x200
_k_thread_stack_int_thread_id 0x200
_main_stack  0x400
_idle_stack  0x100
_interrupt_stack 0x800
sys_work_q_stack  0x400

in total 6.4k


Maybe you can reduce the stack size.


Regards
Bobby


Re: RFC: Stopping Zephyr networking from being painful by enabling error logging by default

Paul Sokolovsky
 

Hello Luiz,

On Fri, 15 Sep 2017 12:26:10 +0300
Luiz Augusto von Dentz <luiz.dentz@...> wrote:

[]

We should think beyond that, we should think why, 8 months after the
project being on github, it has barely over 300 stars (which is good
for a personal spare-time project and zilch for something targetting
to influence the landscape). We should think why Zephyr TSC
receives a feedback
(https://docs.google.com/presentation/d/1L3t6V9dr2IhUlz6f4Tc_gz1-zmt00O2aspO3IfyEtBs/edit#slide=id.g1f87755cc1_0_39)
from perspective users which says "Zephyr project would get even
more credibility if there would be device manufacturers &
hobbyist".
When you use a presentation which says:

Main benefits taking zephyr in use would come from good ble and
tcp/ip stacks ...
Well, when someone comes by and says "You're doing great, but we won't
use your stuff and can't even tell where we will be able to" (and
that's arguably summarizes that presentation), I'd spend less time on
being flattered by a polite conversation starter, and would spend more
time on 2nd part of the message ;-).

I understand it can be frustrating to not have proper logs when facing
issues, but things like this happen when we are trying to move as fast
as we can, perhaps too fast?
It's true that Zephyr development moves fast overall, and yet some
things are vice-versa pretty slow, for example here we, at version 1.9,
discuss whether it makes sense to report error messages or not.

[]

Note, this can all be achieved without a wall of text complaining
about things that doesn't work for you, from the responses here
everyone seems quite positive with the idea of having better logging
so there is no point in keep coming with more more rants about it.
Yeah, sorry about that. I mentioned that I "sent probes" on this
before, and quite anticipated the possible response ("let's not change
things, everything works well as it is"). So, I appreciate that
everyone agrees we can change in logging *something*, I'm just trying
to convey that we should change a bunch of stuff consistently to make a
real difference.

Anyway, I'm off to patches on this stuff.

[]

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


Re: RFC: Stopping Zephyr networking from being painful by enabling error logging by default

Luiz Augusto von Dentz
 

Hi Paul,

On Fri, Sep 15, 2017 at 10:55 AM, Paul Sokolovsky
<paul.sokolovsky@...> wrote:
Hello Piotr,

On Thu, 14 Sep 2017 22:03:19 +0200
Piotr Mienkowski <piotr.mienkowski@...> wrote:

[]

I disagree with enabling logging by default, it bloats the binary
and also increases ram / stack usage. Normally you do not need to
have debugging enabled anyway, and if you need it, then it is easy
to set CONFIG_NET_LOG=y, enable individual component logging or
global logging, and then increase the log level.
One more vote to set the default log level to 2 (warning) but not to
enable logging by default for the reasons Jukka has mentioned. It
certainly makes sense to provide sane defaults (level 2 is a good
idea, maybe even level 3 if we clean up _INF messages, seeing
assigned MAC address, IP number in the log wouldn't be all that bad)
but we should avoid making choices on behalf of the users.
I would put it differently: we should make choices for the benefit of
the users.

I prefer
to enable options that I need when I need them rather than disable
all those I don't only because someone believed they are good for me.
I don't think discussion in this direction would be productive. Because
I too don't like choices made for me, and don't appreciate someone
thinking that code size if more important than error reporting, and
making me spend hours again and again debugging whole range of issues,
from trivial to complex.

Instead, we should think what would be in the interest of users, how to
let them engage with Zephyr easily, and keep them afterwards.

We should think beyond that, we should think why, 8 months after the
project being on github, it has barely over 300 stars (which is good
for a personal spare-time project and zilch for something targetting
to influence the landscape). We should think why Zephyr TSC receives a
feedback
(https://docs.google.com/presentation/d/1L3t6V9dr2IhUlz6f4Tc_gz1-zmt00O2aspO3IfyEtBs/edit#slide=id.g1f87755cc1_0_39)
from perspective users which says "Zephyr project would get even more
credibility if there would be device manufacturers & hobbyist".
When you use a presentation which says:

Main benefits taking zephyr in use would come from good ble and tcp/ip stacks
...

I understand it can be frustrating to not have proper logs when facing
issues, but things like this happen when we are trying to move as fast
as we can, perhaps too fast? Though I agree that hobbyists would
probably help fill these gaps.

Indeed, why would somebody make commercial projects based on Zephyr
with all the investment required, if nobody invests their spare fun
time into it? Then you might think if there's a correlation between
that and it being agonizing hard to configure Zephyr and debug
misconfigurations.

Zephyr documentation specifically mentions that it's targeting small
memory footprint devices.
But above that, it targets users, so any premature optimizations of
code size at the expense of user experience are, well, strange.

Few things eat up memory quite so reliably as a couple of printfs.
The network stack has eaten up memory much reliably than printfs, so
adding few won't change picture much, but may improve user
experience considerably.

That said, we could enable logging for all sample applications but not
for the main project. Maybe that was the intention all way long and I
misunderstood it.
No, this issue being talked up for a while now, so it's worth a
solution, not half-measures. I really mean that if you take a new
Linux distro, then it ships with printk's in kernel enabled, so if
something goes wrong during the installation or afterwards, you see it
right away, not receive kind suggestions to dig into documentation
looking for god-knows-what and build your kernel differently just to
approach answering question "what may be wrong". I mean that, just
applied to Zephyr. *Afterwards* someone can debug their stuff, and
optimize code size by disabling logging.
Comparing Zephyr with Linux is not fair really, they target completely
different environments, especially when it is concerned to runtime so
we have to keep things at certain perspective. We could perhaps have
debug builds using KConfig that selects whatever makes sense to help
with initial development/prototyping phase, things like _assert
support, warnings logging, etc.

Note, this can all be achieved without a wall of text complaining
about things that doesn't work for you, from the responses here
everyone seems quite positive with the idea of having better logging
so there is no point in keep coming with more more rants about it.


Cheers,
Piotr
--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@...
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel


--
Luiz Augusto von Dentz

5221 - 5240 of 8631