Commit Graph

7623 Commits (mbed-os-5.1)

Author SHA1 Message Date
Neil Thiessen 97e9a95861 Fixed "intrinsic is deprecated" warnings
Suppressed "#3731-D: intrinsic is deprecated" compiler warnings in critical API.
2016-09-15 18:07:20 +01:00
OzzySan d066a50cfc Added gcc_arm template for export. 2016-09-15 18:07:18 +01:00
OzzySan f9bcf7ad70 Added support for MTM_MTCONNECT04S 2016-09-15 18:07:17 +01:00
bcostm 892546bbaa STM32F2xx - Enable Serial Flow Control 2016-09-15 18:07:16 +01:00
bcostm 074a7eea21 DISCO_L476VG - Add Serial Flow Control pins + add SERIAL_FC macro 2016-09-15 18:07:13 +01:00
Simon Hughes c0b0ac66f5 Restoring swap code to cfstore_test_delete_all() after being previously removed to work around CFSTORE issue 17/23 (realloc()). 2016-09-15 18:07:12 +01:00
Simon Hughes 5c04ee98ed This commit contains CFSTORE fixes for the following related issues: - issue 17: Heap corruption. - issue 23: Handles invalidated when realloc called. - issue 24: cfstore_find returns error when "previous" parameter is NULL. - issue 25: Memory leak when out of memory.
With respect to issues 17 and 23:
- A code defect existed for correctly updating cfstore_file_t data structures
  under the following conditions:
  -- the KV memory area contained some KV's.
  -- cfstore calls realloc() to increase the size of the KV area in
     memory because:
	  * A new KV was being added to the KV area, or
	  * the size of a pre-existing KV was being increased.
  -- The returned address from realloc() has changed from before the
     call (i.e. the location in memory of the KV area has changed)
	 e.g. the presence of heap memory objects directly above the KV memory
	 area in the memory address space causes realloc() to move the KV area
	 so the newly increased area can be accommodated at contiguous addresses.
  -- In this scenario, the cfstore_file_t (structures for open files) head pointers
     do not get correctly updated.
  -- The defect was fixed by correctly updating the cfstore_file_t:: head pointer.
  -- A new add_del test case was added to the scenario where a new KV is being added
     to the KV area.
  -- A new create test case was added to the scenario where the size of a
     pre-existing KV is being increased in size.

- A code defect for suppling a NULL handle as the previous argument to the Find() method
  (issue 24).
	-- Supply a null handle is valid, but it was being used to check for a valid hkey,
	   which was incorrect.
	-- A new test case was added to check the case of supplying a NULL previous argument
	   works correctly.

- A code defect for a memory leak under the following conditions (issue 25):
  -- When realloc() fails to perform a requested change to the size of the KV area, the
     error handling sometimes incorrectly sets cfstore_context_t::area_0_head to NULL.
	 Cfstore returns a suitable error to the client. If memory had previously been held
	 at area_0_head, realloc(area_0_head, size) returning NULL means the memory
	 at area_0_head is still retained.
  -- On receiving the error code, the client cleans up including a call to Uninitialize().
     This should free the retained but as area_0_head == NULL this is not possible. Hence
	 a memory leak occurred.
  -- This was fixed by not setting area_0_head = NULL on the realloc() failure.
  -- A create test case was modified to detect the leaking of memory in this way.
2016-09-15 18:07:11 +01:00
sarahmarshy 64943bb85c Test names not dependent on disk location of root
#2613 should be merged first
Using test_api, I found that the test names were dependent on where mbed-os (if that is the root) is stored on disk if you provide anything other than '.' as the root directory.
This would change names like:
```
repos-mbed-os-example-blinky-mbed-os-features-storage-feature_storage-tests-cfstore-example3
```
to
```
features-storage-feature_storage-tests-cfstore-example3
```
2016-09-15 18:07:09 +01:00
neilt6 971397f900 Updated USBDevice to use Callback
Updated USBAudio and USBSerial to use Callback<void()> instead of
FunctionPointer to fix compiler warnings.
2016-09-15 18:07:08 +01:00
neilt6 ec37b597e4 Updated USBHost for library changes
Updated USBHost classes to use Callback<void()> and new Thread API to
fix compiler warnings.
2016-09-15 18:07:07 +01:00
bcostm 3022bff687 NUCLEO_F446ZE - Enable mbed5 release version 2016-09-15 18:07:05 +01:00
TsungtaWu b8f041b561 DELTA_DFBM_NQ620 platform porting
DELTA_DFBM_NQ620 inherit to MCU_NRF52
HW config is the same with NRF52_DK
Only change on serial pin config in PinNames.h
2016-09-15 18:07:04 +01:00
Jeremy Brodt f62a7247e8 Removed echoing of characters and carriage return. 2016-09-15 18:07:03 +01:00
Vincent Coubard fdcece847f Use SingletonPtr for the internal variables defaults and handlers in utest_harness. 2016-09-15 18:07:01 +01:00
Vincent Coubard 8a94c85eb0 Use a SingletonPtr for the Timeout object in utest_shim.
Makes sure to initialize it, otherwize, it might be initialized in
interrupt context.
2016-09-15 18:07:00 +01:00
Vincent Coubard 3aeba87f41 Use greentea_serial SingletonPtr. 2016-09-15 18:06:59 +01:00
Vincent Coubard 9bc5adfb21 Fix a rare case of imcompatibility between base_control_t and control_t.
Both branches of a ternary operator should yield the same type;
compatibility is not enough in that case.
2016-09-15 18:06:57 +01:00
Vincent Coubard f0fbdbd22c Improve compatibility between base_control_t and control_t.
* provide missing member functions from control_t in base_control_t
* construction of control_t from reference of base_control_t instead of
  value.
* overload operator+ for all permutations between control_t and
  base_control_t.
2016-09-15 18:06:56 +01:00
Vincent Coubard a86c4c38af Fix scope of the serial variable. 2016-09-15 18:06:55 +01:00
Vincent Coubard 6bd43b1415 Move defaults and handlers variable into a static function.
This change allow a lot of code from utest to be removed from the final
binary if not used.
2016-09-15 18:06:53 +01:00
Vincent Coubard 6c1a40f64b Replace default_handlers value by a reference. 2016-09-15 18:06:52 +01:00
Vincent Coubard b0bca4448c Convert case_control to a POD. 2016-09-15 18:06:51 +01:00
Vincent Coubard fdb105b492 Enhance compatibility between control_t and base_control_t:
* Add conversion operator in control_t to convert instances to base_control_t
2016-09-15 18:06:49 +01:00
Vincent Coubard 99add3e08f Construct control_t from a POD struct. Replace const control_t instances by this POD.
This save memory and prevent inclusion of the constants in the binary if
they are not used.
2016-09-15 18:06:48 +01:00
Vincent Coubard a173382718 Move constant definitions of non POD object into cpp file.
It save space and fix the ODR violation.
2016-09-15 18:06:47 +01:00
Vincent Coubard 5a2db63932 Move global Timeout object from utest_shim in static function.
The change of scope allow the linker to remove the variable if not used.
2016-09-15 18:06:45 +01:00
Vincent Coubard a369122c84 Move utest global serial object into a function.
That way it is not a global object anymore and is not attached to the
.init section and init array. If the function which contain the object is
not called then the serial object will not be present in the final binary.
2016-09-15 18:06:44 +01:00
Olaf Hagendorf 01a29404c4 disco_f769ni adding ethernet init
the IPV4 feature was already enabled in an earlier commit but the mbed 5 ethernet initialisation was missing
2016-09-15 18:06:43 +01:00
ohagendorf 0241fbf2f1 disco_f769 some rework ... (part II)
as suggested by adustm
2016-09-15 18:06:41 +01:00
ohagendorf 7fb952c3de disco_f769 some rework ...
as suggested by adustm
2016-09-15 18:06:40 +01:00
ohagendorf 5f9492b503 adding gcc_arm exporter definitions 2016-09-15 18:06:39 +01:00
ohagendorf fa2ff868c0 adding to build_travis 2016-09-15 18:06:37 +01:00
ohagendorf 85c3774ca6 adding rtos lib 2016-09-15 18:06:36 +01:00
ohagendorf a05e253df7 adding target 2016-09-15 18:06:35 +01:00
Mahadevan Mahesh 022a6ec320 KSDK: Updated version for the flexcan driver
- Add FlexCAN function pointer handler logic to save code size.
- CAN driver enter/exit Freeze mode issue

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-09-15 18:06:33 +01:00
Mahadevan Mahesh 3322e4a2af KSDK: Updated version of the SAI driver to address code-size issues
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-09-15 18:06:32 +01:00
Christopher Haster 5dbc3968c5 nsapi - Corrected handling of errors in TCPServer accept
- Corrected handling, before errors would forcibly restart the
  accept loop without checks for timeouts
- Rearranged accept logic to match the logic of
  recv/send/recvfrom/sendto
2016-09-15 18:06:31 +01:00
Christopher Haster db15a26d04 lwip - Fixed handling of max sockets in socket_accept 2016-09-15 18:06:29 +01:00
Christopher Haster 01c56d4106 lwip - Added check for previously-bound socket
Avoids what turns into an infinite loop in lwip's internals
2016-09-15 18:06:28 +01:00
Toyomasa Watarai c23f1c088c Use pre_main symbol instead of software_init_hook 2016-09-15 18:06:27 +01:00
Russ Butler 163a93460c Set size of callback irq array to IrqCnt
Rather than hard coding the size of the callback array for irqs,
instead set the size to IrqCnt which is defined by the irq enumeration.
2016-09-15 18:06:25 +01:00
svastm 085bd4294a Use lp_timer to count time in the deepsleep tests
Because microseconds timer can be disable during deepsleep
2016-09-15 18:06:24 +01:00
Russ Butler d64d696862 Add test case for thread self termination
Test that thread self termination works.
2016-09-15 18:06:23 +01:00
Russ Butler c5104fb0ed Properly handle a thread which terminates itself
In Thread::terminate() release the join semaphore before terminating
the thread. This allows the join semaphore to be properly signaled in
the case where a thread is terminating itself.
2016-09-15 18:06:21 +01:00
Brian Daniels 8cb8ee983d Correctly providing directories to build_apis
The shared `prepare_toolchain` and `scan_resources` functions in build_api
expect a list, not a string. This is different from the
toolchain.scan_resources function. Now the functions are being used
correctly within the `find_tests` function in test_api
2016-09-15 18:06:20 +01:00
Radhika 3389a3524a Adding ON Semiconductor copyright notice. 2016-09-15 18:06:19 +01:00
maclobdell abe05cc599 add PTEx pins as option for SPI - for SD card on Hexiwear. Amend to re-trigger CI. 2016-09-15 18:06:17 +01:00
Jussi Vatjus-Anttila d7109300fb Update pull_request_template.md 2016-09-15 18:06:16 +01:00
Jussi Vatjus-Anttila 8f30f26340 Update pull_request_template.md 2016-09-15 18:06:14 +01:00
Jussi Vatjus-Anttila 7e05502e44 Update issue_template.md 2016-09-15 18:06:13 +01:00