Commit Graph

32896 Commits (6919513a1a268ccee072d103947d2aa37497431d)

Author SHA1 Message Date
Martin Kojtal 6919513a1a fixup! aspell: fix dependencies missing 2021-04-19 12:51:25 +01:00
Martin Kojtal 487513614a fixup! aspell: fix dependencies missing 2021-04-19 12:41:34 +01:00
Martin Kojtal e98b0e6854 aspell: fix dependencies missing
As of ubuntu 20.04, the two deps for aspell are missing.
2021-04-19 09:50:44 +01:00
Martin Kojtal dfcbf0a66a Travis: remove littlefs generic tests
They do not add any value as littlefs library contains own tests, we do not need to duplicate them in Mbed OS.
We test integration with our libraries.
2021-04-19 09:19:59 +01:00
Martin Kojtal 5057bfd9bd Travis: update to 20.04
Updating to the latest Travis provided environment. It's been a year around and we can benefit from
more updated versions we use.

More info https://docs.travis-ci.com/user/reference/focal/
2021-04-15 13:34:31 +01:00
Martin Kojtal 1fd4cfd798
Merge pull request #14516 from 0xc0170/fix-cmake-project-name
CMake: remove MBED_PATH and use <PROJECT-NAME>_SOURCE_DIR/MODULE_PATH instead
2021-04-15 14:00:21 +02:00
Martin Kojtal 076cf3557a
Merge pull request #14546 from rwalton-arm/dev/rwalton-arm/fix-connectivity-driver
CMake: Fix mbed-802.15.4-rf driver
2021-04-15 11:43:30 +02:00
Martin Kojtal b5652a45c9
Merge pull request #14483 from LDong-Arm/tdbstore_whitebox_low_ram
Improve HeapBlockDevice, TDBStore and tests
2021-04-15 10:36:36 +02:00
Martin Kojtal a3be10c976
Merge pull request #14541 from LDong-Arm/crash-reporting-baud
Increase baud rate of mbed-os-example-crash-reporting to 115200
2021-04-14 20:16:32 +02:00
Martin Kojtal dd1da3da40
Merge pull request #14469 from jeromecoutant/PR_FLASH_PROGRAM
STM32: remove critical sections in flash_program_page
2021-04-14 20:15:11 +02:00
Lingkai Dong 7b763be0e3 TDBStore Whitebox tests: fix memory check
Each block of HeapBlockDevice is only allocated from the heap when
that block is programmed. And erasing a block frees the associated
buffer.

To decide if there is enough heap to run the TDBStore Whitebox tests,
we need to perform a trial program() instead of erase().
2021-04-14 17:19:38 +01:00
Lingkai Dong aedc6009ea TDBStore: call `BlockDevice::erase()` regarless of erase value
From the documentations of `BlockDevice::get_erase_value()`:

    -1 if you can't rely on the value of the erased storage

and `BlockDevice::program()`:

    The blocks must have been erased prior to being programmed

So, `BlockDevice::erase()` should always be called regardless of
erase value.
2021-04-14 17:19:38 +01:00
Lingkai Dong fb4e5e80b4 TDBStore: optimize erase algorithms
Currently `TDBStore::offset_in_erase_unit()` and
`TDBStore::check_erase_before_write()` loop through erase units
one-by-one, until the entire range is covered. This is very inefficient
when the erase size is tiny, e.g. one-byte on a non-flash device for
which we use program as erase.

This commit reworks the algorithms, based on the fact that a block
device can erase or program as many units as needed in one go.
2021-04-14 17:19:38 +01:00
Lingkai Dong e8070514b1 FileSystemStore unit test: remove erased_set_get test
The "erased_set_get" test case deinits `FileSystemStore`, erases the
block device, and reinits `FileSystemStore`. This of course fails,
because `BlockDevice::erase()` removes all stored data including the
format of the `FileSystem` (middle layer), unless the particular type
of block device has a no-op erase implementation.

Note: Previously `HeapBlockDevice::erase()` was essentially a no-op
so this test case did not fail. We recently added the freeing of heap
memory and it uncovered the problem.
2021-04-14 17:16:54 +01:00
Lingkai Dong 6b5e467f96 HeapBlockDevice::erase(): free up heap memory
`HeapBlockDevice::erase()` previously performed a range and alignment
check only. This commit adds freeing of heap memory.
2021-04-14 17:00:17 +01:00
Lingkai Dong 7ef9e6175f HeapBlockDevice: allocate with std::nothrow
Mbed OS does not enable C++ exceptions, so we should call `new` with
`std::nothrow` which returns a C-style NULL pointer when allocation
fails to allow error handling.

For consistency of style within the same file, this commit also
replaces `malloc()` and `free()` to `new (std::nothrow)` and `delete`.
2021-04-14 17:00:17 +01:00
Martin Kojtal bedd5727af
Merge pull request #14486 from jeromecoutant/PR_CLI2_BLE
CMake COMPONENT_BlueNRG_MS: fix mbed-ble
2021-04-14 16:27:25 +02:00
Anna Bridge 68eff877ca
Merge pull request #14545 from Patater/deprecate-bootloader-example
examples: Deprecate mbed-os-example-bootloader
2021-04-14 13:21:53 +01:00
Martin Kojtal 121c8286da CMake: set CMAKE_MODULE_PATH in the Mbed OS CMakelists.txt
Update CMAKE_MODULE_PATH at once place.

Note, we update also CMAKE_MODULE_PATH in app.cmake. This is temporary until we get a proper way to include
Mbed Os (removing app.cmake need to be included by an application).
2021-04-14 13:09:28 +01:00
Martin Kojtal 65e246fe4d CMake: add mbed_ prefix to our CMake files
To avoid conflicts as we expose our CMake list files via CMAKE_MODULE_PATH. Some files already include it, this
aligns the rest of files.

I leave app.cmake as it is - it's user facing and it would be breaking change. We can clean this one for the next major version.
2021-04-14 13:09:27 +01:00
Martin Kojtal b6a90c4ae1 CMake: fix for CMAKE_CURRENT_LIST_DIR in functions
CMAKE_CURRENT_LIST_DIR behaves differently in functions. We store it in the CMakeLists itself, so anyone
calling a function would get the actual list dir where the scripts are.

To illustrate: if I call a function from src/CMakelists.txt, function located in src/scripts, `CMAKE_CURRENT_LIST_DIR` in the function would point
to the src/ folder but not to src/scripts.
2021-04-14 13:09:27 +01:00
Martin Kojtal ed609f57c4 CMake app: add our cmake folder to CMAKE_MODULE_PATH
All files within tools/cmake can now include within tools/cmake. We do not expose
internal folders like core/profiles/toolchains.
They should be included via toolchain file (mbed_toolchain in our case).
2021-04-14 13:09:27 +01:00
Martin Kojtal b88d5687e2 CMake tools: use CMAKE_CURRENT_LIST_DIR instead of MBED_PATH
Excluding greentea tests, they will be fixed separately (more work needed).
2021-04-14 13:09:27 +01:00
Martin Kojtal afd938491a CMake platform: remove MBED_PATH, use standard variables
As we still use target labels, TFM is not visible to CMake. Protect include of their scripts with the same mechanism.
2021-04-14 13:09:26 +01:00
Martin Kojtal dfc4010e24 CMake targets: remove MBED_PATH, use stadard variables
- list files included via module path
- <project-name>_SOURCE_DIR for sources that are out of the current processed CMake
- CMAKE_CURRENT_LIST_DIR for listfiles
2021-04-14 13:09:26 +01:00
Robert Walton c7c2580f9e CMake: Fix mbed-802.15.4-rf driver
mbed-nanostack should depend on mbed-802.15.4-rf to avoid a linker error
with an undefined reference to `NanostackRfPhy::get_default_instance()`.
The error occurs when `device_has: 802_15_4_PHY` is defined and the
consumer depends on mbed-nanostack in their CMakeLists.txt. Previously
we linked mbed-nanostack to mbed-802.15.4-rf, so mbed-802.15.4-rf's
usage requirements weren't forwarded to consumers who depended on
mbed-nanostack.

With the previous configuration, the consumer would have to depend on
mbed-802.15.4-rf directly to avoid an issue. This seems like a layering
violation: it appears that mbed-nanostack is "the API" and
mbed-802.15.4-rf is one of several possible implementations which are
selected based on configuration macros.

This commit changes the flow of dependencies so that mbed-nanostack ends
up with the correct symbol definitions.
2021-04-14 12:30:35 +01:00
Jaeden Amero f02fbaa061 examples: Deprecate mbed-os-example-bootloader
We no longer support the mbed-os-example-bootloader example.
2021-04-14 11:57:14 +01:00
Martin Kojtal f4f8d8fd3f
Merge pull request #14543 from praveenCY/pr/fix_uart_enable
Fix Unbuffered serial enable/disable issue on Cypress kits
2021-04-14 11:09:24 +02:00
Martin Kojtal c5f28e6037
Merge pull request #14481 from jeromecoutant/PR_LORA_ERROR
STM32WL: update "lora.max-sys-rx-error"
2021-04-14 09:54:53 +02:00
Martin Kojtal 033094f84d
Merge pull request #14467 from LDong-Arm/b1_fix
Musca targets: align and clean up configurations
2021-04-14 09:54:46 +02:00
Martin Kojtal 8b8f4e52a0
Merge pull request #14521 from AnishKumarHCL/pwm_gpiopull_fix
Updated TARGET_STM32 board  pinMap_PWM table with GPIO_NOPULL
2021-04-14 09:54:22 +02:00
Chandran Praveen Babu (CYSC CSS ICW SW PSW) af44532ca4 Fix Unbuffered serial enable/disable issue on Cypress kits 2021-04-13 15:33:25 -07:00
Lingkai Dong b5893bebbb Increase baud rate of mbed-os-example-crash-reporting to 115200
At 9600 baud, a large part of the serial output of the crash reporting
example is missing on CI boards, causing the example test to fail. At
a higher serial speed (115200 baud), the entire output is intact.

This is in alignment with ARMmbed/mbed-os-example-crash-reporting#65.

Fixes #14535
2021-04-13 16:10:39 +01:00
Martin Kojtal 06a33d37f8
Merge pull request #14436 from paul-szczepanek-arm/remove-services
BLE: replace obsolete services with the new services repo
2021-04-13 16:00:58 +02:00
Martin Kojtal b1e26c6f35
Merge pull request #14435 from LDong-Arm/CRYPTOCELL310_linking
Fix missing linkage of mbed-mbedtls-cryptocell310 to mbed-mbedtls
2021-04-13 16:00:43 +02:00
Martin Kojtal bfdd9163e0
Merge pull request #14532 from kjbracey-arm/ticker_log1
Make ticker computation use shift-by-0
2021-04-13 12:07:16 +02:00
Martin Kojtal 291beda749
Merge pull request #14359 from harmut01/baremetal_nxp
Add bare metal support to NXP targets
2021-04-13 10:58:46 +02:00
Martin Kojtal 38796d0a88
Merge pull request #14424 from 0xc0170/fix-wio-bg96-cellular
WIO_BG96: fix macro exclusion - use cellular
2021-04-12 16:17:54 +02:00
Martin Kojtal 1aa38b49ba
Merge pull request #14524 from OpenNuvoton/nuvoton_m487_adjust-wdt-reset-reglock
M487: Adjust placement of SYS_UnlockReg in WDT reset code
2021-04-12 14:54:35 +02:00
Martin Kojtal f2b2f42616
Merge pull request #14527 from LDong-Arm/nfc_example_target
Tests: use only NUCLEO_F401RE for the NFC examples
2021-04-12 14:54:23 +02:00
jeromecoutant 57ce710119 [CMAKE] COMPONENT_BlueNRG_MS: fix mbed-ble 2021-04-12 11:33:57 +02:00
Kevin Bracey 904d4e4d2b Make ticker computation use shift-by-0
Runtime code that analysed clock frequency to determine numerator and
denominator for conversion to standard 1MHz failed to handle the case
of either being 1 correctly.

Although it would spot other values that could be performed as shifts,
it failed to spot that 1 is "shift by 0", so would end up doing runtime
multiply and/or divide by 1. The runtime divide by 1 could be slow on a
Cortex-M0 device, increasing interrupt latency.

UART character loss on STM32F0 devices has been traced to this incorrect
code.

Correct the `exact_log2` routine so that `exact_log2(1)` returns 0 to
fix this.

Original code had a single special no-multiply-or-divide case for
hardware clock frequency being exactly 1MHz, as USTICKER is on STM32F0 -
this code lacks that but has a more general special case that covers all
shift-convertible frequencies like 500kHz or 8MHz, which should be
similar speed as shifts are cheap.
2021-04-12 09:46:42 +03:00
Lingkai Dong e6610bd111 Use only NUCLEO_F401RE for the NFC examples
The repository mbed-os-example-nfc contains two examples: NFC_EEPROM
and NFC_SmartPoster. According to their respective `mbed_app.json`,
only NUCLEO_F401RE supports both examples, so we limit the compilation
test to this target only.

Compilation with an unsupported target fails (as expected) with Mbed
CLI 2 which enforces a check on a target's availability of the
required NFC controller. Mbed CLI 1 lacks such check and always
compiles.

Fixes ARMmbed/mbed-os-example-nfc#106
2021-04-09 10:38:01 +01:00
Martin Kojtal 35b8e558e9
Merge pull request #14491 from ARMmbed/docs-fpga
Update FPGA documentation
2021-04-09 10:09:34 +02:00
harmut01 9c73e09b06 Add bare metal support to ARCH_PRO 2021-04-08 17:24:09 +01:00
Anish Kumar 780d7c4a00 Updated TARGET_STM32 PeripheralPins.c and PeripheralPinMaps.h Replaced GPIO_PULLUP with GPIO_NOPULL in PinMap_PWM table 2021-04-08 18:42:01 +05:30
Anish Kumar 44be594792 Modified STM32_gen_PeripheralPins.py replaced GPIO_PULLUP with GPIO_NOPULL in print_pwm function 2021-04-08 18:13:50 +05:30
Anish Kumar d8d19b186d removed pin_mode api call from pwmout_init_direct api 2021-04-08 18:13:10 +05:30
Martin Kojtal 1413c42410 CMake: use project name for Mbed OS
This enables multiple variables we can use. One of them is source dir for a project.

It will replace MBED_PATH in the tree.
2021-04-08 13:25:02 +01:00
Chun-Chieh Li df4f1a3387 M487: Adjust placement of SYS_UnlockReg in WDT reset from PD patch
This adjustment has two purposes:
1.  Avoid misleading placement of SYS_UnlockReg for WDT clock setting
2.  Safer for power-down
2021-04-08 17:18:38 +08:00