mbed-cli1 does not pass -I to IAR for iarasm (comparing to other toolchains). Because old tools are frozen,
we implement this workaround for fixing the build.
We use preprocessor macros that are passed to .S files anyway, so we do not loose anything but we do diverge again from CMSIS, for now..
In pursuit of increasing unit test coverage of Mbed OS, we add the
boilerplate code for unit testing of AnalogIn.cpp and an empty test
source file. This serves two purposes - it allows us to report on
currently untested sources in code coverage data, and it makes it a
little easier for developers to write unit tests for these sources.
The 'empty' test file contains a main function that simply returns. This
is required to allow CMake's add_executable() to be used to pull in the
source file for the SUT, which ensures that this source file is built
and therefore instrumented to generate coverage data. The alternative
that was explored was to instead use Google Test's TEST() macro and
prefix the test name with 'DISABLED_' to skip it, but that resulted in
the test being reported as skipped, which was deemed undesireable for
these 'empty' tests.
Currently there are no stub implementations of the analogin_api.c
functions. As the AnalogIn class makes use of these functions, these
stub definitions are required in order to build AnalogIn.cpp and
generate .gcno files to be used to generate code coverage metrics.
Unit tests for drivers are currently not checked for style compliance.
We should be checking coding style in unit tests, so we remove them from
the .codecheckignore file.
Current BT_POWER sequence:
1. BT_POWER=0 ( from CyH4TransportDriver::initialize)
2. delay 1ms ( from CyH4TransportDriver::initialize)
3. BT_POWER=1 ( from CyH4TransportDriver::initialize)
4. delay 500ms (from HCIDriver::do_initialize)
5. BT_POWER=1 (from HCIDriver::do_initialize)
6. delay 500ms (from HCIDriver::do_initialize)
updates:
1. remove 4) and 5)
2. keep all BT_POWER operations in one place. The best logic place is CyH4TransportDriver::initialize.
So finally the BT_POWER sequences should looks like:
1. BT_POWER=0 ( from CyH4TransportDriver::initialize)
2. delay 1ms ( from CyH4TransportDriver::initialize)
3. BT_POWER=1 ( from CyH4TransportDriver::initialize)
4. delay 500ms ( from CyH4TransportDriver::initialize)
As per STM32H7-series reference manuals:
"Up to 64 filter elements can be configured for 29-bit extended IDs."
This commit fixes a bug which prevented receiving CAN-messages
with extended IDs.
The PSA Attestation test suite requires full RTOS. There is no need
to explicitly check PSA support, because when we build all greentea
tests from the top of Mbed OS, PSA tests only get included if PSA is
enabled.
Add a new argument `TEST_SKIPPED` to `mbed_greentea_add_test()` to
indicate a test is skipped and give a reason (e.g. the Mbed target
and/or configuration does not provide what the test requires).
The skip reason of a test is printed when running tests with `ctest`,
and the test is marked as "Skipped" in the test report.
The github workflow to test building multiple executables was using the
soon to be deprecated docker image "mbedos/mbed-os-env:latest". This
commit points it at the new docker image on ghcr.io.
We weren't setting the "supported_application_profiles" correctly for
some baremetal supported targets. This didn't cause build failures with
mbed-cli 1 as it just seems to ignore this config parameter. In our CMake
build system we have added a hard dependency on the
supported_application_profiles; we fail the build if the profile we're
trying to build isn't in the list.
We were previously relying on the global MBED_PATH variable to provide
the root for the include path to the post build hooks. We can't
guarantee that MBED_PATH will be set by any application building us, so
use CMAKE_MODULE_PATH (which we always set) like we do for the other
post-build hooks.
Call add_test in mbed_greentea_add_test and specify mbedhtrun as the
command to run.
An MBED_HTRUN_ARGUMENTS variable has been added, which is a semicolon
separated list of arguments to forward to htrun. The user is required to
pass in any arguments mbedhtrun needs to communicate with the device
under test at CMake configuration time.
We automate passing some of the htrun arguments in CMake using data
provided by mbed_config.cmake or gathered from the CMake environment.
The following arguments are passed to htrun from CMake:
* -f/--image-path
* -e/--enum-host-tests
* -m/--micro
* -R/--reset-timeout
--baud-rate is also passed if the MBED_CONF_PLATFORM_STDIO_BAUD_RATE
config parameter is defined.
Temporary checks have been added to mbed_greentea_add_test to keep the
old flow working until we port all of the greentea tests to CTest. These
checks should be removed after we make all greentea tests runnable by
CTest.
We rely on external applications to set MBED_CONFIG_PATH and include
app.cmake. Mbed OS can't build for a target without those parameters
set. When building greentea tests there is no external application. So,
we define the appropriate settings in our root CMakeLists.txt for
greentea tests.
Add an option to enable the greentea tests independently from the unit
tests.
We can't just use the typical BUILD_TESTING option to enable greentea
tests. BUILD_TESTING enables unit tests and fetches googletest, which
are compiled for the host. Greentea tests are cross compiled and require
a toolchain file. For this reason we add a new option just to enable
greentea tests, preventing build failures triggered by the unit tests
and googletest.
This commit adds internal pullup on DP line for usb enumeration
in nucleo_l152re platform. This platform as such does not have
usb connector (device).
This has been tested with example in https://github.com/ARMmbed/
mbed-os/blob/master/drivers/usb/include/usb/USBMouse.h#L58-L76
and mbed_app.json file
"target_overrides": {
"*": {
"platform.stdio-baud-rate": 115200,
"platform.all-stats-enabled": true,
"mbed-trace.enable": "0"
},
"NUCLEO_L152RE": {
"target.device_has_add": ["USBDEVICE"]
}
}
}
Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
Add tests for `sfdp_parse_sector_map_table()` which currently (at the
time of this commit) supports flash devices with
* no Sector Map Parameter Table (i.e. the whole flash is uniform and
non-configurable)
* a single descriptor in the Sector Map Parameter Table (i.e. the
flash layout is non-configurable and has multiple regions)
Support and unit tests for flashes with multiple configurable layouts
will be added in the future.
Note: The implementation of `sfdp_parse_sector_map_table()` assumes
the table to be valid if read succeeds, so the SFDP reader callback
needs to ensure it reads data correctly or return an error.
Now, CYW43XXX Cordio HCI driver has the following MCU deep-sleep locking scenarios/flows:
a) A BT device or MCU does not support Low Power mode (MBED configuration does not include MBED_TICKLESS, DEVICE_SLEEP, DEVICE_LPTICKER or CYCFG_BT_LP_ENABLED features). In this case, CyH4TransportDriver locks deep-sleep in the initialize() function and unlocks the terminate() function.
b) A BT device and MCU support Low Power mode. In this case, the control of the unlock/lock of the deep-sleep functionality will be done in bt_host_wake_rise_irq_handler and bt_host_wake_fall_irq_handler handlers. Finally, CyH4TransportDriver unlocks the deep-sleep in terminate() function (if it was locked before) by checking the bt_host_wake_active flag.
Fixes#13076, #13700, #13295.