Go to file
Jamie Smith de0c404983
Synchronize changes with Mbed upstream: July 2024 edition (#309)
* remove stdio checks in serial init if no console is available

* STM32WL fix set preamble length to 8

* Add target support for XDOT_MAX32670

* TARGET_STM: only mask CAN rx interrupt after rx interrupt, not all CAN interrupts

* Sleep Radio in between DC scheduled

* Nuvoton HUSBD support endpoint write ZLP

* USBCDC: support ZLP

* Don't overlap STM32 FDCAN RAM sections

* allow to override antenna gain

* TFM: Fix undeclared function tfm_ns_interface_init

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: CAN: Fix filter mask

NOTE: This fix only targets CAN (M453/M487), not CAN-FD (M467).
NOTE: NUC472 CAN doesn't support filter.

* NUVOTON: CAN: Fix Rx interrupt doesn't work

Major modifications:
1. Handle Rx interrupt based on Message Object interrupt (CAN_IIDR=0x0001~0x0020) instead of CAN_STATUS.RxOK
2. Also handle Tx interrupt following above for consistency

Other related modifications:
1. Fix signature type error in CAN_CLR_INT_PENDING_BIT()
2. Add CAN_CLR_INT_PENDING_ONLY_BIT() which doesn't clear NewDat flag so that user can fetch received message in thread context

NOTE: This fix only targets CAN (NUC472/M453/M487), not CAN-FD (M467).

* NUVOTON: CAN: Fix Message Object number for Tx and recognition of Rx interrupt

1.  The same Message Object number cannot use for both Tx and Rx simultaneously.
    For Tx, Message Object number 31 is reserved instead of 0.
    For Rx, Message Object numbers 0~30 are used and for filters.
2.  NewDat bit (CAN_IsNewDataReceived()) isn't exclusive to Rx.
    Recognize Rx interrupt by Message Object number other than 31.

NOTE: This fix only targets CAN (NUC472/M453/M487), not CAN-FD (M467).

* NUVOTON: CAN: Fix filter mask being zero

On mask being zero, it means any match, not exact match.

NOTE: This fix only targets CAN (M453/M487), not CAN-FD (M467).
NOTE: NUC472 CAN doesn't support filter.

* Allow custom TCXO control parameter

Allow custom TCXO control parameter

* NUVOTON: EMAC: Fix undeclared function mbed_error_printf

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: AnalogIn: Fix undeclared function gpio_set

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: CAN: Fix undeclared function gpio_set

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: AnalogOut: Fix undeclared function gpio_set

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: SPI: Fix undeclared function gpio_set

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: I2C: Fix undeclared function gpio_set

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* NUVOTON: Serial: Fix undeclared function gpio_set

ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

* Add separate flags for I2C slave transfer in progress

Fixes ARMmbed/mbed-os#15498

Adds 2 boolean flags to the STM32 `i2c_s` object
to indicate whether a transfer is in progress,
separate from the existing "transfer pending" flags.

`i2c_slave_write`, `i2c_slave_read` and their associated callbacks
are modified to use these flags in addition to the pending flags.
The original behavior of the pending flags is preserved.

* ESP8266: Fix accessing uninitialized variable

* Added missing delete

* Add ability to change number of status registers for macronix QSPIF devices

* correct scan parameters types

* skip CRC when initializing TDBStore

Problem: The build_ram_table() function of TDBStore loops over every entry, calculates the checksum and compares them to the stored checksum in the entry header to ensure integrity. For larger TDBStores (e.g. 8 MiB or more) in external single-SPI flash devices this check can take very long, thus rendering it unusable in some cases.

Solution: The suggested solution skips the time consuming CRC of the data. After reading the key and calculating its CRC, it sets next_offset to the beginning of the next entry, thereby skipping the data. While this skips the integrity check, it significantly reduces the initial building of the RAM table.

The data CRC can be enabled or disabled with a compiler flag.

Contribution is provided on behalf of BIOTRONIK.

* Added missing check for replay protection pointer before allocating new variable

Problem: If a key with write-once flag is being set in a SecureStore without rollback-protection store (i.e. _rbp_kv == NULL), additional memory will be allocated for the variable _ih->key. The memory will not be deleted, though, as the delete in line 434 only happens if a rollback-protection store exists (i.e. _rbp_kv != NULL)

Solution: Only allocate the memory if _rbp_kv != NULL

Contribution is provided on behalf of BIOTRONIK.

* Increase AT timeout to 10s in AT_CellularSMS::send_sms

For some devices sending can be slow (as an example see SIM800, it can be up to 60s), command is being run properly but default timeout is returning an invalid error.
See https://www.elecrow.com/wiki/images/2/20/SIM800_Series_AT_Command_Manual_V1.09.pdf

* Increase AT timeout to 10s in AT_CellularSMS::get_sms

When SMS list is big and baudrate is not fast enough, with default timeout we can suffer from timeout error while getting a sms because method is parsing the full list and this takes long.

* Fix AT_CellularSMS::list_messages breaking in text mode when CRLF is contained in SMS payload text

When parsing SMS, it can happen that we receive CRLF in the SMS payload (happened to me when receiving provider texts).
As an example, we can receive:

"""
Hello <CR><LF>
World!
"""

With previous implementation, second consume_to_stop_tag was stopping in <CR><LF> and rest of the code was failing for obvious reasons.
With this commit we consume the full payload as bytes.

* Add missing SPDX identifier to a bajillion Nuvoton source files + some others

* More license fixes, upgrade M451 legacy PinNames.h, add MCU description

* Fix some more legacy pin names

---------

Co-authored-by: Jost, Chris <79271064+chrJost@users.noreply.github.com>
Co-authored-by: Charles <hallard04@free.fr>
Co-authored-by: Leon Lindenfelser <llindenfelser@multitech.com>
Co-authored-by: Pavel Sorejs <sorejs@gmail.com>
Co-authored-by: cyliang tw <cyliang@nuvoton.com>
Co-authored-by: jmcloud <jmcloud@tesla.com>
Co-authored-by: Chun-Chieh Li <ccli8@nuvoton.com>
Co-authored-by: Adam Gausmann <adamg@esdemc.com>
Co-authored-by: Mingjie Shen <shen497@purdue.edu>
Co-authored-by: Matthias Goebel <matthias.goebel@biotronik.com>
Co-authored-by: danielzhang <danielzhang@mxic.com.cn>
Co-authored-by: Mathieu Camélique <mathieu.camelique@edu.hefr.ch>
Co-authored-by: David Alonso de la Torre <davidalto97@gmail.com>
2024-07-21 00:16:51 -07:00
.github Fix deprecation issues with older Python code (#296) 2024-07-06 01:19:25 -07:00
TESTS Move Mbed TLS self tests to a separate configuration 2021-06-15 10:50:14 +01:00
UNITTESTS Rename inconsistently named testing-related variables. Also fix STM32CUBE not working from application code. 2022-09-14 00:25:29 -07:00
cmsis Refactor CYW43xxx wi-fi driver to better work with CMake and move code out of the Portenta target folder (#292) 2024-07-05 01:12:21 -07:00
connectivity Synchronize changes with Mbed upstream: July 2024 edition (#309) 2024-07-21 00:16:51 -07:00
docker_images/mbed-os-env Fix dockerfile typo 2022-09-14 00:25:26 -07:00
docs github actions for mbed-os-env docker management 2021-08-03 16:28:14 +01:00
drivers Synchronize changes with Mbed upstream: July 2024 edition (#309) 2024-07-21 00:16:51 -07:00
events mbed-ce@master + fixes + gcc 11 support (#135) 2023-02-21 09:04:34 -08:00
extern Allow Mbed CE to be built as an Arduino core (#206) 2024-01-13 10:01:45 -08:00
features Refactor CYW43xxx wi-fi driver to better work with CMake and move code out of the Portenta target folder (#292) 2024-07-05 01:12:21 -07:00
hal LPC1768: Rewrite I2CSlave HAL to match datasheet way of doing it (#280) 2024-05-23 23:12:10 -07:00
platform Synchronize changes with Mbed upstream: July 2024 edition (#309) 2024-07-21 00:16:51 -07:00
rtos Fix PWM API for reading period and pulsewidth on LPC1768 (#274) 2024-05-03 00:40:48 -07:00
storage Synchronize changes with Mbed upstream: July 2024 edition (#309) 2024-07-21 00:16:51 -07:00
targets Synchronize changes with Mbed upstream: July 2024 edition (#309) 2024-07-21 00:16:51 -07:00
tools Fix CellularInterface functions never being defined (#307) 2024-07-19 01:36:19 -07:00
.astylerc AStyle: fix indentation for longer lines 2018-05-24 14:15:52 +01:00
.codecheckignore .codecheckignore add STM mx_wifi files 2021-09-30 17:56:07 +02:00
.coveragerc Exclude libraries and tests from coverage numbers 2017-09-25 11:51:31 -05:00
.editorconfig Add .editorconfig file 2021-02-25 16:26:34 +01:00
.gitattributes Normalize line endings for IM880B startup files. 2019-07-15 14:56:22 +03:00
.gitignore Bring python packages into the mbed-os source (#192) 2023-10-10 09:54:53 -07:00
.gitmodules Add docs generation workflow (#45) 2022-09-26 08:15:30 -07:00
.lgtm.yml Rename inconsistently named testing-related variables. Also fix STM32CUBE not working from application code. 2022-09-14 00:25:29 -07:00
.mergify.yml mergify: fix needs work labels 2021-10-14 15:01:16 +01:00
.pylintrc Add pylint configuration file 2016-08-16 11:48:45 -05:00
CMakeLists.txt Allow Mbed CE to be built as an Arduino core (#206) 2024-01-13 10:01:45 -08:00
CONTRIBUTING.md Fix links to documentation on https://os.mbed.com 2019-01-21 14:56:40 -08:00
DOXYGEN_FRONTPAGE.md Updating with new links and correct branding 2020-08-12 10:49:05 +01:00
Jenkinsfile Updated file comment 2018-08-20 12:31:40 +03:00
LICENSE-apache-2.0.txt license: rename to apache 2.0 txt file 2019-02-13 11:28:01 +00:00
LICENSE.md Update LICENSE.md 2021-08-05 14:13:57 +03:00
README.md Updates to targets JSON and related stuff for the website generator (#265) 2024-04-09 18:37:39 -07:00
doxyfile_options Begin documenting Mbed OS target features and components (#240) 2024-02-08 22:46:20 -08:00
doxygen_options.json Begin documenting Mbed OS target features and components (#240) 2024-02-08 22:46:20 -08:00
logo.png Update readme to show that this is Mbed CE, and update templates to show that this is no longer an automated system 2022-09-14 00:25:30 -07:00
mbed.h Allow Mbed CE to be built as an Arduino core (#206) 2024-01-13 10:01:45 -08:00

README.md

Mbed OS

Mbed OS Community Edition

Build status master

Arm Mbed OS is an open source embedded operating system designed specifically for the "things" in the Internet of Things. It includes all the features you need to develop a connected product based on an Arm Cortex-M microcontroller, including security, connectivity, an RTOS and drivers for sensors and I/O devices.

Mbed OS provides a platform that includes:

  • Security foundations.
  • Cloud management services.
  • Drivers for sensors, I/O devices and connectivity.

This is Mbed OS Community Edition (CE), a fork focused on improving the build system and tooling, fixing bugs, and keeping maintenance going after ARM's step back from the Mbed project.

License and contributions

The software is provided under the Apache-2.0 license. Contributions to this project are accepted under the same license. Please see contributing.md for more information.

This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide.

Folders containing files under different permissive license than Apache 2.0 are listed in the LICENSE file.

Getting started for developers

To start a new project that uses Mbed CE, see the setup guide here.

We have a developer website for asking questions, engaging with others, finding information on boards and components, using an online IDE and compiler, reading the documentation and learning about what's new and what's coming next in Mbed OS.

Additionally, the discussions page on this repo can be used for proposing and discussing specific code changes.

Documentation

Mbed CE Docs

For the Mbed CE code-level documentation (Doxygen), see here. For an auto-generated listing of target boards supported by Mbed, and the drivers & features each target supports, see the targets index here and the drivers index here.

Mbed CE is still working on more complete documentation infrastructure. Eventually, we hope to migrate all of the docs and examples as well. However, for now, see below to access those on the original Mbed OS docs site.

Original ARM Mbed OS Docs

For more information about Mbed OS, please see the published Mbed OS documentation. It includes general overview information, step-by-step tutorials, porting information and background reference materials about our architecture and tools.