* Deprecate RawSerial.
* Introduce UnbufferedSerial to provide unbuffered I/O by implementing
with a FileHandle interface for I/O streams.
* Add Greentea test for the UnbufferedSerial class.
Provide partial RTOS API for bare metal builds - things that
can be done in a single threaded environment.
Allows more code to work in both RTOS and bare metal builds without
change, and in particular gives easy access to the ability to
efficiently wait for something occurring in interrupt.
Available in bare-metal:
* ThisThread
* osThreadFlagsSet to set flags on main thread (can be set from IRQ)
* EventFlags (can be set from IRQ)
* Semaphores (can be released from IRQ)
* Mutex (dummy implementation)
Not useful:
* ConditionVariable (could only be signalled from 2nd thread)
* RtosTimer (calls in a second thread context)
* Thread
Unimplemented:
* Mail, Queue, MemoryPool
Possible future work:
* ConditionVariableCS to act as IRQ signalled ConditionVariable
Add a C++ `Atomic<T>` template to make atomics even easier. Basically
compatible with C++11 `std::atomic<T>`, but using the underlying
`core_util_atomic_xxx` functions from mbed_atomic.h, so appropriate for
synchronising with interrupts and optimised for uniprocessor.
One extra piece of functionality beyond the `core_util_atomic_xxx`
functions is the ability to have an arbitrary atomic type - eg a small
structure with 2 `uint16_t`s can be stored in a `uint32_t` container.
We will provide documentation how to create your own VirtualWatchdog. It's simple,
create timeout and watchdog objects.
This class brought lot of discussion and questions. After our refactor we made this class
just a linked list of objects - something tickers can do as well (they already have linked list) and handling hw should be
done via Watchdog due to the limitations (timeout can be set only once per app!).
- mbed_watchdog_mgr has interface name mbed_wdog_manager_start(),mbed_wdog_manager_stop(),mbed_wdog_manager_kick()
- HwWatchdog is going to attach with LowPowerTIcker for periodic callback functionality
- mbed_wdog_manager_start() will either get start either by BL/RTOS Aps,it reads the timeout value specified via macro and macro gets defined in target.json file.
- mbed_wdog_manager_start() internally configure below HAL hw watchdog with timeout specified via target.json
- mbed_wdog_manager_start() internally divide the timeout(specified in target.json) by the 2 and attach LowPowerTicker with periodic callback of hw_kick()
- mbed_wdog_manager_start() internally create one instance of sw watchdog class,to access the static list data structure of sw watchdog class
- mbed_wdog_manager_kick() function periodically get called and refresh the hw watchdog to avoid watchdog reset
- converted C++ code into C based APIs
- added boolean to control watchdog start and stop
- Added detach from ticker on stop API
Reimplement atomic code in inline assembly. This can improve
optimisation, and avoids potential architectural problems with using
LDREX/STREX intrinsics.
API further extended:
* Bitwise operations (fetch_and/fetch_or/fetch_xor)
* fetch_add and fetch_sub (like incr/decr, but returning old value -
aligning with C++11)
* compare_exchange_weak
* Explicit memory order specification
* Basic freestanding template overloads for C++
This gives our existing C implementation essentially all the functionality
needed by C++11.
An actual Atomic<T> template based upon these C functions could follow.
Make the following changes:
-Allow a vector specific ARM MPU driver by defining MBED_MPU_CUSTOM
-Allow ROM address to be configured for ARMv7-M devices by
setting the define MBED_MPU_ROM_END
-Add ROM write protection
-Add new functions and lock
-enable at boot
-disable during flash programming
Rename MpuXnLock to ScopedMpuXnLock so it has the same naming
convention as ScopedMutexLock. Also make this class inherit from
NonCopyable to prevent misuse.
Required for other representations of FileSystems, ie LocalFileSystem
Introduces FileSystemHandle for the same behaviour as FileHandle and
DirHandle.
Requires the following to hook into file/dir lookup:
```
int open(FileHandle **file, const char *filename, int flags)
int open(DirHandle **dir, const char *path)
```
This hook is provided by the FileSystem class, so requires no changes
from implementations.
Certain public APIs are being added to mbed.h so as to make them
part of namespace mebd.
APIs being added are:
* drivers/UARTSerial.h
* platform/ATCmdParser.h
* platform/mbed_poll.h
* netsocket/nsapi_ppp.h
Remove mbed OS and mbed 2 version macros. As master can break anytime (should
not break but can happen and shall be expected that there are changes that might affect the bleeding edge developers), there is no remedy for protecting
the sw via macros (either using some special versions, etc). If it is not
defined, means it is developed version of mbed OS/mbed 2 and it is up to a user
to track changes.
Any release of mbed OS 5 and mbed 2 contains these version macros. Thus won't break anything.
Flash IAP that provides erase/read/program to an internal API. It
invokes flash HAL functions.
FlashIAP checks for alignments for erase and program. HAL functions
do not, to avoid duplication per target implementation.
Add sleep/deepsleep functions to platform layer which are replacing HAL
functions with the same name, rename existing symbols in HAL layer
to hal_sleep/hal_deepsleep. This way sleep functions
are always available, even if target doesn't implement them, which makes
the code using sleep clearer. It also enables us to make decision on in
which builds (debug/release) the sleep will be enabled.
Allow compile-time tests on the version of mbed-os to cope with
e.g. API changes across versions.
To distinguish between mbed OS 2 and mbed OS 5, we use the
MBED_CONF_RTOS_PRESENT macro.
Note: mbed OS 2 versioning is 2.0.MBED_LIBRARY_VERSION
Added single-nested include directories to libraries built with the
legacy build_lib function. Unfortunately, to get this working without
a significant rewrite of the legacy build tools, library header files
are just duplicated in the precompile stage.
- Reverted requirements.txt for external dependency in mbed CLI
- Fixed MBED_CONFIG_FILE in paths.py
- Fixed MBED_LIBRARIES in paths.py
- Decreased include namespace for rtos.h