Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release mbed-os-5.1.4 and mbed lib v126 #2714

Merged
merged 135 commits into from
Sep 16, 2016
Merged

Conversation

adbridge
Copy link
Contributor

Test results look similar to previous release.

@adbridge
Copy link
Contributor Author

/morph

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 15, 2016

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 870

Build failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 15, 2016

There's one failure - Building library mbed-build (NCS36510, GCC_ARM), can't spot the error though, please try locally

Cant spot the error, going to rerun it

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 15, 2016

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 871

Build failed!

@adbridge
Copy link
Contributor Author

adbridge commented Sep 15, 2016

Looks like for the failing target the source files are looking for NCS36510Init.h but the actual file is named ncs36510Init.h and thus fails. However the strange thing is that this was also the case for the previous release where this target built...
Furthamore this target builds locally on my windows machine for both GCC_ARM and IAR which makes me think it is a case sensitivity/insensitivity issue depending on the compiler machine!

@adbridge
Copy link
Contributor Author

/morph test

1 similar comment
@0xc0170
Copy link
Contributor

0xc0170 commented Sep 15, 2016

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: null

Examples Build failed!

@adbridge
Copy link
Contributor Author

10:13:15 ################################################################################
10:13:15 # Failed example combinations
10:13:15 #
10:13:15 mbed-os-example-uvisor K64F GCC_ARM

@bridadan
Copy link
Contributor

@adbridge Has this PR made it into this release? #2607

c1728p9 and others added 18 commits September 15, 2016 17:27
Keep track of the current size allocated, maximum size allocated,
number of allocations, failed allocations and total size allocated for
both GCC and ARM. Report the maximum size allocated at the end of
testing.

Also, add a test to verify heap metrics are working as expected.
Remove the handle swap in cfstore_test_delete_all. This prevents a
deleted handle from being used.
In the function raise_failure move the test_failure and case_failure
calls out of the critical section. This allows these handlers to run
without interrupts disabled and enables them to use rtos features
such as a mutex. This is required for heap metrics to work.
This commit adds a dynamic memory tracer that calls a callback whenever
one of the basic memory allocation functions (malloc, realloc, calloc,
free) is called. The operation of the tracer is guarded by the
'MBED_MEM_TRACING_ENABLED` macro.

Infinite recursion during tracing is guarded by using atomic
increment/decrement primitives on the `trace_level` variable.

Thanks to @c1728p9 and @Heky for their help and  suggestions.
Without this in place, traces might be lost if a another thread
interrupts a memory function at the right time.
Done already in 7c0cc50, same applied to alloc wrappers that was moved
from retarget.
The timing host tests reported success even if the total drift was
negative. This adds a check for this now.

The wait_us test now does not use a timer and just waits for 100000 us
between prints. This adds inherent drift, but it should still be well
under the limit.
Makes several broad changes:
 - removes dead code that dealt with the online build system
 - replaces export function with a much simpler one that:
   - does not copy any sources
   - the zip file hits the disk
   - the mbed_config.h hits the disk
   - the project files hit the disk
   - nothing else hits the disk
 - exporters use Resource object scanned with a toolchain
 - progen exporters don't optionally build a project instead they have a
   build function that may be called afterwards
 - much of the code passes pylint (have a score of 9 or above):
   - project.py
   - project_api.py
   - export/__init__.py
   - export/exporters.py
   - test/export/build_test.py
neilt6 and others added 19 commits September 15, 2016 18:07
Updated USBHost classes to use Callback<void()> and new Thread API to
fix compiler warnings.
Updated USBAudio and USBSerial to use Callback<void()> instead of
FunctionPointer to fix compiler warnings.
ARMmbed#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
```
…- 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.
…ly removed to work around CFSTORE issue 17/23 (realloc()).
Suppressed "ARMmbed#3731-D: intrinsic is deprecated" compiler warnings in critical API.
"ARMmbed#3731-D: intrinsic is deprecated" compiler warnings should only be suppressed on the ARM toolchain.
Fixed a bug and compiler warning in the memory tracer implementation.
 - 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.
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.
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 <[email protected]>
There was a case sensitivity issue when compiling the NCS36510 on Linux.
This commit changes the include directive to the proper case.
@adbridge
Copy link
Contributor Author

@bridadan it didn't originally due to conflicts but it has now after some whizzy conflict manipulation and backporting of #2487 !!

@adbridge
Copy link
Contributor Author

/morph test

@sg- sg- added the needs: CI label Sep 15, 2016
@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 874

All builds and test passed!

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 16, 2016

All green ! Thanks @adbridge for resolving the issue

@0xc0170 0xc0170 removed the needs: CI label Sep 16, 2016
@sg- sg- merged commit 21dd700 into ARMmbed:mbed-os-5.1 Sep 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.