Mbed-os: Release Profile Causing Optimization Issues with Application Code

Created on 16 Jun 2020  路  9Comments  路  Source: ARMmbed/mbed-os

Description of defect

  • ARMC6 compiler optimization causes defective behavior when doing FOTA via PDMC 4.4.0 using mbed-os-example-pelion using standard release build. Switching between release and debug profile yield different application behavior.

Target(s) affected by this defect ?

  • Custom STM32F767ZI

Toolchain(s) (name and version) displaying this defect ?

  • ARMC 6.13

What version of Mbed-os are you using (tag or sha) ?

  • mbedos 6.0.0 (165be79)

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

  • Mbed Studio 1.0 on MacOS

How is this defect reproduced ?

  • Connect using STM32F767ZI with BG96 or ESP32
  • Compile mbed-os-example-pelion (PDMC 4.4.0) using release build.
  • Launch a firmware-over-the-air update from Pelion portal, and the client would be stuck at Awaiting download approval (UPD2_STATE_3)

[INFO][mClt]: M2MNsdlInterface::observation_to_be_sent() - send already in progress

Test Results:
Debug build profile, AT logging on, mbed trace level info - working
Debug build profile, AT logging off, mbed trace level info - got stuck
Release build profile, AT logging on/off, mbed trace level info - got stuck
Release build profile, AT logging on/off, mbed trace level debug - working
Release build with -Os or -O2, AT logging on/off, mbed trace level info - got stuck

@soleilplanet @desmond-blue

IOTOSM-2299 DONE mirrored bug

Most helpful comment

@lauleehong have you tried with latest master of Mbed OS? This looks similar to https://github.com/ARMmbed/mbed-os/issues/13772 and https://github.com/ARMmbed/mbed-os/issues/13792

All 9 comments

@lauleehong thank you for raising this issue.Please take a look at the following comments:

Could you add some more detail to the description? A good description should be at least 25 words.

NOTE: If there are fields which are not applicable then please just add 'n/a' or 'None'.This indicates to us that at least all the fields have been considered.
Please update the issue header with the missing information, the issue will not be mirroredto our internal defect tracking system or investigated until this has been fully resolved.

Is everything working as expected with Mbed OS 5.15?

Same issue with faced with 5.15.4 and 5.14.2

STM32F767ZI

This looks like a generic issue but we should be certain. Is only one target affected or more? If it's just one family, we would know this is in targets code.

cc @ARMmbed/team-st-mcd (if you are aware of any similar issue previously?)

I've only tested on my custom F767ZI board (identical to NUCLEO F767ZI, mostly header re-arrangements). However, @soleilplanet did manage to run it on his NUCELO F767ZI board.

@soleilplanet would you be able to test this with complete different family, even vendor change would be better.

Without further details, this is very generic issue that needs more investigation to find out the root case - at least the component that is causing it (target/pelion/core or similar).

Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers.
Internal Jira reference: https://jira.arm.com/browse/IOTOSM-2299

@lauleehong have you tried with latest master of Mbed OS? This looks similar to https://github.com/ARMmbed/mbed-os/issues/13772 and https://github.com/ARMmbed/mbed-os/issues/13792

@teetak01 Yes! I've just tested pdmc 4.7.0 using mbed-os-example-pelion 1.3.0, with mbed-os 6.5.0 - Issue no longer persist.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rbonghi picture rbonghi  路  3Comments

pilotak picture pilotak  路  3Comments

MarceloSalazar picture MarceloSalazar  路  3Comments

ashok-rao picture ashok-rao  路  4Comments

sarahmarshy picture sarahmarshy  路  4Comments