Skip to content

Release candidate for mbed-os-5.13.1 #10952

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

Merged
merged 413 commits into from
Jul 4, 2019
Merged

Release candidate for mbed-os-5.13.1 #10952

merged 413 commits into from
Jul 4, 2019

Conversation

artokin
Copy link
Contributor

@artokin artokin commented Jul 3, 2019

No description provided.

Filip Jagodzinski and others added 30 commits July 3, 2019 16:21
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
Flagging these functions out will reduce flash size more than 3k.
… 2. Remove macro MBEDTLS_PSA_CRYPTO_C from PSA targets

Signed-off-by: Devaraj Ranganna <[email protected]>
…size

Adding a check to let application or target force increase idle thread
stack size.
As the build tool in mbed-os 5.13 cannot appropriately deal with a segmented
bootloader when combining it with an application, this commit adjusts the
size reserved for interrupts (via the linker file) to avoid a bootloader
segmentation due to an unpopulated ROM area.

The microcontroller has a total of 60 vector interrupts + 16 exception
handlers. The allocated ROM flash for interrupts should be (60 + 16) x word
size in bytes = 76 x 4 = 304 = 0x130.

This commit changes the interrupt reserved space from 0x140 to 0x130.
In particular and as kindly suggested by Przemec S. :
1. Add setup/teardown handler’s for all cases. This disables sys-tick,
so there should be no unexpected lp ticker interrupt scheduling.
2. Modify setup/teardown handler’s: remove suspension of lp/us tickers,
so they can count as this is required by test_lock_unlock_test_check test
case.
3. Use TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep_test_check()) after
setting interrupt to cope with STM specific handling (CMPOK interrupt with
deep-sleep locked). This performs wait only if needed and will not affect
other targets which do not need extra wait.
4. Move sleep_manager_lock_deep_sleep() after TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep_test_check())
5. Use TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep_test_check()) in
test_lock_unlock_test_check to let lower layers manage deep sleep.
and avoid associated warning ...
Changes:
- restore the original form of setup/teardown handlers,
- test_lock_unlock_test_check(): do not use common ticker layer (Timer, Timeout). Use only ticker HAL layer.
- Increase DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US delta.
now that sleep_manager_can_deep_sleep_test_check() is based on wait_ns
With the DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US increased,
we now have TEST_ASSERT_UINT64_WITHIN(delta=1000, expected=1000, actual=1000)
so this assertion needed to be updated.

What we need is the deep sleep to be enabled after the programed interrupt
has fired and before a 2ms timeout expiration, which means >= 1000 and < 2000.
Add missing `lp_ticker_clear_interrupt()` in the interrput handler used
in `test_lock_unlock_test_check()` test.
Remove redefined `us_to_ticks()`.
Fix PWM glitch on write(), TARGET_STM/pwmout_api.c, #10734
Running PowerShell script on some windows machines is blocked.
To avoid this problem script was replace by the code run directly in PowerShell console.
@0xc0170
Copy link
Contributor

0xc0170 commented Jul 3, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jul 3, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

Copy link
Contributor

@teetak01 teetak01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not pass Client tests.

mbed compile -t ARM -m LPC55S69_NS --profile release --app-config wifi_esp8266_v4.json
[ERROR] Contents of region bootloader1 does not fit

This is increasing the binary size enough to break compilation with LPC55S69_NS target.

@teetak01
Copy link
Contributor

teetak01 commented Jul 4, 2019

This is related to target.restrict_size issues on this board (https://jira.arm.com/browse/IOTSTOR-880), which was fixed in #10791 and #10792, but it still does not seem to work as expected.

If this target does not compile, this is a release blocker.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 4, 2019

@ARMmbed/mbed-os-storage @ARMmbed/mbed-os-core You were involved in fixing previous fixes, please review these and lets find out why it's not working.

I'll set IOTSTOR-880 as a blocker now

@teetak01
Copy link
Contributor

teetak01 commented Jul 4, 2019

I verified that reverting #10792 fixes the compilation.

Revert "Fix: Allow target size restriction for LPC55S69"

This reverts commit 4451d64ea80405d70a708f44fc43030e0d34ced4.

This reverts commit 4451d64.
We postpone this fix to 5.13.2 due to its breakages for client for this target. It
needs more work.
@0xc0170
Copy link
Contributor

0xc0170 commented Jul 4, 2019

@teetak01 👍

Revert pushed, comment to the PR added as well. Will notify core team about this

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 4, 2019

CI restarted

Copy link
Contributor

@teetak01 teetak01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that the tests are passing now.

@mbed-ci
Copy link

mbed-ci commented Jul 4, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@0xc0170 0xc0170 merged commit 9cab583 into mbed-os-5.13 Jul 4, 2019
@hugueskamba
Copy link
Collaborator

This is related to target.restrict_size issues on this board (https://jira.arm.com/browse/IOTSTOR-880), which was fixed in #10791 and #10792, but it still does not seem to work as expected.

If this target does not compile, this is a release blocker.

@Teemu Did you increase the target.restrict_size in mbed_app.json to 0x5CE00?

@hugueskamba
Copy link
Collaborator

hugueskamba commented Jul 5, 2019

Here is what I just did to build.

  1. git clone [email protected]:ARMmbed/mbed-client-testapp.git
  2. mbed deploy --protocol ssh
  3. cd mbed-os && git cherry-pick 06c3a5bf25d443b6620362f241fd5b052b95f && cd ..
  4. cp configs-psa/wifi_esp8266_v4.json mbed_app.json
  5. Modified mbed_app.json in the following way:
    In the "LPC55S69_NS" attribute, change the value of "target.restrict_size" and "update-client.storage-size" to 0x5CE00
  6. Build a bootloader that includes the changes here: b0804c4
  7. Point "target.bootloader_img" in mbed_app.json with the bootloader just built
  8. mbed compile -t ARM -m LPC55S69_NS --profile mbed-os/tools/profiles/release.json

The build completes successfully.

@teetak01
Copy link
Contributor

teetak01 commented Jul 5, 2019

@hugueskamba you are using the wrong application. mbed-client-testapp is internal test-tool.

The compilation issue is with https://github.com/armmbed/mbed-cloud-client-example

@hugueskamba
Copy link
Collaborator

hugueskamba commented Jul 5, 2019

@hugueskamba you are using the wrong application. mbed-client-testapp is internal test-tool.

The compilation issue is with https://github.com/armmbed/mbed-cloud-client-example

@teetak01 Did you use a bootloader hex that was build with a version of mbed-os that included the following? b0804c4

@hugueskamba
Copy link
Collaborator

hugueskamba commented Jul 5, 2019

@teetak01 @0xc0170
As a reminder this is what needed to be done.

Mbed OS team:
Change sector size determined by CMSIS to be 512 for LPC55S69 - DONE
Modify interrupt size from 0x140 to 0x130 for LPC55S69 - DONE

Bootloader team:
Take Mbed OS release with above changes to build bootloader for LPC55S69_NS

Client team:
Replace bootloader hex pointed to by "target.bootloader_img" with newly built bootloader.
Increase "target.restrict_size" and "update-client.storage-size" to "0x5CE00" when building mbed-client-testapp

@teetak01
Copy link
Contributor

teetak01 commented Jul 5, 2019

I was already suspecting that this also requires a new bootloader. Thus the reverted change was a breaking change for existing applications, and can only go to Mbed OS major release, not to a patch release. The major release also has to happen at the same time client release provides the updated bootloader and configuration.

Thus this fix needs to be delayed to Mbed OS 5.14.0.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 5, 2019

Moving the referenced fix to 5.14

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 5, 2019

Thank you!

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.