Commit graph

42249 commits

Author SHA1 Message Date
Peter Mitsis
3490627a97 test_fp_sharing: clean up test code
Clean up test code in preparation for adding Cortex-M4 support.

Change-Id: I64a32e8aa2808b4e0348601e2fc0f7f39cdb413c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-07-01 19:44:15 +00:00
Peter Mitsis
005925e2dd arm float: Add Kconfig options
Adds Kconfig options CPU_HAS_FPU, FLOAT and FP_SHARING for the arm
architecture.

NOTE: All SOCs in the MK64F12 family have an FPU so that makes it a
convenient location to enable the hidden CPU_HAS_FPU option.

Change-Id: I71771d24f20f52079314bb8db9bf8a0aa827ab41
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-07-01 19:44:15 +00:00
Peter Mitsis
1f47a0dbce arm float: Update compiler options
Apply the correct compiler options when building for a Cortex-M4
processor that has floating point enabled. Using 'softfp' allows
floating point to be used with existing libraries supplied by the
Zephyr SDK. The 'hard' option would require new libraries to be
shipped with the SDK.

Change-Id: I141c20f54c2241134510888688637930c7b560a2
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-07-01 19:44:15 +00:00
Andrew Boie
571ccee400 test_pool: increase task stack sizes
We were getting a stack overflow on Nios II.

Change-Id: Id2c9be27552f31f5cdbf72dc31e77a106082746b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-01 19:01:58 +00:00
Inaky Perez-Gonzalez
b34e376e51 doc: update troubleshooting for Kconfig help
Fix the omission of having bullets for the enumeration of options, as
it makes the formatting look properly vs just different lines.

Change-Id: I701f705bc03ccc2082439c3ea3c1b5053b2aac0a
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-01 17:44:25 +00:00
Luiz Augusto von Dentz
b008f74b0b Bluetooth: L2CAP: Fix not cleanup properly if ACL is disconnected
If ACL is disconnected with channels still active the code should call
l2cap_chan_del to clean it up properly.

Change-Id: Iffa9345a9697ac80c1f2295578c7161ffeb44420
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-07-01 14:17:06 +00:00
Mariusz Skamra
997765def2 Bluetooth: tester: Increase prepare write buffers pool for qemu and nble
Buffers pool has to be increased for all configurations.

Change-Id: Id24caced5043c1672ca5f753d1e86d9a72c728ea
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-07-01 14:57:02 +02:00
Mariusz Skamra
940ee5e6e5 Bluetooth: tester: Increase prepare write buffers pool
TP/GAW/SR/BV-10-C test case requires two long values to perform
nested prepare write operation. Using one ATT Execute Write command
this two values are going to be written simultaneously.

Change-Id: I2950409ed8f1d121dcc706b432cdf071b9af00c0
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-07-01 12:34:06 +02:00
Johan Hedberg
179f08f049 Bluetooth: Create proper abstraction for ECC access
This makes the SMP usage of ECC functionality properly encapsulated
and offers the chance of other protocols to utilize the functionality
in the future.

Change-Id: Iae14beafd5f8f7dbe2c6ffd33700471b8a62b8da
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-07-01 11:21:04 +03:00
Flavio Santes
b2383406cc samples/static_lib: Linking with a static library
This sample shows how to integrate a static libray into a Zephyr
application. A hello_world application and a small library are
included.

Origin: Original

Jira: ZEP-366
Change-Id: Idab38402b47042c3f9369b3a8e433d07d5fa4535
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-07-01 00:39:20 +00:00
Genaro Saucedo Tejada
c8d9b6b5e3 tags: basic kernel objects test for actual hardware
Tagged some tests/kernel testcases with 'bat_commit'. Only test that
work on actual hardware are tagged, while tests with known issues
were left not tagged, test meant for emulator or build only were
also not tagged.

Change-Id: Icede6bc76788aba60d8f1fdcf624e95a7d3116a2
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-01 00:38:31 +00:00
Andrew Boie
231e617593 nios2: enable instruction/data caches
The caches get initialized on boot and flushed after XIP copy
takes place.

Change-Id: I642a14232835a0cf41e007860f5cdb8a2ade1f50
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-01 00:34:47 +00:00
David B. Kinder
47eb6096b1 doc: fix ref in include/sensor.h
Added missing (placeholder) comment on struct sensor_trigger_config

Removed @ref references to undefined terms

Fixed a misspelling while I was there too.

Jira: ZEP-487
Change-Id: I314f243cbd58cab48da33abd2f181b9aeb17b0e9
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-06-30 21:22:25 +00:00
Andrew Boie
c613715322 nios2-qemu: use all available RAM
Use all available ram, cut in half for simulated RAM/ROM
regions. Some larger test cases did not fit in 64K for
non-XIP case.

Change-Id: I12296286ca7efa5bcc1ceef30486c3fe8976811c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 20:56:16 +00:00
Andrew Boie
0a8a101e6e nios2: enable microkernel sanity checks
All tests are building now.

Change-Id: I96a94733a96a92df445c46add0de94319fbca3a5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 20:56:16 +00:00
Andrew Boie
ac6ac00337 sample/kernel_event_logger: fix nano config
There was no need for arch-specific configs for this test
case. We now use the x86 config with CONFIG_TICKLESS_IDLE
removed.

The test case has been re-enabled on Nios II.

Change-Id: Idd206cb3ca55f2336685a416df18f5848dee09c3
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 12:10:43 -07:00
Andrew Boie
8e35554743 sample/kernel_event_logger: fix microkernel config
There is no reason to enable tickless idle or system power management
to test the kernel event logger, and it breaks systems which do not
implement tickless idle (like Nios II which lacks a powersave
instruction).

Sleep events are logged on all arches in nano_cpu_idle() or
nano_cpu_atomic_idle() so we get sleep events even without these
configs turned on.

Change-Id: I6db811478686d8b2cd9e12a65b118349e825b22f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 12:10:43 -07:00
Andrew Boie
f33b8d32a1 nios2: implement kernel_event_logger
Interrupts and context switches are logged. Since this CPU does not
have a power-saving instruction, it never enters a sleep state so
we do not call _sys_k_event_logger_enter_sleep() from anywhere.

Change-Id: Idcef388e93ffea373446997a0f87e93a4db44331
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 12:10:43 -07:00
Andrew Boie
71e22620a8 nios2: define vaddr_t and paddr_t
Change-Id: I09b91159b4c30876026fe7ae32109afb9164332d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 12:10:43 -07:00
Andrew Boie
59169052c6 misc/kernel_event_logger.h: prototype irq entry point
Missing from the header, likely due to other arches always calling
this from ASM-land.

Change-Id: Id90e0269a4f9e17b78c48eb7df3b6cde08c53d2a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 18:52:23 +00:00
Andrew Boie
eab9123589 nios2: fix nano_cpu_idle()
Interrupts must always be unlocked when coming out of this function
or execution will never leave _power_save() once entered.

Change-Id: Idda9d9be7cfc576a1072afec38000f63ae262a10
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 18:52:10 +00:00
Andrew Boie
e3ffa67bde test_stackprot: disable for Nios II
No compiler support for -fstack-protector on this arch with the
current toolchain.

Change-Id: Ifa793599b6760c318f16748f9e71c31e0d4edbe7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 18:51:51 +00:00
Andrew Boie
5da328b07b tests: test_tickless: exclude on Nios II
Tickless idle will not be enabled on Nios II due to the
lack of a powersaving instruction.

Change-Id: Ib3c23d803d6335aeb791983e31ad7da2d0deb118
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 18:51:51 +00:00
Andrew Boie
fe40d1071e REVERTME test: bluetooth: init: exclude Nios II JTAG UART
This driver does not yet support interrupt-driven console.
Revert when ZEP-280 is implemented.

Change-Id: Ib430c39138194ab441c95a1b1856c3661102a625
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 18:51:50 +00:00
Chuck Jordan
c1c60415c1 test: merge x86 changes over to prj_arc.conf
I see that the x86 version of the prj.conf file changed.
Merging those changes into the ARC one.

Change-Id: Ifd59d3b7ed71a4e6613bb3d164b901eb1ad7ad55
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-06-30 17:54:04 +00:00
Adrian Bradianu
ab2c18b0ad usb: Move LOW_BYTE and HIGH_BYTE to samples code
Move LOW_BYTE and HIGH_BYTE macros from usb_common.h to
samples code.

Change-Id: I26296bde8c5b3991b3bfab71272c861b5360ce97
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2016-06-30 17:51:58 +00:00
Adrian Bradianu
88656ec981 usb: dfu: Add support for alternate settings
Add support for alternate settings in order to access additional flash areas.
The DFU example uses the alternate settings as an offset into flash.

Change-Id: I636042c7f71a5d2a2778ec7dd5301a622720107d
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
2016-06-30 17:51:57 +00:00
Adrian Bradianu
d8ee2b087f usb: Add ReST documentation file
Change-Id: I955bad3c560d8e0026d671dadf6004edb94559e4
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-06-30 17:51:57 +00:00
Adrian Bradianu
3d8b28b358 usb: Add CDC ACM and DFU class examples
CDC ACM sample class driver implements a virtual UART port.
SET_LINE_CODING, GET_LINE_CODING and SET_CONTROL_LINE_STATE
class requests are supported.

DFU class example does not perform an actual firmware upgrade,
instead it allows the user to upload a file at a predetermined flash
address or to download the content from that flash address.

Change-Id: I702e6727db15ef360d110a70a979c1e4bd4ee1bb
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-06-30 17:51:57 +00:00
Adrian Bradianu
7a16ade6d1 usb: Add USB device core layer
USB Device core layer is a hardware independent interface between USB
device controller driver and USB device class drivers or customer
applications. It's a port of the LPCUSB device stack.

Change-Id: I9371ffab7034d20953fec0525e72fbe9e094c931
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-06-30 17:51:56 +00:00
Genaro Saucedo Tejada
7a6bab308a sys_log: replace old debug macros on K64 PSI driver
SPI drivers for K64 is now using system log.

Change-Id: Ifd0d321e2ff84c581261b7cb3a7a4485afbd67f6
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
JIRA: ZEP-311
2016-06-30 17:50:56 +00:00
Genaro Saucedo Tejada
a679f32920 sys_log: replace old debug macros at ADC driver
ADC driver is now using new system log macros, also update the Kconfig
variable to be a level rather than a bool.
JIRA: ZEP-311

Change-Id: Iac96c37989e44484808ded515397d457186240e0
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-06-30 17:50:55 +00:00
Bogdan Davidoaia
e8d0090808 sensor: tmp007: fix negative sample values bug
Fix bug that caused negative temperature values to be computed incorrectly.
The sign bit needs to be perserved, when extracting the data sample from
the TMP007_REG_TOBJ register.

Jira: ZEP-499
Change-Id: Idbebd48b3164d7d4883352ef7128ef73be70e1b2
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-06-30 17:50:05 +00:00
Mariusz Ryndzionek
65cc01ac16 sensor: adjust Kconfig file formatting
Add hyphens so that the .rst file is formatted properly

Change-Id: Ic798590d4a892f4f4d5312e86949db23a3b3abe0
Signed-off-by: Mariusz Ryndzionek <mariusz.ryndzionek@firmwave.com>
2016-06-30 17:49:50 +00:00
Andrew Boie
568dee4a8f qemu_nios2: do not include reset vector
The .elf files sent to QEMU boot from __start, the reset vector
is completely ignored.

Change-Id: Ib436547bcb1c0154b5c23638dfdaf59627b109ea
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 16:51:22 +00:00
Rohit Grover
291916055a doc: minor fix to documentation for DEFINE_TASK()
task_groups are bitwise OR'd.

Change-Id: I2dafa4d7519449216a6c1ff7e11158ab4758e967
Signed-off-by: Rohit Grover <rohit.grover@arm.com>
2016-06-30 16:50:40 +00:00
Andrew Boie
206d0b4497 Revert "qemu: pass -serial stdio instead of -serial mon:stdio"
This reverts commit e697621371.
It is causing problems dependeing on what version of QEMU is
used, with the SDK QEMU the terminal has to be 'reset' after
running (the opposite behavior of the Nios 2 build).

Change-Id: I6756eb0cf8edf4faa36f3a5e1cf0e456f146e1d8
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 16:50:02 +00:00
Kumar Gala
23af1e928e build: Fix application object files placement when building out of tree
For the application object files to get properly placed in the outdir
when the source files are outside of the zephyr tree we need to set
$srctree in kbuild to the parent dir of the application source code
rather than getting the default of $srctree being set to $ZEPHYR_BASE.

By doing this we are able to get the kbuild system to place the object
file results in the outdir rather than in the application source dir.

Jira: ZEP-369
Change-Id: I4d3ba67a4a38c15978d5bf7e1f0a912e9bf00f08
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-30 16:49:40 +00:00
Szymon Janc
19ff3d3e37 Bluetooth: Print events opcodes as hex
This makes logs easier to read as those are defined as hex values.

Change-Id: I67f1dc0da9056a69398faf55fd5535a67ec4ebb9
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-30 16:05:59 +00:00
Mariusz Ryndzionek
d4983df3b1 samples: add simple tmp112 sensor application
Periodically reads temperature and prints it on console

Change-Id: I293a7aad88bce245d6c1149fd19fcb7c7e770e54
Signed-off-by: Mariusz Ryndzionek <mariusz.ryndzionek@firmwave.com>
2016-06-30 14:50:56 +00:00
Kumar Gala
7dcbbc39e7 build: move from srctree to ZEPHYR_BASE for app include paths
$srctree for the application might not be set to be $ZEPHYR_BASE, use
$ZEPHYR_BASE instead to be more explicit in the build.

Change-Id: Iefa5ff59f246b584949329044f7a6531adc6ed62
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-30 14:36:39 +00:00
Kumar Gala
ff694e92b5 build: Split out building of application code
Seperate building of the application code from the zephyr OS code.  This
is in prep for both having a libzephyr.a for the OS and to fix where
the application object files get put when building out of tree.

Change-Id: I43f3b54d11f41aaf35350de7462c5cd556804092
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-30 14:36:38 +00:00
Arkadiusz Lichwa
caf83c96ed Bluetooth: L2CAP: Make public helper for LE channel conversion
Replaces all occurences of LE_CHAN() macro with new name
BT_L2CAP_LE_CHAN() and makes it public.

Change-Id: I426b17b0214f7ab4b69e5febbdca1917f22e7487
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-06-30 09:06:35 +00:00
Johan Hedberg
e0ddc33ce2 Bluetooth: log: Add space after scheduling context
This improves readability of the debug logs.

Change-Id: Ib661535bcbb990cc8a807d40ff570aa11a293c54
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-30 08:38:58 +03:00
Johan Hedberg
e4c8293e7f Bluetooth: log: Add missing sections.h include
The __stack and __noinit defines require sections.h.

Change-Id: I15f69b2ac9bc737016c986b21c76e576465bfdf7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-30 08:38:58 +03:00
Adrian Bradianu
ff712114ef usb: dw: Add Quark SE USB device controller driver
Quark SE USB device (Designware IP) controller driver implements
the low level control routines to deal directly with the hardware.
Only FIFO mode supported.

Change-Id: I086186df017734579f0363ed79effc1481ff32c2
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-06-30 00:21:39 +00:00
Adrian Bradianu
6b88a6b945 ext qmsi: Add USB base and interrupt defines
This commit should be reverted when these changes will become part of
QMSI 1.1 release.

Change-Id: I4cc91a10515906e3863bb9be59dbead53bd4a938
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
2016-06-30 00:21:39 +00:00
Adrian Bradianu
fca8eb8608 usb: Add USB device controller header file
Add USB device controller header file containing the USB device
controller APIs. All device controller drivers should implement the
APIs described in this file.

Change-Id: I14443a5286bbc2faddbd6420ce1668acb183cd2e
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2016-06-30 00:21:39 +00:00
Bogdan Davidoaia
bcca0dcbbd util: add portable arithmetic shift right
Add arithmetic_shift_right function, as the behaviour for shifting right a
negative signed value is implementation-defined (see ISO/IEC 9899 §6.5.7).

Change-Id: I05d930a96e8591dc248295bff853ed9e9cb263a2
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-06-29 23:48:10 +00:00
Peter Mitsis
c632271879 arm float: Enable floating point
Enable floating point in the Cortex-M4 processor.

Change-Id: Ibadae12b9197d6486fd5c6a3d4e177fa9e1c71bc
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-06-29 20:34:42 +00:00