Date   

Re: Porting Zephyr on 64-bits RISC-V platform

Khabarov, SergeyX <sergeyx.khabarov@...>
 

I'll merge my kernel version with the master and commit patch for the review soon.
For testing I'm using two targets:

- Real Hardware with FPGA (ML605, KC705)

- Platform simulator with CPU and all peripheries that could be used for the tests automation (in the same repository).


Tests itself consists of two addition console commands for Zephyr 'shell' example:

- 'dhry' - run Dhrystone 2.1 benchmark

- 'pnp' - output plug'n'play information into UART.

Sergey

--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

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.


D2000 Development Kit

Matt Heins <heinsmatt@...>
 

I have a few questions:

1. Are there instructions anywhere for getting started with Zephyr with the
D2000? The specific problem I'm having is one that I had previously with
the Arduino 101. The instructions there got me going with the D2000. With
the D2000, I've only been able to program it after executing the following:

sudo chmod 666 /dev/bus/usb/*/*

I know this problem has come up for other boards, but I haven't seen
anything for this board.

2. Flashing with Zephyr is very slow. It took 2 minutes. Is this a related
problem?

3. Are there instructions anywhere and sample projects for setting up
Zephyr with ISSM?

Thanks

Matt


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/3405 : crypto: Update tinycrypt source files
- https://gerrit.zephyrproject.org/r/3410 : kernel: Remove unneeded ASSERT from memory pool subsystem
- https://gerrit.zephyrproject.org/r/3403 : soc: nrf5x: Disconnect GPIO input buffer when configured as output
- https://gerrit.zephyrproject.org/r/3407 : net: Fix incorrect IP app data length
- https://gerrit.zephyrproject.org/r/3406 : nano_work: Fix never yielding from fiber
- https://gerrit.zephyrproject.org/r/3404 : soc: nrf5x: Add support to read and write to gpios

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/3392 : atomic: Add helper to declare atomic_t arrays for bit fields
- https://gerrit.zephyrproject.org/r/3352 : gpio: nrf5: Fix Kconfig symbol issue
- https://gerrit.zephyrproject.org/r/3380 : gpio_qmsi: Add suspend/resume
- https://gerrit.zephyrproject.org/r/2565 : fs: Create directory layout, Kconfigs and a diskio interface.
- https://gerrit.zephyrproject.org/r/3337 : script: full name accept unicode characters
- https://gerrit.zephyrproject.org/r/3398 : samples: aon counter: Remove outdated information in readme file
- https://gerrit.zephyrproject.org/r/3402 : fs: Add Zephyr FS API core file functions
- https://gerrit.zephyrproject.org/r/2797 : samples: bmi160: add sensor_value_sprintf helper function
- https://gerrit.zephyrproject.org/r/3016 : samples: power/quark_se: Add support for Sleep states
- https://gerrit.zephyrproject.org/r/3012 : samples: Add suspend/resume of devices to Quark SE power sample

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/3408 : Bluetooth: GATT: Fix bt_gatt_exchange_mtu documentation
- https://gerrit.zephyrproject.org/r/3409 : net: buf: Fix compiling with debug options
- https://gerrit.zephyrproject.org/r/3320 : Bluetooth: L2CAP: Add BR/EDR CoC channel disconnect
- https://gerrit.zephyrproject.org/r/2994 : Bluetooth: L2CAP: Split security changed handler for BR/EDR
- https://gerrit.zephyrproject.org/r/3319 : Bluetooth: L2CAP: Reset CoC channel state during cleanup
- https://gerrit.zephyrproject.org/r/2997 : Bluetooth: L2CAP: Introduce security requirements on CoC
- https://gerrit.zephyrproject.org/r/2998 : Bluetooth: L2CAP: Handle BR/EDR configuration deferred by GAP
- https://gerrit.zephyrproject.org/r/3394 : drivers/nble: Use semaphore to control notification rate


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/3016 : samples: power/quark_se: Add support for Sleep states
- https://gerrit.zephyrproject.org/r/3380 : gpio_qmsi: Add suspend/resume
- https://gerrit.zephyrproject.org/r/3012 : samples: Add suspend/resume of devices to Quark SE power sample
- https://gerrit.zephyrproject.org/r/3397 : build: use -Og instead of -O0 for CONFIG_DEBUG
- https://gerrit.zephyrproject.org/r/3377 : testcases: add automation markup to samples/

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/3379 : testcases: introduce defaults to build/deploy/evaluate


Re: Some thoughts on Zephyr Console API

Flavio Santes <flavio.santes@...>
 

Hello Paul,

Zephyr shell is useful for writing sample code, and it works fine if you just want to create prototypes. However, you are right, the shell is not quite useful for general interactive input processing.
Running JS, Lua or Python code embedded into a Zephyr application sounds great. Even so, I do not see why more interactive functionality is required. Perhaps I am missing something, can you provide a use-case?

Regards,
Flavio


Re: Porting Zephyr on 64-bits RISC-V platform

Boie, Andrew P
 

I think we might be interested in taking this. Can you rebase your patch series onto the Zephyr trunk and send to our Gerrit review server? What kind of testing has been done so far?

Andrew
________________________________________
From: Sergey Khabarov [sergeykhbr(a)gmail.com]
Sent: Thursday, June 09, 2016 5:56 AM
To: devel(a)lists.zephyrproject.org
Subject: [devel] Porting Zephyr on 64-bits RISC-V platform

I've made some work on porting zephyr on RISC-V based platform.The result is available on githug:
https://github.com/sergeykhbr/riscv_vhdl/

I wonder is there any chance to merge such project taking into account the following features:
- OS is running on FPGA boards.
- Maintainer is the only person.

There's also implemented Microsoft Visual Studio arch that is used Windows API to switch fibers/tasks as cooperatively either as preemptively. But it is another question.


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 5
[ZEP-585] enable GCC link-time optimization
https://jira.zephyrproject.org/browse/ZEP-585

[ZEP-584] warn user if SDK is out of date
https://jira.zephyrproject.org/browse/ZEP-584

[ZEP-587] File system - Flash management layer optimization
https://jira.zephyrproject.org/browse/ZEP-587

[ZEP-583] "make debugserver" get "lakemont_halt" @quark_se_devboard
https://jira.zephyrproject.org/browse/ZEP-583

[ZEP-586] test_bat issues
https://jira.zephyrproject.org/browse/ZEP-586


UPDATED JIRA items within last 24 hours: 9
[ZEP-416] MQTT client capability: QoS1, QoS2
https://jira.zephyrproject.org/browse/ZEP-416

[ZEP-327] Encryption Libraries needed for Thread support
https://jira.zephyrproject.org/browse/ZEP-327

[ZEP-440] Add driver API reentrancy support to WDT shim driver
https://jira.zephyrproject.org/browse/ZEP-440

[ZEP-412] Add driver API reentrancy support to RTC driver for LMT
https://jira.zephyrproject.org/browse/ZEP-412

[ZEP-415] aaU, I want to use the NATS messaging protocol to send sensor data to the cloud
https://jira.zephyrproject.org/browse/ZEP-415

[ZEP-60] irq priorities should be rebased to safe values
https://jira.zephyrproject.org/browse/ZEP-60

[ZEP-235] Provide an interface for cpu/soc id and version
https://jira.zephyrproject.org/browse/ZEP-235

[ZEP-546] UART interrupts not triggered on ARC
https://jira.zephyrproject.org/browse/ZEP-546

[ZEP-428] Ethernet/IPv4/TCP net_send error
https://jira.zephyrproject.org/browse/ZEP-428


CLOSED JIRA items within last 24 hours: 6
[ZEP-58] (Fixed) investigate use of -fomit-frame-pointer
https://jira.zephyrproject.org/browse/ZEP-58

[ZEP-226] (Fixed) Update sample PMA to support device suspend/resume
https://jira.zephyrproject.org/browse/ZEP-226

[ZEP-571] (Fixed) ARC kernel BAT failed due to race in nested interrupts
https://jira.zephyrproject.org/browse/ZEP-571

[ZEP-157] (Won't Do) PWM Pin Configure API has no effect
https://jira.zephyrproject.org/browse/ZEP-157

[ZEP-156] (Fixed) PWM Set Value API behaves incorrectly
https://jira.zephyrproject.org/browse/ZEP-156

[ZEP-158] (Fixed) PWM Set Duty Cycle API does not work
https://jira.zephyrproject.org/browse/ZEP-158


RESOLVED JIRA items within last 24 hours: 7
[ZEP-512] (Fixed) Add suspend/resume support for some core devices to enable Deep Sleep support in PMA
https://jira.zephyrproject.org/browse/ZEP-512

[ZEP-511] (Fixed) Add Deep Sleep support in PMA
https://jira.zephyrproject.org/browse/ZEP-511

[ZEP-441] (Fixed) Add driver API reentrancy support to GPIO shim drivers
https://jira.zephyrproject.org/browse/ZEP-441

[ZEP-424] (Fixed) AON counter driver needs to add driver API reentrancy support
https://jira.zephyrproject.org/browse/ZEP-424

[ZEP-454] (Fixed) Add driver API reentrancy support to UART shim drivers
https://jira.zephyrproject.org/browse/ZEP-454

[ZEP-225] (Fixed) Add kernel API to put SoC to Deep Sleep (DS) State
https://jira.zephyrproject.org/browse/ZEP-225

[ZEP-227] (Fixed) Add kernel API to put SoC to Low Power State (LPS)
https://jira.zephyrproject.org/browse/ZEP-227


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/3402 : fs: Add Zephyr FS API core file functions
- https://gerrit.zephyrproject.org/r/3401 : samples/net: MQTT publisher with QoS
- https://gerrit.zephyrproject.org/r/3399 : drivers: i2c: remove i2c master idle check
- https://gerrit.zephyrproject.org/r/3398 : samples: aon counter: Remove outdated information in readme file
- https://gerrit.zephyrproject.org/r/3397 : build: use -Og instead of -O0 for CONFIG_DEBUG
- https://gerrit.zephyrproject.org/r/3396 : uart qmsi: Fix definition of device_pm_ops
- https://gerrit.zephyrproject.org/r/3395 : samples/net: Add netz_client sample code
- https://gerrit.zephyrproject.org/r/3393 : net: Network for Zephyr API (netz)

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/3392 : atomic: Add helper to declare atomic_t arrays for bit fields
- https://gerrit.zephyrproject.org/r/2566 : fs: Add a sample app to demo Zephyr file system API
- https://gerrit.zephyrproject.org/r/2565 : fs: Create directory layout, Kconfigs and a diskio interface.
- https://gerrit.zephyrproject.org/r/2431 : qmsi: wdt: improved reentrancy of the wdt driver
- https://gerrit.zephyrproject.org/r/2341 : qmsi: rtc: Use locking to guard critical section
- https://gerrit.zephyrproject.org/r/3338 : ext/lib : Integrating mbedTLS to build process
- https://gerrit.zephyrproject.org/r/3378 : sensor: max44009: replace assert for argument check
- https://gerrit.zephyrproject.org/r/3379 : testcases: introduce defaults to build/deploy/evaluate
- https://gerrit.zephyrproject.org/r/2283 : qmsi: flash: Use locking mechanism to guard critical regions
- https://gerrit.zephyrproject.org/r/3377 : testcases: add automation markup to samples/
- https://gerrit.zephyrproject.org/r/2797 : samples: bmi160: add sensor_value_sprintf helper function
- https://gerrit.zephyrproject.org/r/3370 : ext/lib : mbedTLS Configuration modifications
- https://gerrit.zephyrproject.org/r/3336 : ext/lib : mbedTLS library modifications
- https://gerrit.zephyrproject.org/r/3305 : ext/lib : Adding mbedTLS library
- https://gerrit.zephyrproject.org/r/3307 : samples/net : Adding mbedTLS self test routine
- https://gerrit.zephyrproject.org/r/3373 : samples: Add an app for MAX44009 light sensor
- https://gerrit.zephyrproject.org/r/3355 : qemu_nios2: Fix defconfig Kconfig symbol
- https://gerrit.zephyrproject.org/r/3352 : gpio: nrf5: Fix Kconfig symbol issue
- https://gerrit.zephyrproject.org/r/3353 : qemu_cortex_m3: Remove nonexistent UART_CONSOLE_BAUDRATE from defconfig
- https://gerrit.zephyrproject.org/r/3358 : samples: removed nonexistant CONFIG_NS16550 Kconfig symbol
- https://gerrit.zephyrproject.org/r/3357 : em_starterkit: Remove nonexistant Kconfig sybmol from defconfig
- https://gerrit.zephyrproject.org/r/3354 : arc: Remove nonexistant Kconfig sybmol from defconfig
- https://gerrit.zephyrproject.org/r/3356 : galileo: Remove nonexistant Kconfig sybmol from defconfig
- https://gerrit.zephyrproject.org/r/3381 : net: net_context: Fix local ipv4 addr compare with INADDR_ANY
- https://gerrit.zephyrproject.org/r/3380 : gpio_qmsi: Add suspend/resume

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/3394 : drivers/nble: Use semaphore to control notification rate
- https://gerrit.zephyrproject.org/r/3388 : Bluetooth: tester: Expose device address
- https://gerrit.zephyrproject.org/r/3387 : Bluetooth: tester: Set privacy flag in current_settings
- https://gerrit.zephyrproject.org/r/3386 : Bluetooth: tester: Add missing GAP_SETTINGS_* defines
- https://gerrit.zephyrproject.org/r/3364 : MAINTAINERS: add INTERRUPTS section
- https://gerrit.zephyrproject.org/r/2841 : scripts: Check all CONFIG_* in the code are defined into a Kconfig file
- https://gerrit.zephyrproject.org/r/2342 : qmsi: gpio: Use locking mechanism to guard critical regions.
- https://gerrit.zephyrproject.org/r/2384 : qmsi: gpio: quark_se_ss: Use locking mechanism to guard critical regions.
- https://gerrit.zephyrproject.org/r/3375 : testcases: stub for x86 core on Quark SE
- https://gerrit.zephyrproject.org/r/3372 : doc: fix backslash paths in windows and python default location
- https://gerrit.zephyrproject.org/r/3391 : Bluetooth: tester: Send IUT ready event on tester_init
- https://gerrit.zephyrproject.org/r/3390 : Bluetooth: btp: Add IUT ready event
- https://gerrit.zephyrproject.org/r/3371 : ksdk: Fix ARRAY_SIZE conflict


Re: [RFC] Provide a generic interface for getting the SOC ID and version

Vij, Gajinder S <gajinder.s.vij@...>
 

There is a clear use case for the API, as articulated by Morgaine and Pedro (included below). The purpose of the API is to provide the mechanism for a developer to be able to select SOC-version-specific code paths at run-time, reducing the need for a custom image per SOC version. When and if version specific code is used depends on the circumstances and should be left to the developer as a policy decision.

I’d like to determine if there is still objections to this API being implemented in Zephyr. I read through the thread and will attempt to address the concerns raised.

On the concerns articulated by Tixy, since the App, Kernel, and BSP are all compiled from source into a single binary, I don’t see the same app compatibility issues cropping up in a Zephyr scenario that have come up in Linux. It is conceivable that someone may attempt to use the SOC version as a way to distinguish between different variants of a product family, but that would be an inappropriate use of the API.

I don’t know where the notion of using this API as an entropy source came from. I have removed this from the Jira description.

To the question about forward support and uniqueness of the IDs – should this happen on different architectures, I don’t see a problem because I expect the BSPs will still be unique, and therefore I don’t expect a binary run on one platform to successfully be run on another.

Comments welcome.

Thanks,
Gajinder




Pedro’s use case:

Ø The user might know the SOC ID at compile time (although a user might want to check against the hardware in case of doubt).

Ø The SOC revision can change between hardware stepping, so the user might not know at compile time the version of a given model.

Ø In that case reading the hardware registers is the only way to know the revision.


Morgaine’s use case:

Ø This API creates a 1:N relationship between compiled firmware and target behaviour. In other words it allows target behaviour to be parametrized by some target identifier in a standard way given by the API, without requiring each different target to be loaded with different firmware.


From: Morgaine [mailto:morgaine.dinova(a)googlemail.com]
Sent: Thursday, July 21, 2016 10:27 AM
To: devel(a)lists.zephyrproject.org
Subject: [devel] Re: [RFC] Provide a generic interface for getting the SOC ID and version

Kumar writes:
So I ask again, what are we trying to accomplish?
See my preceding reply, which explored exactly that question.

From the original requirement expressed in the RFC and from Tixy's subsequent comments, it's clear that there are at least two distinct purposes in people's minds: the one mentioned in the RFC which required uniqueness for generating unique per-target data, and another purpose related to feature sets. It was noted that the second of these is somewhat problematic.
My interest is in the simpler of these, the requirement expressed in the RFC, because it is such a common need. Someone else will have to argue in favour of the other if they feel it's important. The two could of course be combined if the agreed data width permits.
Morgaine.


Re: [RFC] Provide a generic interface for getting the SOC ID and version

Liu, Baohong
 

Thanks for all your feedbacks.

Based on most of the comments which all came to the question of the purpose
and usage of this API. I'd like to hold off this proposal for now until we have
good understanding on the usage of this API.

Thanks

-----Original Message-----
From: Kumar Gala [mailto:kumar.gala(a)linaro.org]
Sent: Wednesday, July 20, 2016 6:59 AM
To: Boie, Andrew P <andrew.p.boie(a)intel.com>
Cc: Liu, Baohong <baohong.liu(a)intel.com>; Morales Romero, Pedro
<pedro.morales.romero(a)intel.com>; devel(a)lists.zephyrproject.org
Subject: Re: [devel] [RFC] Provide a generic interface for getting the SOC ID
and version


On Jul 19, 2016, at 7:44 PM, Boie, Andrew P <andrew.p.boie(a)intel.com>
wrote:



-----Original Message-----
From: Liu, Baohong

I tried to summarize from additional feedback with pro-and-cons
(please correct if I missed anything).

We have two options discussed for the generic interface.

1) Read SoC register at run time
2) Use #define (build time decided)

For 1), This would address the issue Pedro pointed out on revision
number per stepping.
However, concern is that it increases code size as pointed out by Andrew.

For 2), it won't increase code size. However, SoC stepping info may
not be available (Pedro).
I think we now have a use-case to make this a C API.

Andrew
I still don’t see the point of this API at all. In the ZEP it mentions using for
entropy source or for MAC address creation. I don’t think this ID is a good
choice for either purpose. I still don’t see the point at all of adding such an
API w/o having a clear understanding of what we expect an app developer to
do with it.

We end up creating a legacy that we have to maintain for a long time. For
example, are we ok if these IDs aren’t unique across different architectures?
Is this even an application level API or internal for zephyr kernel? If internal,
is there actually any user?

- k


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 3
[ZEP-578] handle configuration changes with more code coverage
https://jira.zephyrproject.org/browse/ZEP-578

[ZEP-580] Stack allignment on ARM doesn't always follow Procedure Call Standard
https://jira.zephyrproject.org/browse/ZEP-580

[ZEP-582] CI jobs appear to be forcing CONFIG_DEBUG=y
https://jira.zephyrproject.org/browse/ZEP-582


UPDATED JIRA items within last 24 hours: 3
[ZEP-454] Add driver API reentrancy support to UART shim drivers
https://jira.zephyrproject.org/browse/ZEP-454

[ZEP-546] UART interrupts not triggered on ARC
https://jira.zephyrproject.org/browse/ZEP-546

[ZEP-581] test_sha256 fails on Nios II if CONFIG_DEBUG=y
https://jira.zephyrproject.org/browse/ZEP-581


CLOSED JIRA items within last 24 hours: 1
[ZEP-565] (Fixed) Ethernet/IPv4/TCP: last commits are breaking network support
https://jira.zephyrproject.org/browse/ZEP-565


RESOLVED JIRA items within last 24 hours: 0


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/3351 : samples/net: Fix typo in comment
- https://gerrit.zephyrproject.org/r/3366 : misc/byteorder.h: Mark bswap_16 & bswap_32 as internal helpers
- https://gerrit.zephyrproject.org/r/3388 : Bluetooth: tester: Expose device address
- https://gerrit.zephyrproject.org/r/3391 : Bluetooth: tester: Send IUT ready event on tester_init
- https://gerrit.zephyrproject.org/r/3390 : Bluetooth: btp: Add IUT ready event
- https://gerrit.zephyrproject.org/r/3387 : Bluetooth: tester: Set privacy flag in current_settings
- https://gerrit.zephyrproject.org/r/3386 : Bluetooth: tester: Add missing GAP_SETTINGS_* defines
- https://gerrit.zephyrproject.org/r/3392 : atomic: Add helper to declare atomic_t arrays for bit fields
- https://gerrit.zephyrproject.org/r/3378 : sensor: max44009: replace assert for argument check
- https://gerrit.zephyrproject.org/r/3380 : gpio_qmsi: Add suspend/resume
- https://gerrit.zephyrproject.org/r/3377 : testcases: add automation markup to samples/
- https://gerrit.zephyrproject.org/r/3381 : net: net_context: Fix local ipv4 addr compare with INADDR_ANY
- https://gerrit.zephyrproject.org/r/3379 : testcases: introduce defaults to build/deploy/evaluate
- https://gerrit.zephyrproject.org/r/3375 : testcases: stub for x86 core on Quark SE
- https://gerrit.zephyrproject.org/r/3373 : samples: Add an app for MAX44009 light sensor
- https://gerrit.zephyrproject.org/r/3372 : doc: fix backslash paths in windows and python default location
- https://gerrit.zephyrproject.org/r/3370 : ext/lib : mbedTLS Configuration modifications
- https://gerrit.zephyrproject.org/r/3367 : altera_max10: default to UFM flashing
- https://gerrit.zephyrproject.org/r/3360 : serial: uart_qmsi: Fix typo in comments
- https://gerrit.zephyrproject.org/r/3371 : ksdk: Fix ARRAY_SIZE conflict
- https://gerrit.zephyrproject.org/r/3364 : MAINTAINERS: add INTERRUPTS section
- https://gerrit.zephyrproject.org/r/3361 : usb: Fix typo in comment
- https://gerrit.zephyrproject.org/r/3363 : Commit: validate accent in name.
- https://gerrit.zephyrproject.org/r/3355 : qemu_nios2: Fix defconfig Kconfig symbol
- https://gerrit.zephyrproject.org/r/3352 : gpio: nrf5: Fix Kconfig symbol issue
- https://gerrit.zephyrproject.org/r/3353 : qemu_cortex_m3: Remove nonexistent UART_CONSOLE_BAUDRATE from defconfig
- https://gerrit.zephyrproject.org/r/3359 : tests: test_tickless: Fix NXP K64 symbol dependency
- https://gerrit.zephyrproject.org/r/3358 : samples: removed nonexistant CONFIG_NS16550 Kconfig symbol
- https://gerrit.zephyrproject.org/r/3357 : em_starterkit: Remove nonexistant Kconfig sybmol from defconfig
- https://gerrit.zephyrproject.org/r/3354 : arc: Remove nonexistant Kconfig sybmol from defconfig
- https://gerrit.zephyrproject.org/r/3356 : galileo: Remove nonexistant Kconfig sybmol from defconfig

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/2797 : samples: bmi160: add sensor_value_sprintf helper function
- https://gerrit.zephyrproject.org/r/3307 : samples/net : Adding mbedTLS self test routine
- https://gerrit.zephyrproject.org/r/3016 : samples: power/quark_se: Add support for Sleep states
- https://gerrit.zephyrproject.org/r/3012 : samples: Add suspend/resume of devices to Quark SE power sample
- https://gerrit.zephyrproject.org/r/3350 : uart_qmsi: Implement suspend and resume functions
- https://gerrit.zephyrproject.org/r/3319 : Bluetooth: L2CAP: Reset CoC channel state during cleanup
- https://gerrit.zephyrproject.org/r/2998 : Bluetooth: L2CAP: Handle BR/EDR configuration deferred by GAP
- https://gerrit.zephyrproject.org/r/3320 : Bluetooth: L2CAP: Add BR/EDR CoC channel disconnect
- https://gerrit.zephyrproject.org/r/2994 : Bluetooth: L2CAP: Split security changed handler for BR/EDR
- https://gerrit.zephyrproject.org/r/2997 : Bluetooth: L2CAP: Introduce security requirements on CoC
- https://gerrit.zephyrproject.org/r/2342 : qmsi: gpio: Use locking mechanism to guard critical regions.
- https://gerrit.zephyrproject.org/r/3311 : crypto/include: Crypto abstraction header
- https://gerrit.zephyrproject.org/r/3338 : ext/lib : Integrating mbedTLS to build process
- https://gerrit.zephyrproject.org/r/2283 : qmsi: flash: Use locking mechanism to guard critical regions
- https://gerrit.zephyrproject.org/r/3337 : script: full name accept unicode characters
- https://gerrit.zephyrproject.org/r/3336 : ext/lib : mbedTLS library modifications
- https://gerrit.zephyrproject.org/r/3001 : i2c: Fixed i2c_dw spamming when logs are enabled
- https://gerrit.zephyrproject.org/r/3312 : drivers/crypto: Tinycrypt shim driver

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/3389 : Bluetooth: Rename connectable_addr member in struct bt_le_oob
- https://gerrit.zephyrproject.org/r/3385 : Bluetooth: tests/shell: Remove unnecessary redefinition of AD types
- https://gerrit.zephyrproject.org/r/3384 : Bluetooth: Add warning for bt_pub_key_gen() when missing support
- https://gerrit.zephyrproject.org/r/3383 : Bluetooth: Remove conn & SMP dependency from BLUETOOTH_TINYCRYPT_ECC
- https://gerrit.zephyrproject.org/r/3374 : qemu_nios2: Fix cmpltui and cmpgeui instructions
- https://gerrit.zephyrproject.org/r/3382 : Bluetooth: L2CAP: Fix debug message in l2cap_chan_destroy
- https://gerrit.zephyrproject.org/r/3362 : REVERTME exclude test_sha256 on Nios2
- https://gerrit.zephyrproject.org/r/3318 : Bluetooth: L2CAP: Refactor channel context by ident
- https://gerrit.zephyrproject.org/r/3347 : Bluetooth: Remove nano_work include from internal header
- https://gerrit.zephyrproject.org/r/3278 : net/yaip: revert merge
- https://gerrit.zephyrproject.org/r/3349 : Bluetooth: use sys_put_le16 macro instead of bswap
- https://gerrit.zephyrproject.org/r/3348 : template_dir: Fix perms of info-zephyr-sdk dir
- https://gerrit.zephyrproject.org/r/3344 : timer: Adds device suspend/resume to loapic timer
- https://gerrit.zephyrproject.org/r/3280 : uart: qmsi: Adds device suspend/resume to uart_qmsi device
- https://gerrit.zephyrproject.org/r/2869 : power_mgmt: Add Deep Sleep support in sample PM app
- https://gerrit.zephyrproject.org/r/3279 : rtc: qmsi: Adds device suspend/resume to rtc_qmsi device
- https://gerrit.zephyrproject.org/r/2868 : power_mgmt: Enhances the DEVICE_INIT_PM macros
- https://gerrit.zephyrproject.org/r/2876 : power_mgmt: Create arch/soc specific helper functions
- https://gerrit.zephyrproject.org/r/2906 : qemu_nios2: run sanity checks with the emulator
- https://gerrit.zephyrproject.org/r/2593 : sensor: add driver for LPS25HB
- https://gerrit.zephyrproject.org/r/3316 : misc/byteorder.h: Add helpers to get & put unaligned integers
- https://gerrit.zephyrproject.org/r/3345 : misc/byteorder.h: Add documentation for existing APIs
- https://gerrit.zephyrproject.org/r/3286 : net: tinydtls: Use assert.h from minimal libc
- https://gerrit.zephyrproject.org/r/3325 : samples: uart: Check return value from uart_fifo_fill
- https://gerrit.zephyrproject.org/r/3014 : samples: Add Quark SE power management application
- https://gerrit.zephyrproject.org/r/3334 : arm: assume irq stack and size are aligned
- https://gerrit.zephyrproject.org/r/3309 : x86: fix CONFIG_INIT_STACKS
- https://gerrit.zephyrproject.org/r/3333 : nios2: assume IRQ stack pointer and size already aligned
- https://gerrit.zephyrproject.org/r/3332 : x86: assume irq stack pointer and size already aligned


Some thoughts on Zephyr Console API

Paul Sokolovsky
 

Hello,

I would like to share some thoughts/woes with using Zephyr console API,
based on the experience with (initial) porting of two console
application to Zephyr, both are scripting languages, JerryScript and
MicroPython. As those are scripting languages, interactive prompt (aka
REPL) play important role for them.

Both JrS and uPy are intended for embedded usage, and both share a
similar architecture, where there's "unix" port, which can serve as a
demo, and as a starting port for a port to specific RTOS/hardware. Both
of these projects for reading a console input require classical
K&R-style getchar()-like function, with a semantics of "read a single
char from console, block if not available". Alternatively, they can
interpret a whole line at once, that's classical gets() with semantics
of "block until whole line from console is available, then return it".
Using gets()-like call has a benefit that line-editing capabilities can
be provided, and transparent to an application.

Let's see what effort was required to port them to Zephyr:

1. JerryScript port was originally done by Sergio Rodriguez (Zephyr
team member or at least member of another team in Intel which uses
Zephyr closely). Instead of pull-style gets(), it uses push-style
whole line delivery via callback from Zephyr shell subsystem. Works
well, and there's line editing, completion support offered by Zephyr
shell, which is really nice. And while not as easy as a single gets(),
set up of it is pretty easy and high-level. And it works nice, until
you try to enter a line with at least 10 spaces, e.g.:

for (var i = 0; i < 10000; i++) { a.push("foo"); }

That ends up with "Too many parameters (max 10)" error. That's because
shell unconditionally tokenizes an input lines into space-separate
tokens, and the default (non-configurable) limit is 10. And of course,
JerryScript then needs to join them back.

2. With MicroPython, I decided to follow "getchar" approach, especially
that uPy has an own readline-like implementation with more capabilities
then Zephyr. So, I started to look how to make Zephyr pass me input
chars. I saw drivers/console/uart_pipe.c, and thought that's the best
approach, as it allows the leanest way to do that. Unfortunately,
playing with for few hours, I couldn't make it work. I then followed
another lead - using uart_irq_input_hook. With some extra effort I was
able to make it work, and created a standalone module which just
exposes zephyr_getchar() function:
https://github.com/pfalcon/zephyr_getchar


Conclusions:

Getting console input with Zephyr is *HARD*. I originally reported
an issue #1 above as https://jira.zephyrproject.org/browse/ZEP-532 ,
and suggested that I could fork console_handler_shell.c, remove
tokenizing and would get what I want. But arguably, that's a lot of
work to just gets() which is just there on a lot of other systems.
However, with "getchar" trial, I essentially did just that - coded
simple, but not exactly trivial code on top of what Zephyr.

So, I guess I could do similar for "gets" too, but one problem is that
it unlikely to help many other people - it really would be nice to have
that in the main Zephyr repo, and engineered properly (for example,
zephyr_getchar module above isn't compatible with Zephyr shell).

Would that make sense for Zephyr? Requirements would be simple:

1. Add ability to receive a single char from a console; also, a single
line (with editing and other niceties).

2. Push-style interface with a callback is probably OK, but having
pull-style interface would make porting a lot of software easier. And
with a push-style, a multiple consumers problem immediately manifests
itself.


Thanks,
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] Provide a generic interface for getting the SOC ID and version

Morgaine
 

Kumar writes:

So I ask again, what are we trying to accomplish?
See my preceding reply, which explored exactly that question.

From the original requirement expressed in the RFC and from Tixy's
subsequent comments, it's clear that there are at least two distinct
purposes in people's minds: the one mentioned in the RFC which required
uniqueness for generating unique per-target data, and another purpose
related to feature sets. It was noted that the second of these is somewhat
problematic.

My interest is in the simpler of these, the requirement expressed in the
RFC, because it is such a common need. Someone else will have to argue in
favour of the other if they feel it's important. The two could of course
be combined if the agreed data width permits.

Morgaine.


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 2
[ZEP-576] hello_world app linking failed with zephyr sdk x86 toolchain
https://jira.zephyrproject.org/browse/ZEP-576

[ZEP-577] Sample application source does not compile on Windows
https://jira.zephyrproject.org/browse/ZEP-577


UPDATED JIRA items within last 24 hours: 1
[ZEP-562] perms on info dir of SDK arent correct
https://jira.zephyrproject.org/browse/ZEP-562


CLOSED JIRA items within last 24 hours: 1
[ZEP-206] (Won't Do) ipv4 udp multicast is not supported
https://jira.zephyrproject.org/browse/ZEP-206


RESOLVED JIRA items within last 24 hours: 2
[ZEP-547] (Fixed) [nble] Failed to start encryption after reconnection
https://jira.zephyrproject.org/browse/ZEP-547

[ZEP-571] (Fixed) ARC kernel BAT failed due to race in nested interrupts
https://jira.zephyrproject.org/browse/ZEP-571


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/3357 : em_starterkit: Remove nonexistant Kconfig sybmol from defconfig
- https://gerrit.zephyrproject.org/r/3356 : galileo: Remove nonexistant Kconfig sybmol from defconfig
- https://gerrit.zephyrproject.org/r/3355 : qemu_nios2: Fix defconfig Kconfig symbol
- https://gerrit.zephyrproject.org/r/3354 : arc: Remove nonexistant Kconfig sybmol from defconfig
- https://gerrit.zephyrproject.org/r/3353 : qemu_cortex_m3: Remove nonexistent UART_CONSOLE_BAUDRATE from defconfig
- https://gerrit.zephyrproject.org/r/3352 : gpio: nrf5: Fix Kconfig symbol issue
- https://gerrit.zephyrproject.org/r/3351 : samples/net: Fix typo in comment
- https://gerrit.zephyrproject.org/r/3348 : template_dir: Fix perms of info-zephyr-sdk dir
- https://gerrit.zephyrproject.org/r/3350 : uart_qmsi: Implement suspend and resume functions
- https://gerrit.zephyrproject.org/r/3349 : Bluetooth: use sys_cpu_ macro instead of bswap
- https://gerrit.zephyrproject.org/r/3337 : script: full name accept unicode characters
- https://gerrit.zephyrproject.org/r/3345 : misc/byteorder.h: Add documentation for existing APIs
- https://gerrit.zephyrproject.org/r/3346 : net: net_context: Fix local ipv4 addr compare with INADDR_ANY
- https://gerrit.zephyrproject.org/r/3347 : Bluetooth: Remove nano_work include from internal header
- https://gerrit.zephyrproject.org/r/3336 : ext/lib : mbedTLS library modifications
- https://gerrit.zephyrproject.org/r/3344 : timer: Adds device suspend/resume to loapic timer
- https://gerrit.zephyrproject.org/r/3338 : ext/lib : Integrating mbedTLS to build process
- https://gerrit.zephyrproject.org/r/3343 : Convert image building from Vagrant to Packer

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/2797 : sensor: add sensor_value_sprintf helper function
- https://gerrit.zephyrproject.org/r/3325 : samples: uart: Check return value from uart_fifo_fill
- https://gerrit.zephyrproject.org/r/3316 : misc/byteorder.h: Add helpers to get & put unaligned integers
- https://gerrit.zephyrproject.org/r/3161 : ext qmsi: Enable linking to qm_init.o
- https://gerrit.zephyrproject.org/r/3311 : crypto/include: Crypto abstraction header
- https://gerrit.zephyrproject.org/r/3278 : net/yaip: revert merge
- https://gerrit.zephyrproject.org/r/3318 : Bluetooth: L2CAP: Refactor channel context by ident
- https://gerrit.zephyrproject.org/r/2593 : sensor: add driver for LPS25HB
- https://gerrit.zephyrproject.org/r/3320 : Bluetooth: L2CAP: Add BR/EDR CoC channel disconnect
- https://gerrit.zephyrproject.org/r/3319 : Bluetooth: L2CAP: Reset CoC channel state during cleanup
- https://gerrit.zephyrproject.org/r/2994 : Bluetooth: L2CAP: Split security changed handler for BR/EDR
- https://gerrit.zephyrproject.org/r/2997 : Bluetooth: L2CAP: Introduce security requirements on CoC
- https://gerrit.zephyrproject.org/r/2998 : Bluetooth: L2CAP: Handle BR/EDR configuration deferred by GAP
- https://gerrit.zephyrproject.org/r/2906 : qemu_nios2: run sanity checks with the emulator
- https://gerrit.zephyrproject.org/r/2876 : power_mgmt: Create arch/soc specific helper functions
- https://gerrit.zephyrproject.org/r/3279 : rtc: qmsi: Adds device suspend/resume to rtc_qmsi device
- https://gerrit.zephyrproject.org/r/2868 : power_mgmt: Enhances the DEVICE_INIT_PM macros
- https://gerrit.zephyrproject.org/r/3280 : uart: qmsi: Adds device suspend/resume to uart_qmsi device
- https://gerrit.zephyrproject.org/r/2869 : power_mgmt: Add Deep Sleep support in sample PM app
- https://gerrit.zephyrproject.org/r/2817 : toolchain.gccarmemb: Cleanup Makefile
- https://gerrit.zephyrproject.org/r/2342 : gpio: Use locking mechanism to guard critical regions.
- https://gerrit.zephyrproject.org/r/3001 : i2c: Fixed i2c_dw spamming when logs are enabled
- https://gerrit.zephyrproject.org/r/3286 : net: tinydtls: Use assert.h from minimal libc
- https://gerrit.zephyrproject.org/r/3307 : samples/net : Adding mbedTLS self test routine
- https://gerrit.zephyrproject.org/r/3313 : samples/drivers/crypto: crypto sample app
- https://gerrit.zephyrproject.org/r/2384 : gpio: quark_se_ss: Use locking mechanism to guard critical regions.
- https://gerrit.zephyrproject.org/r/2341 : rtc: qmsi: Use locking to guard critical section
- https://gerrit.zephyrproject.org/r/3014 : samples: Add Quark SE power management application
- https://gerrit.zephyrproject.org/r/3016 : samples: power/quark_se: Add support for Sleep states
- https://gerrit.zephyrproject.org/r/2283 : qmsi: flash: Use locking mechanism to guard critical regions
- https://gerrit.zephyrproject.org/r/3305 : ext/lib : Adding mbedTLS library
- https://gerrit.zephyrproject.org/r/2431 : wdt: qmsi: improved reentrancy of the wdt driver
- https://gerrit.zephyrproject.org/r/2893 : Test: including second line with blank spaces and a tab.
- https://gerrit.zephyrproject.org/r/2891 : Correct: Commit message with full compliance
- https://gerrit.zephyrproject.org/r/2886 : thisnotcontaininfo
- https://gerrit.zephyrproject.org/r/2890 : Test2: Modify name in signature
- https://gerrit.zephyrproject.org/r/2889 : Test: testing commit message Missing blanck line after subject line and also writing a soooo long line, exciding limit of characters.

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/3334 : arm: assume irq stack and size are aligned
- https://gerrit.zephyrproject.org/r/3333 : nios2: assume IRQ stack pointer and size already aligned
- https://gerrit.zephyrproject.org/r/3332 : x86: assume irq stack pointer and size already aligned
- https://gerrit.zephyrproject.org/r/3330 : sanitycheck: add -R to build all tests with assertions
- https://gerrit.zephyrproject.org/r/3329 : __assert.h: format strings are not optional
- https://gerrit.zephyrproject.org/r/3328 : sensor_bmi160: fix incorrect use of __ASSERT()
- https://gerrit.zephyrproject.org/r/3342 : Revert "Script to validate commit messages format."
- https://gerrit.zephyrproject.org/r/3331 : nano_init: force nanokernel stack alignment
- https://gerrit.zephyrproject.org/r/3309 : x86: fix CONFIG_INIT_STACKS
- https://gerrit.zephyrproject.org/r/3289 : template_dir: Installed common SDK version file
- https://gerrit.zephyrproject.org/r/3271 : build: Improve usage of the ISSM toolchain
- https://gerrit.zephyrproject.org/r/2816 : toolchain.gccarmemb: Simplify setting of libgcc include path
- https://gerrit.zephyrproject.org/r/2349 : samples/task_profiler: remove "dump" logging
- https://gerrit.zephyrproject.org/r/2924 : samples: usb: dfu: Fix building of dfu code
- https://gerrit.zephyrproject.org/r/2837 : samples: shell: Print ticks as unsigned
- https://gerrit.zephyrproject.org/r/3160 : samples/usb: Fix build for usb_dfu example
- https://gerrit.zephyrproject.org/r/3282 : libc: Add assert.h to minimal libc
- https://gerrit.zephyrproject.org/r/2327 : qmsi: aon counter: Use locking mechanism to guard critical regions of API call
- https://gerrit.zephyrproject.org/r/3314 : make_zephyr_sdk.sh: Bumped version to 0.8.2
- https://gerrit.zephyrproject.org/r/3315 : template_dir: Setup thumb2 legacy symlinks
- https://gerrit.zephyrproject.org/r/3327 : Revert "net: Restructured Ethernet driver menu"
- https://gerrit.zephyrproject.org/r/3310 : x86: close EOI race condition when nested IRQs enabled
- https://gerrit.zephyrproject.org/r/2919 : ext qmsi: Build the power states support from QMSI
- https://gerrit.zephyrproject.org/r/3324 : Bluetooth: shell: Add support for getting OOB data
- https://gerrit.zephyrproject.org/r/3323 : Bluetooth: Add initial support for OOB data
- https://gerrit.zephyrproject.org/r/2903 : microkernel: Fix fifo buffer name generation in DEFINE_FIFO
- https://gerrit.zephyrproject.org/r/3276 : ext qmsi: Fix registers definition for LPSS
- https://gerrit.zephyrproject.org/r/3326 : Bluetooth: Pass net_buf_simple to scan callback
- https://gerrit.zephyrproject.org/r/3317 : Bluetooth: Add support for rotating RPA
- https://gerrit.zephyrproject.org/r/2679 : Script to validate commit messages format.
- https://gerrit.zephyrproject.org/r/3299 : fs: PUll in rev 0.12a of open source FAT FS code


Re: [RFC] Provide a generic interface for getting the SOC ID and version

Kumar Gala
 

On Jul 20, 2016, at 11:45 AM, Morgaine <morgaine.dinova(a)googlemail.com> wrote:

Tixy wrote:
Sorry, if that was all a bit rambling.
I think your comment was very useful, as you've highlighted that there are at least two different types of requirement being combined here:

• Identification for establishing unique target identity.
• Identification for feature discovery (or in lieu of it).

These are not quite the same thing, and should not be confused.

Querying for a unique target identity is the purpose that I had in mind, since lots of unique information can be generated from this data by a single firmware image. This is very useful in many applications, particular when equipment is online and identity may be important. This goes far beyond just generating MAC addresses. The ability of a single image to be parametrized by unique target identity is very powerful.

In contrast, using identification in lieu of automatic feature discovery introduces desync-type pitfalls as Tixy pointed out, and should be used only when feature probing cannot be done safely or reliably. One reason for target identification may be to disable automatic feature discovery, for example when a feature interface is automatically discoverable but the feature is not fully operational on particular targets. I'm not advocating for or against such uses, but they are quite distinct from the use of unique target IDs to generate unique data.

Morgaine.
When you say unique target identity, how unique are you meaning. The sense I got was this API would give me the same value for two different instances of the same board (HW, SoC, assuming same rev’s of board/chip, etc.). I’m not sure how such a value is useful for the type of uniqueness you mention. For seeding things like random number generators or MAC addresses, we’d want something that was viewed as unique between the two instances of the same HW.

So I ask again, what are we trying to accomplish?

- k


Re: [RFC] Provide a generic interface for getting the SOC ID and version

Morgaine
 

Tixy wrote:

Sorry, if that was all a bit rambling.
I think your comment was very useful, as you've highlighted that there are
at least two different types of requirement being combined here:


- Identification for establishing unique target identity.


- Identification for feature discovery (or in lieu of it).


These are not quite the same thing, and should not be confused.

Querying for a unique target identity is the purpose that I had in mind,
since lots of unique information can be generated from this data by a
single firmware image. This is very useful in many applications,
particular when equipment is online and identity may be important. This
goes far beyond just generating MAC addresses. The ability of a single
image to be parametrized by unique target identity is very powerful.

In contrast, using identification in lieu of automatic feature discovery
introduces desync-type pitfalls as Tixy pointed out, and should be used
only when feature probing cannot be done safely or reliably. One reason
for target identification may be to *disable* automatic feature discovery,
for example when a feature interface is automatically discoverable but the
feature is not fully operational on particular targets. I'm not advocating
for or against such uses, but they are quite distinct from the use of
unique target IDs to generate unique data.

Morgaine.


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 6
[ZEP-568] MQTT QoS sample app
https://jira.zephyrproject.org/browse/ZEP-568

[ZEP-567] netz sample code
https://jira.zephyrproject.org/browse/ZEP-567

[ZEP-573] IoT applications must use netz API
https://jira.zephyrproject.org/browse/ZEP-573

[ZEP-575] Ethernet/IPv4/UDP: ip_buf_appdatalen returns wrong values
https://jira.zephyrproject.org/browse/ZEP-575

[ZEP-574] Distro Version not correct in info files (SDK version 0.8.1)
https://jira.zephyrproject.org/browse/ZEP-574

[ZEP-572] X86 kernel BAT failed due to side-effect introduced in core arch code merging
https://jira.zephyrproject.org/browse/ZEP-572


UPDATED JIRA items within last 24 hours: 8
[ZEP-416] MQTT client capability: QoS1, QoS2
https://jira.zephyrproject.org/browse/ZEP-416

[ZEP-245] Restructure Documentation content
https://jira.zephyrproject.org/browse/ZEP-245

[ZEP-234] provide a direct memory access (DMA) interface
https://jira.zephyrproject.org/browse/ZEP-234

[ZEP-354] Provide a DMA driver for Quark SE core
https://jira.zephyrproject.org/browse/ZEP-354

[ZEP-356] DMA device support
https://jira.zephyrproject.org/browse/ZEP-356

[ZEP-553] SDP for Bluetooth BR/EDR
https://jira.zephyrproject.org/browse/ZEP-553

[ZEP-469] Ethernet/IPv4/TCP: net_receive & net_reply in server mode
https://jira.zephyrproject.org/browse/ZEP-469

[ZEP-428] Ethernet/IPv4/TCP net_send error
https://jira.zephyrproject.org/browse/ZEP-428


CLOSED JIRA items within last 24 hours: 2
[ZEP-497] (Fixed) Ethernet/IPv4/TCP: failed to get free buffer
https://jira.zephyrproject.org/browse/ZEP-497

[ZEP-435] (Fixed) Ethernet/IPv4/TCP: ip_buf_appdatalen returns wrong values
https://jira.zephyrproject.org/browse/ZEP-435


RESOLVED JIRA items within last 24 hours: 2
[ZEP-370] (Won't Do) Crash on Arduino101 if fiber is CPU hog
https://jira.zephyrproject.org/browse/ZEP-370

[ZEP-537] (Fixed) doc: create external wiki page "Maintainers"
https://jira.zephyrproject.org/browse/ZEP-537


Re: [RFC] Provide a generic interface for getting the SOC ID and version

Jon Medhurst (Tixy) <tixy@...>
 

On Wed, 2016-07-20 at 15:46 +0100, Morgaine wrote:
2. Alternatively, the developer can create a bespoke query function for
access to target identification, thus allowing a single image to be
programmed into all targets on a given assembly line.
And fail on half of them in weird ways because the heuristics they are
using to match machine type to required code behaviour go wrong. E.g.
they assume something like SOC X implies hardware Y available, but then
someone produces a device with SOC X and without Y. What they really
needed was a way of testing for hardware Y, but if they lack that, or
are lazy, they'll use whatever hacks they can to get the current product
shipped. I guess they will anyway, I'm just suggesting that adding
features to a kernel or OS to make that easier may not be beneficial in
the long run.

This sort of thing seems to crop up quite regularly on Linux lists for
example, and to maintain compatibility with apps, the kernel ends up
having to lie to apps and provide false information, because that's what
apps expect. So, with Zephyr, you might end up with SOC X actually
saying it's SOC Z, because that what gets 'Some Important App' TM
working in it's target market.

This sort of issue has been around forever and I've come across it many
times over many decades. Good code should go:

if feature A available then use feature A
else if feature B available then use feature B
else use sane default or error out.

So, if apps need a test for feature A, why not give them a test for
that? Until those requirements come up, I'd suggest steering clear of
generic device or SOC identification APIs.

Sorry, if that was all a bit rambling.

--
Tixy

6981 - 7000 of 8043