Commit Graph

7584 Commits (cb54c488d66ced1bd32355db2de6373370f68299)

Author SHA1 Message Date
Sam Grove 21dd7008a1 Merge pull request #2714 from adbridge/mbed-os-5.1
Release mbed-os-5.1.4 and mbed lib v126
2016-09-16 12:15:17 -05:00
Anna Bridge 6caef39312 Release mbed-os-5.1.4 and mbed lib v126 2016-09-16 11:19:54 +01:00
Brian Daniels 064037d519 Fixing NCS36510 compile on Linux
There was a case sensitivity issue when compiling the NCS36510 on Linux.
This commit changes the include directive to the proper case.
2016-09-15 18:07:33 +01:00
Tony Wu 1d57ff71f7 Tools - Fix fill section size variation
The linking order of object files affects the actual code placement,
which in turn affects the size of fill section due to the number of
zeros required to maintain appropriate data/code alignment may change.
This is observed when building on Mac and Linux host.

example: mbed compile -m K64F -t GCC_ARM (build 1)
+---------------------+-------+-------+-------+
| Module              | .text | .data |  .bss |
+---------------------+-------+-------+-------+
| Fill                |   120 |     4 |  2381 |
| Misc                | 28755 |  2216 |    84 |
| features/frameworks |  4236 |    52 |   744 |
| hal/common          |  2745 |     4 |   325 |
| hal/targets         | 12116 |    12 |   200 |
| rtos/rtos           |   119 |     4 |     0 |
| rtos/rtx            |  5721 |    20 |  6786 |
| Subtotals           | 53812 |  2312 | 10520 |
+---------------------+-------+-------+-------+

example: mbed compile -m K64F -t GCC_ARM (build 2)
+---------------------+-------+-------+-------+
| Module              | .text | .data |  .bss |
+---------------------+-------+-------+-------+
| Fill                |   128 |     4 |  2381 |
| Misc                | 28755 |  2216 |    84 |
| features/frameworks |  4236 |    52 |   744 |
| hal/common          |  2745 |     4 |   325 |
| hal/targets         | 12116 |    12 |   200 |
| rtos/rtos           |   119 |     4 |     0 |
| rtos/rtx            |  5721 |    20 |  6786 |
| Subtotals           | 53820 |  2312 | 10520 |
+---------------------+-------+-------+-------+

This patch fixes fill section size variation by sorting object
files before passing to linker.

Signed-off-by: Tony Wu <tung7970@gmail.com>
2016-09-15 18:07:32 +01:00
Conor Keegan cc8386da47 Add unit tests for app_config 2016-09-15 18:07:30 +01:00
Conor Keegan 9c05d88349 Add app config switch to options.py and make.py 2016-09-15 18:07:29 +01:00
Conor Keegan 9d368098e5 Add test command switch for app config file 2016-09-15 18:07:26 +01:00
ccli8 8e960adec5 Fix heap configuration error with armcc
In rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h, Image$$ARM_LIB_HEAP$$Base/Image$$ARM_LIB_HEAP$$Length will cause zero memory allocation.
Fix it with Image$$ARM_LIB_HEAP$$ZI$$Base/Image$$ARM_LIB_HEAP$$ZI$$Length. This is to place heap at external SRAM.
2016-09-15 18:07:25 +01:00
svastm 4ee629af12 Fix TCPServer constructor
- Avoid a call to the protected method `get_stack()` which cause a build fail.
 - Remove the constructor definition `TCPServer(NetworkStack *stack)`
   because it has no implementation.
2016-09-15 18:07:24 +01:00
Neil Thiessen b24c986ba4 Improve memory tracer
Fixed a bug and compiler warning in the memory tracer implementation.
2016-09-15 18:07:22 +01:00
Neil Thiessen e68b08e66b Fixed compiler warning suppression
"#3731-D: intrinsic is deprecated" compiler warnings should only be suppressed on the ARM toolchain.
2016-09-15 18:07:21 +01:00
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