Add a starter LGTM configuration file that tells LGTM what sort of files
we have in Mbed OS, what dependencies need installing, how to configure,
and how to build.
We tell LGTM to build Mbed OS's unit tests for the host toolchain, as a
start.
We install pip so we can install pypi's version of CMake, which is newer
than the current LGTM default version of 3.13.4.
Modified HAL_I2C_ErrorCallback function to solve bug reported in I2C Driver.
This commit solves compilation error occured when DEVICE_I2CSLAVE is not defined.
fix#14696
Signed-off-by: Affrin Pinhero <affrin.pinhero@hcl.com>
Modified HAL_I2C_ErrorCallback function to solve bug reported in I2C Driver.
This commit solves compilation error occured when DEVICE_I2CSLAVE is not defined.
fix#14696
Signed-off-by: Affrin Pinhero <affrin.pinhero@hcl.com>
Remove two expressions from at_cellularcontexttest that do nothing. This
fixes the following two warnings.
connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularcontext/at_cellularcontexttest.cpp:61:67: warning: expression result unused [-Wunused-value] ATHandler_stub::int_valid_count_table[kRead_int_table_size]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~^
connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularcontext/at_cellularcontexttest.cpp:64:66: warning: expression result unused [-Wunused-value] ATHandler_stub::read_string_table[kRead_string_table_size];
Many test stub functions are meant to return a value, but weren't. Clang
would generate a warning for each instance where we weren't returning
anything in a function that was meant to return a value.
warning: non-void function does not return a value [-Wreturn-type]
For a specific example, my_radio::time_on_air() is supposed to return a
uint32_t, but wasn't returning anything. We'll return a zero instead of
relying on undefined behavior.
Without this, clang 11.0.1 was generating a virtual function
implementation with a `ud2` instruction to abort at run-time, causing
some execution of some unit tests to abort.
Running main() from gmock_main.cc
[==========] Running 10 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 10 tests from Test_LoRaPHYUS915
[ RUN ] Test_LoRaPHYUS915.constructor
[ OK ] Test_LoRaPHYUS915.constructor (0 ms)
[ RUN ] Test_LoRaPHYUS915.restore_default_channels
[ OK ] Test_LoRaPHYUS915.restore_default_channels (0 ms)
[ RUN ] Test_LoRaPHYUS915.rx_config
[ OK ] Test_LoRaPHYUS915.rx_config (0 ms)
[ RUN ] Test_LoRaPHYUS915.tx_config
Process 35669 stopped
* thread #1, name = 'lorawan-loraphy-', stop reason = signal SIGILL: privileged instruction
frame #0: 0x0000000000276f73 lorawan-loraphy-us915-unittest`my_radio::time_on_air(this=0x0000000800c2b048, modem=MODEM_LORA, pkt_len='\0') at Test_LoRaPHYUS915.cpp:90:5
87 };
88
89 virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len)
-> 90 {
91 };
92
93 virtual bool perform_carrier_sense(radio_modems_t modem,
(lldb) disassemble --pc
lorawan-loraphy-us915-unittest`my_radio::time_on_air:
-> 0x276f73 <+67>: ud2
0x276f75: int3
0x276f76: int3
0x276f77: int3
(lldb)
- Remove redundant cmake script as already added the CMake configuration file
- Remove redundant empty_baseline as it is no longer needed with the help of CMake configuration file
The filter `--diff-filter=d' causes deleted files to be ignored from
the frozen tools check. But there is no reason for this, as deleting
a file can break compatibility with the legacy tools.
Having recently moved the frozen tools check to a standalone stage
at the end, we need to fetch the base branch so make comparison
work. Travis environments are not shared across different stages.
Without the fetch, the check always passes as a PR is compared with
itself.
We only compare files in current PR with the base branch. There's no
need to fetch the full git history or branches that are not involved
in the comparison.
This is to save time in Travis runs.
1. Update TF-M Secure bin enabling TRNG as entropy source
2. Replaced with above, remove TRNG HAL stuff on Mbed, including platform extra secure functions, cmake, etc.
1. Configure non-secure target name to NU_M2354 (targets/targets.json). No NU_M2354_NS alias
2. Following template target, enable image signing and concatenating in post-build process
(1) Add post-build script (tools/targets).
(2) Enable TF-M custom build by centralize relevant stuff imported from TF-M (COMPONENT_TFM_S_FW).
3. Add M2354Code.merge_secure into whitelist of uvision6 (tools/export/uvision/__init__.py).
4. Add M2354 CMSIS pack database (tools/arm_pack_manager/index.json).
5. Configure stdio baudrate to 115200 to match TF-M port (platform/mbed_lib.json).
6. Define CMSIS_NVIC_VIRTUAL to override NVIC_SystemReset with TF-M version (cmsis_nvic_virtual.h).
7. Override tfm_ns_interface_xxx(...) to enable NS secure call:
(1) At pre-rtos stage
(2) In SVC context
8. Implement secure function call with tfm_platform_ioctl(...).
9. Combine stddriver_secure.h/c and hal_secure.h/c into platform_extra_secure.h/c.
10. Fix peripheral base to non-secure (PeripheralNames.h) (TrustZone-unaware since Mbed OS 6.0).
11. Fix NU_PORT_BASE/NU_GET_GPIO_PIN_DATA/NU_SET_GPIO_PIN_DATA to non-secure (PinNamesCommon.h) (TrustZone-unaware since Mbed OS 6.0).
12. NSC convention for StdDriver sys/clk (both TF-M and Mbed must follow)
(1) SYS_ResetModule
Usage: Replaced with SYS_ResetModule_S on Mbed OS
Action: Make it inaccessible from Mbed (neither source nor NSC). Provide SYS_ResetModule_S on Mbed via platform ioctl instead.
(2) CLK_GetXxx
Usage: Called in bpwm/i2s/qspi/sc/sdh and system_M2354 on Mbed OS
Action: Make them inaccessible from Mbed (neither source nor NSC). Re-provide them on Mbed via platform ioctl instead.
13. Remove DISABLE/ENABLE macro definitions in BSP to avoid name conflict with other modules
14. Change to TMR4/5 from TMR2/3 for implementing us_ticker/lp_ticker because TMR2 is used for TF-M NSPE test
15. Support cmake
NOTE: Export(uvision6) doesn't support TF-M target. To enable it for partial compile on Keil, force below function to return true.
is_target_supported(tools/export/uvision/__init__.py)
Modified HAL_I2C_ErrorCallback function to solve bug reported in I2C Driver.
This commit solves compilation error occured when DEVICE_I2CSLAVE is not defined.
fix#14696
Signed-off-by: Affrin Pinhero <affrin.pinhero@hcl.com>