Date   

[RFC]DMA API Update

Liu, Baohong
 

Hi everyone,

Based on the feedbacks, the following is the final format.

Data Structure Definitions
-------

/**
* @brief DMA block configuration structure.
*
* source_address is block starting address at source
* source_gather_interval is the address adjustment at gather boundary
* dest_address is block starting address at destination
* dest_scatter_interval is the address adjustment at scatter boundary
* dest_scatter_count is the continuous transfer count between scatter boundaries
* source_gather_count is the continuous transfer count between gather boundaries
* block_size is the number of bytes to be transferred for this block.
* config is a bit field with the following parts:
* source_gather_en [ 0 ] --0-disable, 1-enable
* dest_scatter_en [ 1 ] --0-disable, 1-enable
* source_addr_adj [ 2 : 3 ] --00-increment, 01-decrement, 10-no change
* dest_addr_adj [ 4 : 5 ] --00-increment, 01-decrement, 10-no change
* source_reload_en [ 6 ] --reload source address at the end of block transfer
* 0-disable, 1-enable
* dest_reload_en [ 7 ] --reload destination address at the end of block transfer
* 0-disable, 1-enable
* fifo_mode_control [ 8 : 11 ] --How full of the fifo before transfer start. HW specific.
* flow_control_mode [ 12 ] --0-source request served upon data availability
* 1-wait until destination request happens
* RESERVED [ 13 : 15 ]
*/
struct dma_block_config {
uint32_t source_address;
uint32_t source_gather_interval;
uint32_t dest_address;
uint32_t dest_scatter_interval;
uint16_t dest_scatter_count;
uint16_t source_gather_count;
uint32_t block_size;
struct dma_block_config *next_block;
uint16_t config;
}

/**
* @brief DMA configuration structure.
*
* config is a bit field with the following parts:
* dma_slot [ 0 : 5 ] --which peripheral and direction(HW specific)
* channel_direction [ 6 : 8 ] --000-memory to memory, 001-memory to peripheral,
* 010-peripheral to memory ...
* complete_int_en [ 9 ] --completion interrupt enable
* 0-disable, 1-enable
* block_int_en [ 10 ] --block completion interrupt enable
* 0-disable, 1-enable
* source_int_en [ 11 ] --source completion interrupt enable
* 0-disable, 1-enable
* dest_int_en [ 12 ] --destination completion interrupt enable
* 0-disable, 1-enable
* error_int_en [ 13 ] --error interrupt enable
* 0-disable, 1-enable
* source_handshake [ 14 ] --0-HW, 1-SW
* dest_handshake [ 15 ] --0-HW, 1-SW
* channel_priority [ 16 : 19 ] --DMA channel priority
* source_chaining_en [ 20 ] --enable/disable source block chaining
* 0-disable, 1-enable
* dest_chaining_en [ 21 ] --enable/disable destination block chaining
* 0-disable, 1-enable
* RESERVED [ 22 : 31 ]
* config_size is a bit field with the following parts:
* source_data_size [ 0 : 7 ] --number of bytes
* dest_data_size [ 8 : 15 ] -- number of bytes
* source_burst_length [ 16 : 23 ] -- number of source data units
* dest_burst_length [ 24 : 31 ] -- number of destination data units
* dma_callback is the callback function pointer
*/
struct dma_config {
uint32_t config;
uint32_t config_size;
uint32_t block_count;
struct dma_block_config *head_block;
void (*dma_callback)(struct device *dev, uint32_t channel, int error_code);
}

API Interfaces
-------

/**
* @brief Configure individual channel for DMA transfer.
*
* @param dev Pointer to the device structure for the driver instance.
* @param channel Numeric identification of the channel to configure
* @param config Data structure containing the intended configuration for the
* selected channel
*
* @retval 0 If successful.
* @retval Negative errno code if failure.
*/
static inline int dma_config(struct device *dev, uint32_t channel,
struct dma_config *config)
{
}

/**
* @brief Enables DMA channel and starts the transfer, the channel must be
* configured beforehand.
*
* @param dev Pointer to the device structure for the driver instance.
* @param channel Numeric identification of the channel where the transfer will
* be processed
*
* @retval 0 If successful.
* @retval Negative errno code if failure.
*/
static inline int dma_start(struct device *dev, uint32_t channel)
{
}

/**
* @brief Stops the DMA transfer and disables the channel.
*
* @param dev Pointer to the device structure for the driver instance.
* @param channel Numeric identification of the channel where the transfer was
* being processed
*
* @retval 0 If successful.
* @retval Negative errno code if failure.
*/
static inline int dma_stop(struct device *dev, uint32_t channel)
{
}

All existing data structure definitions and APIs will be deprecated.

-----Original Message-----
From: Liu, Baohong
Sent: Tuesday, January 10, 2017 6:29 PM
To: 'Liu, Baohong' <baohong.liu(a)intel.com>
Subject: [RFC]DMA API Update

Hi everyone,

I would like to propose the update for DMA API.
(https://jira.zephyrproject.org/browse/ZEP-873).

Known Problems.
--------

Structure dma_channel_config consists of quite a few variables of enum type,
two callback pointers, and one callback data pointer.

- The enums can be collapsed into a bit field.
This will reduce the size of the data structure.

- The two callback pointers (for normal and error cases) can be combined.
One new callback parameter will be used to return error code.

- Callback data pointer will be removed.
Currently, this field actually holds user data. So, it can be moved to driver
data
structure. The callback function can dig out the information from dev
pointer and
channel id passed to the callback function.

Proposed Solution
--------

-- The following are the enums we have now.

handshake_interface /* which peripheral and direction*/
hankshake_polarity /* high or low*/
channel_direction /* memory to memory, memory to peripheral ... *.
Source_transfer_width /* source data size */
Destination_transfer_width /* destination data size */
Source_burst_length /* source burst length */
Destination_burst_length /* destination burst length */

All these will be collapsed into a bit field.

Besides the above, three new items will be added into the bit field.
source_handshake /* HW or SW */
dest_handshake /* HW or SW */
channel_priority /* DMA channel priority */

-- For the callback function, there will be three parameters. They are device
pointer, channel_id, and error code. As said above, the error callback will be
removed.

-- The callback_data pointer will be removed.

Final API Format
--------

/**
* @brief DMA configuration structure.
*
* config is a bit field with the following parts:
* handshake_interface [ 0 : 3 ] --which peripheral and
direction(HW specific)
* hankshake_polarity [ 4 ] --high or low
* channel_direction [ 5 : 7 ] --0-memory to memory, 1-
memory to peripheral,
* 2-peripheral to memory
* source_transfer_width [ 8 : 10 ] --source data size(8,16,32,64,128
and 256 bits)
* dest_transfer_width [ 11 : 13 ] --destination data
size(8,16,32,64,128 and 256 bits)
* source_burst_length [ 14 : 16 ] --source burst
length(1,4,8,16,32,64,128 and 256)
* dest_burst_length [ 17 : 19 ] -- destination burst
length(1,4,8,16,32,64,128 and 256)
* source_handshake [ 20 ] --HW or SW
* dest_handshake [ 21 ] --HW or SW
* channel_priority [ 22 : 24 ] --DMA channel priority
* RESERVED [ 25 : 31 ]
* dma_callback is the callback function pointer
*/
struct dma_channel_config {
uint32_t config;
void (*dma_callback)(struct device *dev, uint32_t channel, int
error_code); }

The remaining parts will stay the same.
No change to the structure dma_transfer_config.
No change to the API calls:
dma_channel_config(...)
dma_transfer_config(...)
dma_transfer_start(...)
dma_transfer_stop(...)

Suggestions and comments are welcome.


Re: "/samples/net/coap_server" example is not working on "nrf52_pca10040" board

Carles Cufi
 

Hi Raju,

-----Original Message-----
From: Appala Raju [mailto:raju.ga(a)gmail.com]
Sent: Monday, January 23, 2017 18:39
To: devel(a)lists.zephyrproject.org
Subject: [devel] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re:
"/samples/net/coap_server" example is not working on "nrf52_pca10040"
board

As per this post "https://devzone.nordicsemi.com/question/6566/how-to-
get-6-byte-mac-address-at-nrf51822/" we can have unique Mac address but
it seems this is not mapped in this OS properly. Can we implement the
same.
I'll try to send a patch to read the FICR address in the nRF5x. But even then remember that you will end up with a *random static* address, since the Nordic nRF5x ICs do not come with a public address by default. That said, it will be the same random static address every time you boot.

Regards,

Carles


Re: "/samples/net/coap_server" example is not working on "nrf52_pca10040" board

Johan Hedberg
 

Hi,

On Mon, Jan 23, 2017, Appala Raju wrote:
As per this post
"https://devzone.nordicsemi.com/question/6566/how-to-get-6-byte-mac-address-at-nrf51822/"
we can have unique Mac address but it seems this is not mapped in this
OS properly. Can we implement the same.
That's indeed a good idea. If someone wants to pick up the task, I think
following would probably be the appropriate location:

--- a/subsys/bluetooth/host/hci_core.c
+++ b/subsys/bluetooth/host/hci_core.c
@@ -3285,6 +3285,10 @@ static int set_static_addr(void)
}
}

+ if (IS_ENABLED(CONFIG_SOC_FAMILY_NRF5)) {
+ /* Read address from nRF5-specific storage */
+ }
+
BT_DBG("Generating new static random address");

err = bt_addr_le_create_static(&bt_dev.id_addr);

Johan


Re: "/samples/net/coap_server" example is not working on "nrf52_pca10040" board

Appala Raju <raju.ga@...>
 

As per this post "https://devzone.nordicsemi.com/question/6566/how-to-get-6-byte-mac-address-at-nrf51822/" we can have unique Mac address but it seems this is not mapped in this OS properly. Can we implement the same.

Thanks,
Raju


Re: How to overcome timer delay

Benjamin Walsh <benjamin.walsh@...>
 

Hi Kien,

I’m developing an app which requires fast sampling rate (~500 times
per sec) via the ADC on the Arduino 101. It was alright using
nano_timer_init/start/test APIs up version 1.5. However, after
upgrading to version 1.6, noticeable time delay has been observed. To
remove possible effects from other drivers, I’ve used the following
code to test the time delay and got the below results.

It seems that the amount of delay is inversely proportional to the
interval. For interval = 1000 ms, the delay is just 10 ms. But for
interval as high as 10 ms, the delay becomes 1000 ms, making it
impossible to use for high sampling rate app. Is there any Kconfig
needs to be set or any way to minimize such delay?
When we changed the new API to take ms instead of kernel ticks for
timeouts, we also decided the timeouts mean "wait for at least this
time" instead of "wait for at most this time".

The system is still tick-based though. So we convert ms to ticks
internally.

If you want to wait "at most" an amount of time, you have to ask for
one tick less. So if you know your tick rate is 100Hz, and you want to
wait at most 20ms, you have to ask for 10ms (that would give you two
ticks).

Now, you say your sampling rate is 500Hz: however, the default tick rate
is 100Hz. You have to change CONFIG_SYS_CLOCK_TICKS_PER_SEC to 500.
However (again), since with a tick freq of 500Hz, if you wait for 2ms
you'll wait for "at least" 2ms, you might wait for 4ms. So what you
probably want is a CONFIG_SYS_CLOCK_TICKS_PER_SEC of 1000, and wait for
1ms, which will make you wait at most for 2ms.

I'm starting to wonder if we should have macros for this in the API,
e.g. AT_MOST()/AT_LEAST(), where you could do:

k_timer_start(&my_timer, AT_MOST(INTERVAL), 0);

This is all because the kernel is still tick-based. We would like to
move to a tickless kernel, where these would not be an issue anymore.

=====

#include <zephyr.h>
#include <misc/printk.h>

#define INTERVAL 1

static int count;
static int t;

void timer_handler(struct k_timer *a_timer)
{
count += INTERVAL;
if (count % 1000 == 0) {
printk("Count %d, delta = %d\n", count,
k_uptime_get_32() - t);
t = k_uptime_get_32();
}
}

void main(void)
{
struct k_timer my_timer;

printk("Hello World! %s\n", CONFIG_ARCH);
k_timer_init(&my_timer, timer_handler, NULL);
t = k_uptime_get_32();
while (1) {
k_timer_start(&my_timer, INTERVAL, K_FOREVER);
^^^^^^^^^
You cannot use K_FOREVER in this API: if you do not want periodic
repetition, you have to use 0.

I'm surprised this did not blow up. Actually, if you ran with
CONFIG_ASSERT=y, you would have hit the one at the top of
_add_timeout():

__ASSERT(timeout_in_ticks > 0, "");

k_timer_status_sync(&my_timer);
}
}
====

I got the same following outputs for both x86 qemu and Arduino 101 (x86):

* INTERVAL = 1000 (one second)
Count 1000, delta = 1010
Count 2000, delta = 1010
Count 3000, delta = 1010


* INTERVAL = 100 (one hundred millisecs)
Count 1000, delta = 1100
Count 2000, delta = 1100
Count 3000, delta = 1100


* INTERVAL = 10 (ten millisecs)
Count 1000, delta = 2000
Count 2000, delta = 2000
Count 3000, delta = 2000


* INTERVAL = 1 (one millisec)
Count 1000, delta = 20000
Count 2000, delta = 20000
Count 3000, delta = 20000
You're getting these numbers because your tick rate is probably 100.
With 1000 you would probably get:

* INTERVAL = 1000 (one second)
Count 1000, delta = 1001
Count 2000, delta = 1001
Count 3000, delta = 1001


* INTERVAL = 100 (one hundred millisecs)
Count 1000, delta = 1010
Count 2000, delta = 1010
Count 3000, delta = 1010


* INTERVAL = 10 (ten millisecs)
Count 1000, delta = 1100
Count 2000, delta = 1100
Count 3000, delta = 1100


* INTERVAL = 1 (one millisec)
Count 1000, delta = 2000
Count 2000, delta = 2000
Count 3000, delta = 2000

Cheers,
Ben



Thanks,
Kien
--
Benjamin Walsh, SMTS
WR VxWorks Virtualization Profile
www.windriver.com
Zephyr kernel maintainer
www.zephyrproject.org


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 2
[ZEP-1624] GPIO: Interrupt fails to work after resume from deepsleep @ARC
https://jira.zephyrproject.org/browse/ZEP-1624

[ZEP-1626] SPI: spi cannot work in CPHA mode @ ARC
https://jira.zephyrproject.org/browse/ZEP-1626


UPDATED JIRA items within last 24 hours: 4
[ZEP-1566] WDT: Interrupt is triggered multiple times @ARC
https://jira.zephyrproject.org/browse/ZEP-1566

[ZEP-1545] AON Counter : ISR triggered twice on ARC
https://jira.zephyrproject.org/browse/ZEP-1545

[ZEP-1625] tests/gpio: test case won't judge GPIO_INT_LEVEL
https://jira.zephyrproject.org/browse/ZEP-1625

[ZEP-1592] echo-server does not build with newlib
https://jira.zephyrproject.org/browse/ZEP-1592


CLOSED JIRA items within last 24 hours: 0

RESOLVED JIRA items within last 24 hours: 0


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/10345 : i2c/nrf5: Implement NRF5 I2C driver.
- https://gerrit.zephyrproject.org/r/10344 : i2c: Sort Makefile in alphabetical order.
- https://gerrit.zephyrproject.org/r/10341 : net: tests: Use lighter printk() instead of printf()
- https://gerrit.zephyrproject.org/r/10347 : net: samples: Fix config option
- https://gerrit.zephyrproject.org/r/10340 : net: samples: Use lighter printk() instead of printf()
- https://gerrit.zephyrproject.org/r/10346 : boards/bbc_microbit: Enable and configure default I2C_NRF if I2C is enabled.
- https://gerrit.zephyrproject.org/r/10338 : net: Use lighter printk() instead of printf()
- https://gerrit.zephyrproject.org/r/10339 : net: Fix 80 line character limit
- https://gerrit.zephyrproject.org/r/10337 : net: tests: Fix invalid config option
- https://gerrit.zephyrproject.org/r/10335 : tests/gpio: don't call risk function
- https://gerrit.zephyrproject.org/r/10333 : test_mbedtls: for testing Port AES-CMAC-PRF-128 library
- https://gerrit.zephyrproject.org/r/10334 : tests: kernel: msgq: fix unused value
- https://gerrit.zephyrproject.org/r/10332 : build: add _ASMLANGUAGE to all asm files
- https://gerrit.zephyrproject.org/r/10328 : kernel: rename thread states symbols
- https://gerrit.zephyrproject.org/r/10329 : kernel: move K_ESSENTIAL from thread_state to execution_flags
- https://gerrit.zephyrproject.org/r/10330 : kernel/x86: move INT_ACTIVE/EXC_ACTIVE to thread_state
- https://gerrit.zephyrproject.org/r/10331 : kernel/arch: streamline thread user options
- https://gerrit.zephyrproject.org/r/10326 : kernel: include kernel.h in kernel_structs.h in asm files
- https://gerrit.zephyrproject.org/r/10325 : kernel: move volatile from k_thread.prio to k_thread.sched_locked
- https://gerrit.zephyrproject.org/r/10327 : kernel: remove K_STATIC
- https://gerrit.zephyrproject.org/r/10321 : Xtensa port: Added Kbuild file for Xtensa arch.
- https://gerrit.zephyrproject.org/r/10318 : Xtensa port: Added support for Xtensa architecture in zephyr include files.
- https://gerrit.zephyrproject.org/r/10322 : Xtensa port: Added Xtensa specific include files.
- https://gerrit.zephyrproject.org/r/10324 : Xtensa core: Added placeholder for core specific C code.
- https://gerrit.zephyrproject.org/r/10323 : Xtensa port: Added linker script for several Xtensa cores.
- https://gerrit.zephyrproject.org/r/10320 : Xtensa port: Added Xtensa specific C files.
- https://gerrit.zephyrproject.org/r/10319 : Xtensa port: Added Xtensa specific assembly files.

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/6384 : stm32lx: spi add SPI driver for STM32Lx family
- https://gerrit.zephyrproject.org/r/10224 : arm: cortex-m: Implement CONFIG_TEXT_SECTION_OFFSET
- https://gerrit.zephyrproject.org/r/8759 : samples/drivers: Add Counters example
- https://gerrit.zephyrproject.org/r/9036 : counter: cmsdk: Add Dualtimer as a Timer
- https://gerrit.zephyrproject.org/r/9001 : counter: cmsdk: Add Timer 0 and 1 as Timers
- https://gerrit.zephyrproject.org/r/10211 : samples: net: Add IRC bot example
- https://gerrit.zephyrproject.org/r/9807 : drivers: ieee802154: add MCR20A driver
- https://gerrit.zephyrproject.org/r/9030 : counter: cmsdk: Add clock control to TMR Counters.
- https://gerrit.zephyrproject.org/r/10282 : counter: cmsdk: Add common interface
- https://gerrit.zephyrproject.org/r/10278 : boards: arm: Add board for MPS2 with AN383
- https://gerrit.zephyrproject.org/r/10277 : arm: soc: Add SoC series for ARM's Cortex-M Prototyping System (MPS2)
- https://gerrit.zephyrproject.org/r/9373 : Bluetooth: AVDTP: Add AVDTP Discover API Prototype
- https://gerrit.zephyrproject.org/r/9806 : boards: frdm_k64f: add pinmux settings for MCR20A
- https://gerrit.zephyrproject.org/r/9805 : ext: mcux: add MCR20Overwrites.h
- https://gerrit.zephyrproject.org/r/9809 : samples: ieee802154: add MCR20A
- https://gerrit.zephyrproject.org/r/10281 : samples: net: add configs for MCR20A
- https://gerrit.zephyrproject.org/r/10307 : stm32f4 - add configuration option to set flash latency
- https://gerrit.zephyrproject.org/r/9230 : gpio/nrf5: Support drive strength configuration.
- https://gerrit.zephyrproject.org/r/9229 : gpio: Support drive strength configuration.
- https://gerrit.zephyrproject.org/r/10249 : samples/coaps_server CoAP over DTLS server example app using mbedTLS
- https://gerrit.zephyrproject.org/r/10304 : Bluetooth: Move Bluetooth docs to rst
- https://gerrit.zephyrproject.org/r/10084 : net: buf: Introduce net_buf_save/restore APIs
- https://gerrit.zephyrproject.org/r/10106 : samples: net: Add DHCPv4 sample application README file
- https://gerrit.zephyrproject.org/r/9716 : Bluetooth: SDP: Use SupportedFeature attr API in BTshell
- https://gerrit.zephyrproject.org/r/9356 : quark_se: PM: Add multicore support
- https://gerrit.zephyrproject.org/r/9336 : tests: spi: Add support for SPI_K64

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/10343 : boards:arm: Provide debug option on some boards
- https://gerrit.zephyrproject.org/r/10348 : docs: sensor: update included example code
- https://gerrit.zephyrproject.org/r/10336 : net: Set default NET_NBUF_RX_COUNT to 4.
- https://gerrit.zephyrproject.org/r/10270 : wpan_serial: Queue only full packet to RX queue
- https://gerrit.zephyrproject.org/r/10132 : samples/zoap_server: Also listen on the unicast address
- https://gerrit.zephyrproject.org/r/10303 : samples/zoap: Update zoap samples documentation
- https://gerrit.zephyrproject.org/r/10305 : license: use SPDX identifier for files in ext/


Re: "/samples/net/coap_server" example is not working on "nrf52_pca10040" board

Luiz Augusto von Dentz
 

Hi,

There could be 2 reasons why you end up with a random address, either
you are setting CONFIG_BLUETOOTH_PRIVACY or the adapter don't have a
valid address (e.g. 00:00:00:00:00:00) which will cause the stack to
generate a static random address, for the former you just need to
disable privacy but in case of the later you need to check with the
manufacturer if it can provide a public address or in case it is a
qemu + btproxy setup just try another USB dongle.

On Sun, Jan 22, 2017 at 5:55 PM, Appala Raju <raju.ga(a)gmail.com> wrote:
Hi Luiz Augusto von Dentz,

Yes, I am able to connect by passing 2 after address. How can I go with static address by using device Mac ID instead of random address.

Thanks,
Raju
--
Luiz Augusto von Dentz


How to overcome timer delay

Dinh, Kien T
 

Hi,

I’m developing an app which requires fast sampling rate (~500 times per sec) via the ADC on the Arduino 101. It was alright using nano_timer_init/start/test APIs up version 1.5. However, after upgrading to version 1.6, noticeable time delay has been observed. To remove possible effects from other drivers, I’ve used the following code to test the time delay and got the below results.

It seems that the amount of delay is inversely proportional to the interval. For interval = 1000 ms, the delay is just 10 ms. But for interval as high as 10 ms, the delay becomes 1000 ms, making it impossible to use for high sampling rate app. Is there any Kconfig needs to be set or any way to minimize such delay?

=====

#include <zephyr.h>
#include <misc/printk.h>

#define INTERVAL 1

static int count;
static int t;

void timer_handler(struct k_timer *a_timer)
{
count += INTERVAL;
if (count % 1000 == 0) {
printk("Count %d, delta = %d\n", count,
k_uptime_get_32() - t);
t = k_uptime_get_32();
}
}

void main(void)
{
struct k_timer my_timer;

printk("Hello World! %s\n", CONFIG_ARCH);
k_timer_init(&my_timer, timer_handler, NULL);
t = k_uptime_get_32();
while (1) {
k_timer_start(&my_timer, INTERVAL, K_FOREVER);
k_timer_status_sync(&my_timer);
}
}
====

I got the same following outputs for both x86 qemu and Arduino 101 (x86):

* INTERVAL = 1000 (one second)
Count 1000, delta = 1010
Count 2000, delta = 1010
Count 3000, delta = 1010


* INTERVAL = 100 (one hundred millisecs)
Count 1000, delta = 1100
Count 2000, delta = 1100
Count 3000, delta = 1100


* INTERVAL = 10 (ten millisecs)
Count 1000, delta = 2000
Count 2000, delta = 2000
Count 3000, delta = 2000


* INTERVAL = 1 (one millisec)
Count 1000, delta = 20000
Count 2000, delta = 20000
Count 3000, delta = 20000


Thanks,
Kien


Mailing list: Please remove

Jason Rotella <jrotella@...>
 

Please remove me from this mailing list for the time being.

Thank you,
Jason


Re: "/samples/net/coap_server" example is not working on "nrf52_pca10040" board

Appala Raju <raju.ga@...>
 

Hi Luiz Augusto von Dentz,

Yes, I am able to connect by passing 2 after address. How can I go with static address by using device Mac ID instead of random address.

Thanks,
Raju


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 6
[ZEP-1620] Concise Binary Object Representation (CBOR)
https://jira.zephyrproject.org/browse/ZEP-1620

[ZEP-1621] Stack Monitoring
https://jira.zephyrproject.org/browse/ZEP-1621

[ZEP-1619] Default value of NET_NBUF_RX_COUNT is too low, causes lock up on startup
https://jira.zephyrproject.org/browse/ZEP-1619

[ZEP-1623] (Parts) of Networking docs still refer to 1.5 world model (with fibers and tasks) and otherwise not up to date
https://jira.zephyrproject.org/browse/ZEP-1623

[ZEP-1618] Error in device initialization discarded
https://jira.zephyrproject.org/browse/ZEP-1618

[ZEP-1622] I2C problem Zephyr OS sensor example on NRF51 and F401re
https://jira.zephyrproject.org/browse/ZEP-1622


UPDATED JIRA items within last 24 hours: 12
[ZEP-1466] Memory Protection Unit Support
https://jira.zephyrproject.org/browse/ZEP-1466

[ZEP-1597] no good way to include library code outside of $(PROJECT_BASE)
https://jira.zephyrproject.org/browse/ZEP-1597

[ZEP-1461] Add zephyr support to openocd upstream
https://jira.zephyrproject.org/browse/ZEP-1461

[ZEP-948] Revisit the timeslicing algorithm
https://jira.zephyrproject.org/browse/ZEP-948

[ZEP-1538] Convert documentation of zoap samples to RST
https://jira.zephyrproject.org/browse/ZEP-1538

[ZEP-1601] Console over Telnet
https://jira.zephyrproject.org/browse/ZEP-1601

[ZEP-1463] Add Zephyr Support in segger SystemView
https://jira.zephyrproject.org/browse/ZEP-1463

[ZEP-1599] printk() support for the '-' indicator in format string (left justifier)
https://jira.zephyrproject.org/browse/ZEP-1599

[ZEP-1563] move board documenation for NRF51/NRF52 back to git tree
https://jira.zephyrproject.org/browse/ZEP-1563

[ZEP-1028] shrink k_block struct size
https://jira.zephyrproject.org/browse/ZEP-1028

[ZEP-1495] Networking API details documentation is missing
https://jira.zephyrproject.org/browse/ZEP-1495

[ZEP-1592] echo-server does not build with newlib
https://jira.zephyrproject.org/browse/ZEP-1592


CLOSED JIRA items within last 24 hours: 1
[ZEP-1147] (Won't Do) tests/bluetooth/: remove build_only so it can be run in HW
https://jira.zephyrproject.org/browse/ZEP-1147


RESOLVED JIRA items within last 24 hours: 0


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/10314 : tests/gpio: fix test GPIO_INT_LEVEL bug
- https://gerrit.zephyrproject.org/r/10317 : tests: kernel: mbox_api: fix uninit variable and unchecked value
- https://gerrit.zephyrproject.org/r/10316 : tests: kernel: mpool: fix assert side effect
- https://gerrit.zephyrproject.org/r/10315 : tests: kernel: mpool: fix unchecked return value
- https://gerrit.zephyrproject.org/r/10313 : doc: nios2 altera max 10 board documentation
- https://gerrit.zephyrproject.org/r/10312 : docs: add Arduino 101 board documentation
- https://gerrit.zephyrproject.org/r/10311 : tests: kernel: threads_customdata: increase STACK_SIZE to 512 for riscv32
- https://gerrit.zephyrproject.org/r/10310 : tests: kernel: test_mpool_concept: increase STACK_SIZE to 1024 for riscv32

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/10211 : samples: net: Add IRC bot example
- https://gerrit.zephyrproject.org/r/9947 : tests/pwm: add PINMUX config for D2000 board
- https://gerrit.zephyrproject.org/r/10140 : tests/gpio: enable gpio cases to run on more platforms
- https://gerrit.zephyrproject.org/r/10304 : Bluetooth: Move Bluetooth docs to rst
- https://gerrit.zephyrproject.org/r/10281 : samples: net: add configs for MCR20A

MERGED within last 24 hours:


Re: Networking-with-Qemu wiki page updated

Paul Sokolovsky
 

Hello Anas,

On Fri, 20 Jan 2017 09:24:52 -0500
Anas Nashif <nashif(a)gmail.com> wrote:

Paul,

Thank you for the update.

Maybe it makes sense to move this to the source tree and have it as
part of the documentation alongside the samples. This way the
information for older versions will always be available. There will
always be users of released versions.
Given that it appears to be the current approach (move docs from wiki
to git), I guess it makes sense to do that eventually. I'm just not
sure when, or that it all should be done at once (moving board docs
to git might be enough for 1.7). In either case, there're more
important things to do for Networking docs for now, e.g.
https://jira.zephyrproject.org/browse/ZEP-1623 ,
https://jira.zephyrproject.org/browse/ZEP-1495 .


Anas

On Fri, Jan 20, 2017 at 8:46 AM, Paul Sokolovsky
<paul.sokolovsky(a)linaro.org
wrote:
Hello,

This is just a background notice that the page
https://wiki.zephyrproject.org/view/Networking-with-Qemu , which
previously contained information for 1.6 and earlier, was updated
for the master branch status (i.e. 1.7-pre). This page is also
linked from the official docs at
https://www.zephyrproject.org/doc/samples/net/qemu_setup.html , so
is a kind of motion towards updating the docs for 1.7.

The page itself tries to provide a bit more detailed walkthru on
setting up IP networking test environment using QEMU, than the
reference Zephyr docs, and provide more hints/caveats, to make the
process easy even for Zephyr newcomers.

I also post about it at this time with the outlook that Zephyr moves
towards 1.7 freeze, and it would be really great if in 1.7 we
finally had the robustly working native IP stack. So, everyone
interested is welcome to test it using the instructions above and
update status/submit new issues at:
https://jira.zephyrproject.org/issues/?jql=project+%3D+
ZEP+AND+component+%3D+%22Networking+%2F+IP+Stack%22

--
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


--
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


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 11
[ZEP-1607] Json encoding/decoding library
https://jira.zephyrproject.org/browse/ZEP-1607

[ZEP-1608] XML encoding/decoding library
https://jira.zephyrproject.org/browse/ZEP-1608

[ZEP-1604] Asymmetric multiprocessing (AMP)
https://jira.zephyrproject.org/browse/ZEP-1604

[ZEP-1603] Symmetric multiprocessing (SMP)
https://jira.zephyrproject.org/browse/ZEP-1603

[ZEP-1605] Improve Multi Core support
https://jira.zephyrproject.org/browse/ZEP-1605

[ZEP-1613] tune ARC compiler options for __attribute__((interrupt))
https://jira.zephyrproject.org/browse/ZEP-1613

[ZEP-1602] IPv6 ping fails using sample application echo_server on FRDM-K64F
https://jira.zephyrproject.org/browse/ZEP-1602

[ZEP-1617] mbedTLS server/client failing to run on qemu
https://jira.zephyrproject.org/browse/ZEP-1617

[ZEP-1616] Mix up between "network address" and "socket address" concepts in declaration of net_addr_pton()
https://jira.zephyrproject.org/browse/ZEP-1616

[ZEP-1614] Use correct i2c device driver name
https://jira.zephyrproject.org/browse/ZEP-1614

[ZEP-1611] Hardfault after a few echo requests (IPv6 over BLE)
https://jira.zephyrproject.org/browse/ZEP-1611


UPDATED JIRA items within last 24 hours: 16
[ZEP-827] HTTP Client sample application
https://jira.zephyrproject.org/browse/ZEP-827

[ZEP-1550] CI: replace zephyr-verify with run_phases from https://gerrit.zephyrproject.org/r/#/c/9762/
https://jira.zephyrproject.org/browse/ZEP-1550

[ZEP-1553] Integrate SDK 0.9 into CI
https://jira.zephyrproject.org/browse/ZEP-1553

[ZEP-1038] Hard real-time interrupt support
https://jira.zephyrproject.org/browse/ZEP-1038

[ZEP-1103] Propose and implement synchronization flow for multicore power management
https://jira.zephyrproject.org/browse/ZEP-1103

[ZEP-873] DMA API Update
https://jira.zephyrproject.org/browse/ZEP-873

[ZEP-749] TinyCrypt uses an old, unoptimized version of micro-ecc
https://jira.zephyrproject.org/browse/ZEP-749

[ZEP-854] CoAP with DTLS sample
https://jira.zephyrproject.org/browse/ZEP-854

[ZEP-1539] Create documentation in RST for all networking samples
https://jira.zephyrproject.org/browse/ZEP-1539

[ZEP-1540] Convert Bluetooth samples to RST
https://jira.zephyrproject.org/browse/ZEP-1540

[ZEP-1537] Convert documentation of power management samples to RST
https://jira.zephyrproject.org/browse/ZEP-1537

[ZEP-1543] HTTP Server sample with basic authentication
https://jira.zephyrproject.org/browse/ZEP-1543

[ZEP-1542] Multi Sessions HTTP Server sample
https://jira.zephyrproject.org/browse/ZEP-1542

[ZEP-1615] Add support for DAC (Digital to Analog Converter) drivers
https://jira.zephyrproject.org/browse/ZEP-1615

[ZEP-1413] [ARC] test/legacy/kernel/test_tickless/microkernel fails to build
https://jira.zephyrproject.org/browse/ZEP-1413

[ZEP-472] Ethernet packets are getting missed if sent in quick succession.
https://jira.zephyrproject.org/browse/ZEP-472


CLOSED JIRA items within last 24 hours: 11
[ZEP-1109] (Fixed) Texas Instruments CC3200 LaunchXL Support
https://jira.zephyrproject.org/browse/ZEP-1109

[ZEP-521] (Fixed) ARM - add choice to floating point ABI selection
https://jira.zephyrproject.org/browse/ZEP-521

[ZEP-1032] (Fixed) IPSP router role support
https://jira.zephyrproject.org/browse/ZEP-1032

[ZEP-744] (Fixed) USB WebUSB
https://jira.zephyrproject.org/browse/ZEP-744

[ZEP-955] (Fixed) Section misalignment
https://jira.zephyrproject.org/browse/ZEP-955

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

[ZEP-711] (Cannot Reproduce) I2c: fails to write with mode fast plus
https://jira.zephyrproject.org/browse/ZEP-711

[ZEP-1569] (Fixed) net/tcp: TCP in server mode doesn't support multiple concurrent connections
https://jira.zephyrproject.org/browse/ZEP-1569

[ZEP-1583] (Fixed) ARC: warning: unmet direct dependencies (SOC_RISCV32_PULPINO || SOC_RISCV32_QEMU)
https://jira.zephyrproject.org/browse/ZEP-1583

[ZEP-1596] (Duplicate) echo_server can accept only one TCP connection, locks up network stack afterwards
https://jira.zephyrproject.org/browse/ZEP-1596

[ZEP-1584] (Cannot Reproduce) Fail to connect IPSP node on Arduino101
https://jira.zephyrproject.org/browse/ZEP-1584


RESOLVED JIRA items within last 24 hours: 0


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/10309 : boards: arduino 101: set user LED values correctly
- https://gerrit.zephyrproject.org/r/10308 : net: Set default NET_NBUF_RX_COUNT to 4.
- https://gerrit.zephyrproject.org/r/10299 : tests: threads: disable riscv32 for now
- https://gerrit.zephyrproject.org/r/10307 : stm32f4 - add configuration option to set flash latency
- https://gerrit.zephyrproject.org/r/10306 : Add support for the STM32F405xG microcontroller
- https://gerrit.zephyrproject.org/r/10304 : Bluetooth: Move Bluetooth docs to rst
- https://gerrit.zephyrproject.org/r/10303 : samples/zoap: Update zoap samples documentation
- https://gerrit.zephyrproject.org/r/10305 : license: use SPDX identifier for files in ext/
- https://gerrit.zephyrproject.org/r/10295 : MAINTAINERS: add xtensa arch
- https://gerrit.zephyrproject.org/r/10300 : filter-known-issues: add warning support, clean up, add more help
- https://gerrit.zephyrproject.org/r/10276 : sensor: fxos8700: expand trigger requirement to include pulse config
- https://gerrit.zephyrproject.org/r/10292 : drivers: Add DAC driver infrastructure
- https://gerrit.zephyrproject.org/r/10290 : drivers: Add Atmel SAM DMA (XDMAC) driver
- https://gerrit.zephyrproject.org/r/10291 : drivers: Add Atmel SAM Timer Counter (TC) driver
- https://gerrit.zephyrproject.org/r/10293 : DONT MERGE drivers: Add DAC driver API
- https://gerrit.zephyrproject.org/r/10287 : Xtensa port: Added support for Xtensa cores in toolchain/gcc.h.
- https://gerrit.zephyrproject.org/r/10288 : Xtensa port: Added fields offset support for kernel and thread structures.
- https://gerrit.zephyrproject.org/r/10286 : Xtensa port: Added support in arch/cpu.h for Xtensa cores.
- https://gerrit.zephyrproject.org/r/10294 : drivers: Add Atmel SAM DAC (DACC) driver
- https://gerrit.zephyrproject.org/r/10285 : Xtensa port: Fixed typo in XCC toochain specific make file.
- https://gerrit.zephyrproject.org/r/10278 : boards: arm: Add board for MPS2 with AN383
- https://gerrit.zephyrproject.org/r/10277 : arm: soc: Add SoC series for ARM's Cortex-M Prototyping System (MPS2)
- https://gerrit.zephyrproject.org/r/10282 : counter: cmsdk: Add common interface
- https://gerrit.zephyrproject.org/r/10281 : sambles: net: add configs for MCR20A
- https://gerrit.zephyrproject.org/r/10279 : boards: 96b_carbon: Add LED definitions
- https://gerrit.zephyrproject.org/r/10280 : boards: 96b_nitrogen: Add button and LED definitions

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/5028 : boards: Add Atmel SAM E70 Xplained board support
- https://gerrit.zephyrproject.org/r/10176 : Add support for STM32Cube HAL_PCD USB driver
- https://gerrit.zephyrproject.org/r/10175 : cdc_acm - Use endpoint 2 instead of endpoint 4 for IN BULK endpoint
- https://gerrit.zephyrproject.org/r/10249 : samples/coaps_server CoAP over DTLS server example app using mbedTLS
- https://gerrit.zephyrproject.org/r/10257 : samples: grove: use correct i2c device driver name
- https://gerrit.zephyrproject.org/r/9356 : quark_se: PM: Add multicore support
- https://gerrit.zephyrproject.org/r/10244 : doc: update MAINTAINERS for .rst files
- https://gerrit.zephyrproject.org/r/10106 : samples: net: Add DHCPv4 sample application README file
- https://gerrit.zephyrproject.org/r/10183 : irq: introduce 'direct' interrupt API definition
- https://gerrit.zephyrproject.org/r/10133 : Windows Build: ussing a precompiled kbuild on windows
- https://gerrit.zephyrproject.org/r/10093 : samples/net/http: Add the server sample application
- https://gerrit.zephyrproject.org/r/6128 : drivers: Add basic Atmel SAM USART driver
- https://gerrit.zephyrproject.org/r/9762 : RFC: CI: rearchitect with a framework that orchestrates running
- https://gerrit.zephyrproject.org/r/9093 : sanitycheck: add support for risc v boards
- https://gerrit.zephyrproject.org/r/5027 : arch: Add Atmel SAM E70 SoC support
- https://gerrit.zephyrproject.org/r/6127 : arch: Add pmc, gpio internal Atmel SAM drivers
- https://gerrit.zephyrproject.org/r/6662 : ext: Add Atmel SAM3X header files from Atmel ASF library
- https://gerrit.zephyrproject.org/r/9516 : drivers: Add Atmel SAM family GMAC Ethernet driver
- https://gerrit.zephyrproject.org/r/9517 : samples: net: echo_server .conf for Atmel SMART SAM E70 Xplained board
- https://gerrit.zephyrproject.org/r/9515 : arch: Add support for Atmel SAM E70 SoC configuration at boot
- https://gerrit.zephyrproject.org/r/10192 : x86: implement direct interrupts
- https://gerrit.zephyrproject.org/r/5025 : ext: Add Atmel SAM E70 header files from Atmel ASF library
- https://gerrit.zephyrproject.org/r/9716 : Bluetooth: SDP: Use SupportedFeature attr API in BTshell
- https://gerrit.zephyrproject.org/r/5137 : DONT_MERGE: - add changes to two different branches
- https://gerrit.zephyrproject.org/r/10141 : tests: fix invoke k_timer_stop issue inside timeout expiry_fn
- https://gerrit.zephyrproject.org/r/10132 : samples/zoap_server: Also listen on the unicast address
- https://gerrit.zephyrproject.org/r/9002 : board: v2m_beetle: Update defconfig
- https://gerrit.zephyrproject.org/r/9036 : counter: cmsdk: Add Dualtimer as a Timer
- https://gerrit.zephyrproject.org/r/9000 : soc: arm: beetle: Add Timers IRQ map
- https://gerrit.zephyrproject.org/r/9030 : counter: cmsdk: Add clock control to TMR Counters.
- https://gerrit.zephyrproject.org/r/9001 : counter: cmsdk: Add Timer 0 and 1 as Timers
- https://gerrit.zephyrproject.org/r/8759 : samples/drivers: Add Counters example
- https://gerrit.zephyrproject.org/r/9031 : counter: cmsdk: Add DualTimer as Counter
- https://gerrit.zephyrproject.org/r/9806 : boards: frdm_k64f: add pinmux settings for MCR20A
- https://gerrit.zephyrproject.org/r/9807 : drivers: ieee802154: add MCR20A driver
- https://gerrit.zephyrproject.org/r/9805 : ext: mcux: add MCR20Overwrites.h
- https://gerrit.zephyrproject.org/r/9809 : samples: ieee802154: add MCR20A
- https://gerrit.zephyrproject.org/r/9985 : spi: Introduce new mcux shim driver
- https://gerrit.zephyrproject.org/r/9986 : k64: Change the default spi driver to the mcux shim
- https://gerrit.zephyrproject.org/r/9984 : spi: Add shared default configs
- https://gerrit.zephyrproject.org/r/8942 : boards: stm32f4x: Enable Flash driver
- https://gerrit.zephyrproject.org/r/6384 : stm32lx: spi add SPI driver for STM32Lx family

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/10289 : tests: update to Apache 2.0 SPDX tags on new tests
- https://gerrit.zephyrproject.org/r/10302 : doc: fix .rst files canonical heading order
- https://gerrit.zephyrproject.org/r/10298 : sdk: use 0.9 SDK for now
- https://gerrit.zephyrproject.org/r/10297 : Revert "sanity: switch sdk depending on branch"
- https://gerrit.zephyrproject.org/r/10227 : Makefile.toolchain.zephyr: Modifications for SDK 0.9
- https://gerrit.zephyrproject.org/r/10228 : arc: add -fno-delete-null-pointer-checks
- https://gerrit.zephyrproject.org/r/10229 : Makefile (arc/soc/em*): New compiler options
- https://gerrit.zephyrproject.org/r/10230 : Makefile (arc/soc/quark_se): New compiler options
- https://gerrit.zephyrproject.org/r/10194 : sanity: switch sdk depending on branch
- https://gerrit.zephyrproject.org/r/10188 : Xtensa port: Added Xtensa header generic files.
- https://gerrit.zephyrproject.org/r/10189 : Xtensa port: Added kernel arch dependent structs and functions.
- https://gerrit.zephyrproject.org/r/10273 : Bluetooth: L2CAP: Only set state for dynamic channels
- https://gerrit.zephyrproject.org/r/10271 : gpio: serial: Fix NXP copyright
- https://gerrit.zephyrproject.org/r/10272 : Merge net branch into master


Re: [RFC]DMA API Update

Liu, Baohong
 

From: Tomasz Bursztyka [mailto:tomasz.bursztyka(a)linux.intel.com]
Sent: Friday, January 20, 2017 12:21 AM
Subject: [devel] Re: [RFC]DMA API Update

Hi Baohong,

Very little comment on struct attributes.

Hi everyone,

Based on the feedbacks, I updated the RFC.

Data Structure Definitions
-------

/**
* @brief DMA block configuration structure.
*
* config is a bit field with the following parts:
* source_gather_en [ 0 ] --enable/disable source gather
* dest_scatter_en [ 1 ] --enable/disable destination scatter
* source_inc_en [ 2 ] --enable/disable source address
increment
* dest_inc_en [ 3 ] --enable/disable destination
address increment
* source_reload_en [ 4 ] --reload source address at the end
of block transfer
* dest_reload_en [ 5 ] --reload destination address at the
end of block transfer
* fifo_mode_control [ 6 : 9 ] --How full of the fifo before
transfer start. HW specific.
* flow_control_mode [ 10 ] --source request is served when
data available or
* wait until destination request
happens.
* RESERVED [ 11 : 31 ]
Is there a need of that much reserved space? I am asking this because maybe
we could shrink some attributes to 16bits like config (it would still give 5 bits
left for reserved usage)
Yes. will modify.


* source_address is block starting address at source
* source_gather_count is the continuous transfer count between gather
boundaries
* source_gather_interval is the address adjustment at gather
boundary
These 2 ones above for instance, is this necessary to put them on 32 bits?
Okay. Souce_gather can be changed to smaller size (16 bits) but the
source_gather_interval can be a big number so it is better to keep it to 32-bit.


* dest_address is block starting address at destination
* dest_scatter_count is the continuous transfer count between scatter
boundaries
* dest_scatter_interval is the address adjustment at scatter
boundary
Same here.
Same suggestion as above.

* block_size is the number of bytes to be transferred for this block.
*/
struct dma_block_config {
uint32_t config;
uint32_t source_address;
uint32_t source_gather_count;
uint32_t source_gather_interval;
uint32_t dest_address;
uint32_t dest_scatter_count;
uint32_t dest_scatter_interval;
uint32_t block_size;
struct dma_block_config *next_block;
}
I am also wondering how will we be able to use DMA efficiently in device
drivers.
They can't really use direct dma features. We will need something nicely
made, generic as possible, for sg dma buffers, etc...
Anything specific?


Tomasz


Re: uint32_t typedef differences causes issues

Boie, Andrew P
 

From the error printout, my first conclusion is that there is a bug in
newlib, not the other way around.
I don't think there's anything wrong with newlib. The only requirement
on the C library is that uint32_t is 32-bits wide (i.e. no padding) and
the newlib implementation meets this requirement.
There is a difference between strictly being compliant and doing what makes
things easier for the users. I would gather that most users would expect a
uint32_t to be printable with %d, and we have a fairly easy way to make that
work.

Changing the type of uint32_t to match expectations will still be compliant
with C standards, and make life easier for users.
I don't have any problem with changing minimal libc to have the same definitions as newlib.


Zephyr itself can use PRIu32 internally both to avoid warnings and to
be maximally portable (i.e. conforming to C99).
Do we expect Zephyr to ever be ported to 16-bit targets? If so, this might
make sense. Otherwise, I think we should meet the expectations most
programmers will have that 32-bit values can be printed with a %d.

"value: %" PRIu32 ", other: %" PRIu32

really suffers in readability, and it'd be nice to avoid if possible.
I can't say one way or another whether we will end up supporting 16-bit targets but I think we should do the correct thing.
I feel claims that this ruins code readability are overstated.

Andrew


Re: uint32_t typedef differences causes issues

David Brown
 

On Fri, Jan 20, 2017 at 04:54:11PM +0000, Daniel Thompson wrote:
On 20/01/17 13:37, Patrik Flykt wrote:
On Fri, 2017-01-20 at 06:21 -0500, Anas Nashif wrote:
the question is if we want to enforce usage of PRI macros.
The de facto standard is unfortunately that %d and %u print integers up
to and including an uint32_t. Enforcing these to be expressed as PRIu32
in Zephyr will be less portable for external and internal developers.
From the error printout, my first conclusion is that there is a bug in
newlib, not the other way around.
I don't think there's anything wrong with newlib. The only requirement
on the C library is that uint32_t is 32-bits wide (i.e. no padding)
and the newlib implementation meets this requirement.
There is a difference between strictly being compliant and doing what
makes things easier for the users. I would gather that most users
would expect a uint32_t to be printable with %d, and we have a fairly
easy way to make that work.

Changing the type of uint32_t to match expectations will still be
compliant with C standards, and make life easier for users.

Zephyr itself can use PRIu32 internally both to avoid warnings and to
be maximally portable (i.e. conforming to C99).
Do we expect Zephyr to ever be ported to 16-bit targets? If so, this
might make sense. Otherwise, I think we should meet the expectations
most programmers will have that 32-bit values can be printed with a
%d.

"value: %" PRIu32 ", other: %" PRIu32

really suffers in readability, and it'd be nice to avoid if possible.

David


Re: Suggestions for getting started

Kumar Gala
 

I’d start with a basic board port and get serial going. From there we can see what makes sense w/regards to I2C & SPI drivers.

- k

On Jan 20, 2017, at 12:21 PM, Abhinav Misra <abhitheextremeeng(a)gmail.com> wrote:

Hi Kumar,

Waiting for your response !!

Thanks,
Abhinav

On Thu, Jan 19, 2017 at 11:33 PM, Abhinav Misra <abhitheextremeeng(a)gmail.com> wrote:
Hi Kumar,

I have STM32F407VG board.
Interest in developing the drivers.But can start with anything.
Worked on i2c and spi drivers.Developed code for userspace drivers for both.
Currently working on bluetooth. Implemented few profiles using some vendor stack.

Any kind of related stuff would be fine.

Regards,
Abhinav
.


On Thu, Jan 19, 2017 at 9:12 AM, Kumar Gala <kumar.gala(a)linaro.org> wrote:

On Jan 18, 2017, at 12:29 PM, Abhinav Misra <abhitheextremeeng(a)gmail.com> wrote:

Hi All,

Hope everybody is doing well.

I recently joined the zephyr devel mailing list and going through the documentation and other starters stuffs as being new to open source development.

I want to contribute to the project.Please suggest me some ways how to get started and on to which things to focus on.

I have following boards - :
1. Beagle bone black
2. STM32 discovery board
3. TI's MSP432

Any type of suggestion and help would be much appreciated.

Regards,
Abhinav
Which STM32 discovery board do you have, this is possibly the best starting point to try and get zephyr up and running.

What kinda of work or code have you developed in the past? Any particular area of interest?

- k

5601 - 5620 of 7937