Commit graph

19237 commits

Author SHA1 Message Date
Allan Stephens
96d746d3c1 Rename microkernel's minik.h to micro_private.h
The new name better reflects that this file contains all private
microkernel APIs that are used by various kernel subsystems.

Change-Id: I5e52172a9e33aa130ce55ce59e887bba5c1c175a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:26 -05:00
Allan Stephens
7da1dd860b Rename microkernel's kernel_struct.h to micro_private_types.h
The new name better reflects that this file contains private
microkernel APIs (types, structs, etc.) that are used by various
kernel subsystems.

Change-Id: I7a89be893455b3daaf30baa40a0ec8e0cde7cc36
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:26 -05:00
Allan Stephens
63fae40f7d Eliminate nanokernel's nanometrics.c
File contents moved to the nanokernel initialization file, since
they don't warrant their own distinct source file.

Change-Id: I61329067a077c421e2889c745ea44eef78ce37cb
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:26 -05:00
Allan Stephens
b22d902e44 Rename microkernel's global.c to k_init.c
This file contains microkernel initialization code, along with a few
global variables.

Change-Id: Ic4e39c844d39866b38bb6d074e7035d759e073cd
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
570eabf9f8 Add k_ prefix to various microkernel source files
Adds the k_ prefix to files that don't have it. This emphasizes the
fact that the microkernel is the *real* Zephyr OS kernel, rather than
the nanokernel. Also, the k_ and _k_ prefixes are used for many private
microkernel APIs contained within these files, so using the k_ prefix
for these file names makes sense.

Change-Id: If3a5e786edc6503fa8a24f5638ece2e1df021547
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
e96164aa30 Rename various microkernel source files
Now spells out the name of the associated microkernel object in full.
Also renames file containing FIFO code to correspond to the associated
public include file (microkernel/fifo.h).

Change-Id: I47f7a2ca01e0feff8f499acda0000fe475e7ee5a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
bba56b1c8a Rename microkernel/cmdPkt.h to command_packet.h
Now spells out the name of the associated microkernel object in full.

Change-Id: I608404a762cf9d1100d58fe80c82c0e40ada2ff1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
fa74ff083e Rename microkernel/sema.h to semaphore.h
Now spells out the name of the associated microkernel object in full.

Change-Id: I6c2cacff68d150eaea5d118d582c5f8246911924
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
829eeeaa98 Rename microkernel/pool.h to memory_pool.h
Now spells out the name of the associated microkernel object in full.

Change-Id: I1e9bf3dc25de537cecb679e0e0b27e5f54b2aa13
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
d261ad0fb6 Rename microkernel/mmap.h to memory_map.h
Now spells out the name of the associated microkernel object in full.

Change-Id: Ibe1de0dca3488a2a38b620ff0e74e253d8da8d35
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
4f4a8170ee Rename microkernel/mail.h to mailbox.h
Now spells out the name of the associated microkernel object in full.

Change-Id: Iee532e9fbbcafbf9ba44c91de0894b7181285e8e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
f494cc3e9d Rename microkernel/k_types.h to base_api.h
This file defines public microkernel APIs that are utilized
by more than one of the microkernel object types. It contains
both types and symbolic constants.

Change-Id: I2bc39ffe6655e5ddeec1e55c4caee01e02526595
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Allan Stephens
a0148a8544 Rename sysgen.py to sysgen
Gets rid of the Python file extension, since the fact the code is
written in this language could conceivably change someday (and
doesn't really need to be advertised to anyone invoking it).

Change-Id: I0d01a89fd25e4a0f033099a4bcea674bc302c658
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:14:25 -05:00
Dmitriy Korovkin
8d065343c2 Use static interrupt registration in device drivers
Make device drivers use static interrupt registration procedure.

DYNAMIC_INT_STUBS configuration parameter was used only by device
drivers to switch between static and dynamic interrupt registration
procedures. Now it is obsolete and is removed.

uart_int_connect() function is removed. If UART device driver still
needs to register interrupt dynamically, it should use
irq_connect(uart_irq_get()).

Change-Id: I80c695f337456e9b0c1b0fd56716e35794f7bdb7
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:25 -05:00
Dmitriy Korovkin
b1b20e4129 Conditional build of bluetooth driver uart component
UART bluetooth driver build depends on CONFIG_BLUETOOTH_UART.

Change-Id: I95561f8daef494507e65e7977f444d861f2dac74
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:25 -05:00
Dmitriy Korovkin
660878e4e2 irq_connect for x86 uses static stub array
In order to provide the same irq_connect() on all platforms
on x86, irq_connect() now uses a static array of interrupt
stubs. Device driver does not need to provide interrupt stub
to irq_connect() function.

Add NUM_DYNAMIC_STUBS configuration parameter, the number
of interrupt stubs used for dynamic interrupt registration.

Modify tests for unified interrupt register API

Tests that deal with interrupts are modified to work
with the new interrupt registration API.

Add CONFIG_NUM_DYNAMIC_STUBS option to dynamic interrupt projects

Projects that use dynamic interrupt handler registration on x86
have to include CONFIG_NUM_DYNAMIC_STUBS parameter in the
configuration.

Change-Id: Ic90c726485521a57cf695fd3edc8cac85d0b827d
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:25 -05:00
Dmitriy Korovkin
f661feee55 IRQ_CONNECT_STATIC implementation for ARM platform
IRQ_CONNECT_STATIC() macro provides static interrupt registration.
It creates an entry for _sw_isr_table, table of interrupt handlers.

IRQ_CONFIG() macro provides interrupt controller configuration.
On ARM platform it configures the priority of each interrupt.

_sw_isr_table is implemented the way that each of it's elements
is located in individual section. Sections are marked a "linkonce",
thus when a device driver declares an interrupt handler, it overwrites
the default _sw_isr_table entry.

Change-Id: I182bf7158dd67f45b597783dca038a4f78166a03
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:25 -05:00
Dmitriy Korovkin
f41ffb4c43 Change the modules link order
In order to support IRQ_CONNECT_STATIC implementation for ARM,
the platform code needs to be linked after drivers.

Change-Id: Ifcba89283e4b9dc18a9cb774d591a689b38c9254
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:25 -05:00
Dmitriy Korovkin
6dd108a263 IRQ_CONNECT_STATIC implementation for x86 platform
In order to simplify x86 interrupt stub creation, each interrupt
controller implements an interrupt stub definition macro.

Add IRQ_CONNECT_STATIC() for static interrupt registration, and
construct the interrupt stubs name from device and interrupt
handler names.

Add IRQ_CONFIG() macro for the interrupt controller configuration.
On x86 platform it programs APIC to associate an IRQ number with
the interupt vector.

Add HPET_TIMER0_INT_PRI parameter to Quark platform header to
make it build correctly.

Change-Id: I24ad25e1aa807ffa63733a27ad882877fcad72af
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-02-05 20:14:25 -05:00
Juan Manuel Cruz
99b340e2ef Kbuild: CFLAGS Review.
This commit removes original linux CFLAGS that needed review.

Change-Id: Ieeb13dcd3fc4d8c76bf48b6efbb3d6fa7767dfe2
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:25 -05:00
Anas Nashif
d2b1bdd552 doc: add forgotten index file
Change-Id: I71abbf58e0af803c09de620272ac656ffa54d170

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:25 -05:00
Anas Nashif
4d819a9c92 doc: use kconfig for code-blocks where it applies
Change-Id: Ic2440c9e1411408dcddb659753d604d5033ce50c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:25 -05:00
Anas Nashif
5e43129aa5 doc: rename |zos| to |codename|
Change-Id: I2aefc5a7b8ab30374ebdb250761c101da01f6f8a

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:25 -05:00
Anas Nashif
8b749c4cfe doc: Add development section
Change-Id: I5d5256607d5b6fff2537ce3d3175c8bf90168a73

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis
192a316ef4 Remove references to Cortex-M0
The Cortex-M0 processor is not supported.

Change-Id: I3ada6615a8b41eb318f80edb13947f70459c761b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis
8601dc9488 Break forced selection of CPU_CORTEX_M3
Makes the ARM CPU type a choice between CPU_CORTEX_M3 and CPU_CORTEX_M4
(similar to the choice of processor for x86). This completes the breaking
of the forced selection of CPU_CORTEX_M3 when CPU_CORTEX_M4 chosen, thereby
making CPU_CORTEX_M3_M4 the true umbrella option for the Cortex M3/M4
processors.

Change-Id: I1d1f39352d85a5848b13102ceb8365c7dede0959
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis
25fd37d9d5 Rename option CPU_CORTEXM to CPU_CORTEX_M
Makes name more consistent with other CPU_CORTEX_M* options.

Change-Id: I65968cb300207ba0de6231d9a67f2720be77b6ba
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis
3e6c31207b Rename option CPU_CORTEXM4 to CPU_CORTEX_M4
Makes name more consistent with CPU_CORTEX_M3_M4 option.

Change-Id: I6f0a14322b7774df54a3459f91cd3acf07819b04
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis
a9941af3ee Rename option CPU_CORTEXM3 to CPU_CORTEX_M3
Makes name more consistent with CPU_CORTEX_M3_M4 option.

Change-Id: I0b89a50a5c0b728167cd76219d25ddf98243c0dd
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis
9bf659afa5 Introduce CPU_CORTEX_M3_M4 option
CPU_CORTEX_M3_M4 replaces CPU_CORTEXM3 as the umbrella option for Cortex M3/M4
processors.

NOTE: Selecting CPU_CORTEXM4 still currently forces the selection of
CPU_CORTEXM3.  Breaking that forced select will be done in a later commit.

Change-Id: I0f36b3a2adc5c6c66db4e9b6353b921199544deb
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis
30a49f8d4a Set Quark as default x86 platform
Quark is the preferred target platform for the x86 architecture.

Change-Id: I2bf9bf209a85c93e38ea554e19de3f32813c3a69
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Peter Mitsis
4aac2a5280 Introduce CPU_ATOM for x86
Atom based BSPs now select an atom processor.

Change-Id: Iebe90a60d9e7f2025ce6b23fe918b86cd11fdea7
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:25 -05:00
Anas Nashif
83d4ea9caa warn about unset ZEPHYR_GCC_VARIANT variable
Change-Id: I217cdf546710622b992cf8a0edd4444bc2321a04
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:25 -05:00
Anas Nashif
27603f4801 Revert "Kbuild: Tools build at TIMO_BASE directory."
This reverts commit 23da104f0dc8c6c4a768a727b564272c084aa79b.

Conflicts:
	Makefile
	Makefile.inc

Change-Id: Ia8f2efe3cd37e82c04c304f04c46d787d2265dde

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:24 -05:00
Anas Nashif
0180a63d62 Revert "Kconfig stop creating empty header files."
This reverts commit 5e56c21dfae2e08253820f7fcad1e96be009ca89.

Change-Id: Ie4e0c2afe27937206230e5574c41e5a4a4c3d616
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:24 -05:00
Anas Nashif
fda70d2130 Revert "Kconfig: Create dependency header files in outpur directory."
This reverts commit ecf5bd8048b683f119e867e85c1693955694b33d.

Change-Id: I51717ad96f312be1f116534f6b79d599bf0e5b4e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:24 -05:00
Carol Lee
d12fcef665 doc: Add microkernel mutex object info
Adds a description for the mutex object, which is currently
undocumented. This text uses an enhanced structure that presents
the material in a more user-friendly manner.

Change-Id: I986be388b4943064d0449c2194de786fbad84863
Signed-off-by: Carol Lee <carol.lee@windriver.com>
2016-02-05 20:14:24 -05:00
Mariusz Skamra
3831217a98 Bluetooth: Fix scan_type in le_set_scan_params
scan_type should be set to BT_LE_SCAN_ACTIVE

Change-Id: I4cb4141919819ce104b002bfc0e89bedbc55e90d
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:14:24 -05:00
Johan Hedberg
fa1bf41477 Bluetooth: Fix minor coding style issues
Change-Id: I0e78bce8cdbf46252f4cfc4483995ba7583915f7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:24 -05:00
Johan Hedberg
4905835bad Bluetooth: Fix max_latency calculation comment
Change-Id: I4afcd6e206b95fe219c3483d1e273d78c1dfcb2f
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:24 -05:00
Arkadiusz Lichwa
ac98b4e221 Bluetooth: Handle update connection parameters
When connected, the peripheral/slave can trigger changing connection parameters.
Handle such request on central/master and if needed update controller settings
regarding the relevant connection parameters.

Change-Id: If3c1d91752f8d3875918bd8bfe923330790f530e
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:24 -05:00
Szymon Janc
a9e4291d4b Bluetooth: Use address instead of connection ID in shell
This converts connection handling to use addresses instead of
connection ID.

btshell> connect 7C:2F:80:94:96:EC public
btshell> Connected: 7C:2F:80:94:96:EC (public)
btshell> disconnect 7C:2F:80:94:96:EC public
btshell> Disconnected: 7C:2F:80:94:96:EC (public)

Change-Id: I545fcf71954ceda1fb89deb9bf8647149fb54e94
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:24 -05:00
Szymon Janc
441e01ec04 Bluetooth: Add bt_conn_get_dst function
This function allows to pick connection destination address.

Change-Id: I3e4959eec00905c64de3d8b9ef810b613c2e9f91
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:24 -05:00
Arkadiusz Lichwa
b40b3363e4 Bluetooth: Enable basic interaction with LE scan
Adds new commands to shell app allowing turn on/off active LE scan.
App uses scan results callback to get feedback when found any
advertisers around.
The dummy app's callback prints out info about findings.

Change-Id: Ifffe77b804230c19bbbcbc4f38e47210c835106d
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:24 -05:00
Johan Hedberg
5a72e9aaaa Bluetooth: Add doxygen documentation for buf.h
Change-Id: Ia60227e9f960f9563c82cdc4a044a2f9a538331c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:24 -05:00
Johan Hedberg
f77d80121e Bluetooth: Clean up doxygen documentation in gatt.h
Change-Id: Idc554e46f5806b4b7bf84f9d5c4ac8a46fdd7888
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:24 -05:00
Johan Hedberg
640a8cdc96 Bluetooth: Add doxygen documentation to conn.h
Change-Id: Ifb7b7c5bf089590059aa97f498751679e34ae35e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:24 -05:00
Jukka Rissanen
0344c11ad7 net: Add preliminary UDP support
Use the Contiki simple UDP API when sending and receiving the
application data.

Change-Id: I39a379f30c8f7febbea223fcf8f8702faf82e39e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:24 -05:00
Jukka Rissanen
e024dba08f net: uip: Add support for user data in simple UDP API
Adding the user pointer to the uIP simple-udp API is vital so that
we can pass the net_buf to UDP receiver callback.

Change-Id: If7ee24f344fbd23eb7e0c3a99e78deb996d3667d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:24 -05:00
Jukka Rissanen
7e0951982a net: Add helper function to context for getting recv queue
Needed only in net_init.c so did not put the prototype into .h file.

Change-Id: If84e835d32bcfafd8e403ffa4def51fa72e0aa3e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:24 -05:00