Commit Graph

1040 Commits (73b030623033ea0436fda91cf83e5584da40cdb8)

Author SHA1 Message Date
Jamie Smith 699437ecf9
Allow Mbed CE to be built as an Arduino core (#206)
* Various changes for Arduino core support

* Apply Arduino Mbed TLS patches

* Apply linker script patch, add missing CXX standard

* Fix SDBlockDevice compile error, fix "no rule to make mbed-target-config.h"

* Fix missing source file for RPi Pico

* Fix missing licenses
2024-01-13 10:01:45 -08:00
Jamie Smith 8e38d02ced
Fix issues with new async SPI changes that broke compiling for B_U585I_IOT2A (#204)
* Fix issues with new async SPI changes that broke compiling for B_U585I_IOT2A

* Few more incorrect nullptrs

* Fix style
2024-01-11 12:23:03 -08:00
Jamie Smith eee0647897
Reactivate some Network & Netsocket tests, Mbed TLS tests, Device Key test. Also fix lots of deprecation warnings (#189)
* Reactivate some Network & Netsocket tests, Mbed TLS tests, Device Key test.  Also fix lots of deprecation warnings

* Style fix tcpsocket_endpoint_close.cpp

* Style fix ../lp_ticker/main.cpp

* Style fix ../lp_ticker/main.cpp

* Handle tests which require an RTOS

---------

Co-authored-by: JohnK1987 <Odiin@seznam.cz>
2023-10-01 15:23:59 -07:00
Jamie Smith 86723f7dab
Synchronize changes with Mbed upstream: September 2023 edition (#185)
* Fix null pointer dereferencing

Add null check for return values of functions that are mostly (but not
always) checked for null.
E.g., since 98% of calls to protocol_stack_interface_info_get_by_id
check for null, it is likely that the function can return null values in
some cases, and omitting the check could crash the program.

* Update MAX32660 peripheral drivers with final ones that use by SDK

* Apply MAX32660 delta
Update mbed hal function as per of SDK update

Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>

* M2354: Fix debug failure in Mbed Studio

In Mbed Studio, debugging, based on pyOCD, requires Mbed OS application code starting on the sector boundary.

Modification list:
1.  Update TF-M import assets with MCUboot header padding to sector aligned
2.  Following above, change header size argument (-H) in wrapper.py command line
3.  Following below, fix min-write-size (--align) to 4 (per flash_area_align()) in wrapper.py command line
    https://docs.mcuboot.com/design.html#image-trailer

Related issue:
https://github.com/ARMmbed/mbed-os/issues/15417

* Do not clear interrupt flag during initialization
This causes issue for repeaded initialization while using BufferedSerial mode

Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>

* MAX32660, MAX32670 UART performance improvement

Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>

* Handle negative values passed to close()

Calling close() with negative numbers causes out-of-bounds indexing of the filehandles array. For example, this can happen if open() returns an error and the value is later passed to close().

* Moved a { to the same line as if

Moved a { to the same line as if

* add nullpointer check in LWIP::socket_close

* Fix crash when using FDCAN3 RX IRQ on STM32G473 (and others)

* connectivity: drivers: Update Nuvoton M467 EMAC DMA_IE ctl

In IRQ Handler, to disable some interrupt type of DMA error.
It could avoid unexpected repeated interrupt.The masked bit of
DMA_IE could be recovered in next EMAC IRQ event.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>

* Add workaround for G474 hardfault

* update drivers STM32WL CUBE V1.3.0

* Changed static to weak

* Fix: Do not disable SPI for manual drive mode during transaction setup
It has been reported that disabling SPI module causes glitch for manual SS drive mode

Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>

* make cellular event queue size configurable

update unit tests

---------

Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
Co-authored-by: Mingjie Shen <shen497@purdue.edu>
Co-authored-by: Ahmet Polat <Ahmet.Polat@maximintegrated.com>
Co-authored-by: Sadik.Ozer <sadik.ozer@analog.com>
Co-authored-by: Chun-Chieh Li <ccli8@nuvoton.com>
Co-authored-by: alrvid <126816223+alrvid@users.noreply.github.com>
Co-authored-by: Jost, Chris <79271064+chrJost@users.noreply.github.com>
Co-authored-by: Joseph Duchesne <joseph@avidbots.com>
Co-authored-by: cyliang tw <cyliang@nuvoton.com>
Co-authored-by: Maxim Markin <mak22223@ya.ru>
Co-authored-by: Charles <hallard04@free.fr>
Co-authored-by: Lukas Karel <lukas.karel@world-direct.at>
2023-09-24 23:37:28 -07:00
timIdeaTech 34d31bd033
Bug fix/lorawan sx127x get status type (#173)
* Update LoRaRadio.h - radio_settings.state type

* Update SX1272_LoRaRadio.cpp - fix get_status() return type

* Update SX1276_LoRaRadio.cpp - fix get_status() return type
2023-07-23 13:55:41 -07:00
Jamie Smith 946a1b57cb
Fix LoRaWan compile error, add DISCO_L072CZ_LRWAN1 upload method configuration (#170) 2023-07-20 09:24:05 -07:00
Jamie Smith a639176603
Fix declaring OSPIFBlockDevice and QSPIFBlockDevice as globals, fix some STM32U585 issues (#167)
* Attempt to fix declaring an OSPIFBlockDevice as a global object

* Astyle format

* Add B_U585_IOT02A upload method support and default OSPIF mappings.  Guard against incorrect case on upload method

* Also fix the same error in QSPIFBlockDevice

* Fix compile error for mbed-wifi

* Provide ScopedMutexLock for unittests mode
2023-07-17 19:52:38 -07:00
Jookia 6b56f1c77d
LWIP::get_ip_addr: Prefer IPv4 over IPv6 link local addresses (#161)
When IPv6 is prefered it will choose a link local address on a network
that lacks IPv6 over a working IPv4 network, breaking networking.
Change this behaviour to prefer a link local address only as a last
resort.

This also changes LWIP::get_ipv6_addr to not return link local
addresses. Use get_ipv6_link_local_addr instead for this.
2023-05-23 10:49:59 -07:00
Jamie Smith 3f7d67c64c
Synchronize upstream changes - May 2023 edition (#160)
* fix STM32L1 FLASH_SIZE for cat.3 devices with DEV_ID 0x436

* Fix mesh connect semaphore not releasing causing blockage

* Add support of NSAPI_ICMP sockets in Nanostack

* STM32F1: add MCU_STM32F103xD support

* STM32F1: add MCU_STM32F103xG support

* test: Disable failing tests due to echo server

Some tests are failing as echo.mbedcloudtesting.com is not serving TLS
requests anymore.

Signed-off-by: Saheer Babu <saheer.babu@arm.com>

* Check CAN DLC length value

* Fix default interface ID only being used partially

If user sets the default interface ID for a socket (e.g. using setsockopt
with SOCKET_INTERFACE_SELECT), the default interface should take over
other interface selection mechanisms as a interface is bound to the socket.
This applies for both IPv6 local and global scopes for unicast messages
but not for multicast messages as these are bound to a multicast interface
using SOCKET_IPV6_MULTICAST_IF socket option.

* Targets: NXP: IMXRT: Fixed GCC_ARM lds syntax.

Signed-off-by: Yilin Sun <imi415@imi.moe>

* CAN: read only up to 8 bytes

If HAL implementation writes more than 8 bytes of data, error immediately.
CANMessage defines only 8 bytes of data, lenght cannot be > 8.

This fixes https://github.com/ARMmbed/mbed-os/issues/15361

Signed-off-by: Martin Kojtal <martin.kojtal@arm.com>

* STM32F303xC: add RAM_CCM in GCC linker script

* fix(drivers/emac): Remove incorrect RMII RX ER initialization

* fix(drivers/emac): Add missing SPDX indetifier to ST driver files

* fixed compiler inline issue

* Update Mbed version block

* removed HSE speed limitation for STM32G431RB

* Added HSE range validation for STM32g431xB

* added support for 4, 8 and 16MHz

* M487: Remove unused variable 'u32EscapeFrame'

Remove unused variable 'u32EscapeFrame' in BSP m480_ccap.h to avoid warnings

* force FIFO IRQ for FDCan RX on H7

* Add hardware CRC support to STM32G4

* add support for Nucleo-H745ZI

* Update MAX32670 peripheral drivers with final ones that use by SDK

Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>

* MAX32670 apply mbed required changes on peripheral drivers

Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>

* M467: Support CAN bus

1.  Update BSP CANFD driver
2.  Notes for implementation
    (1) Each CANFD instance supports two IRQ lines. Use only line 0. Line 1 is not used.
    (2) For Rx disabling multiple filter handles,
        1)  Map all filter handles to filter handle 0
        2)  Use Rx FIFO 0 for filter handle 0
    (3) For Rx enabling multiple filter handles,
        1)  Use Rx FIFO 0 for filter handle 0
        2)  Use Rx FIFO 1 for filter handle through first invoking can_filter()
        3)  Use dedicated Rx Buffer for other filter handles
        NOTE: H/W supports mask on Rx FIFO 0/1 but not on dedicated Rx Buffer.
    (4) For Tx, use only dedicated Tx Buffer. BSP CANFD driver doesn't support Tx FIFO/Queue.
    (5) Support no CAN FD.

* Fix 'new[]' array freed with 'delete'

The array _scratch_buf is allocated using new[] in line 761 of
mbed-os/storage/kvstore/securestore/source/SecureStore.cpp.
But it was freed using delete.

* Define default parameters of functions of derived class the same as the base class

The member function bringup() of class ThreadInterface redefines
parameter stack's default value to IPV6_STACK from the inherited default value
DEFAULT_STACK (in Interface).
The default value will be resolved statically, not by dispatch, so this
can cause confusion.
Similar arguments apply to LoWPANNDInterface and WisunInterface.

* Avoid calling virtual functions from constructors and destructors

Virtual functions are resolved statically (not dynamically) in
constructors and destructors for the same class. The call should be made
explicitly static by qualifying it using the scope resolution operator.

* Fix potentially overrunning write of sprintf

Format string "%d" requires 12 bytes (including the null terminator).
Also, use snprintf instead of sprintf to prevent buffer overflow.

* Fix system_clock.c location

Signed-off-by: Jasper Jonker <jasper.jonker@wingtra.com>

* Fix variable name

Signed-off-by: Jasper <jasper.jonker@wingtra.com>

* Change storage-class of secret_buf to static

Storing the address of a local variable (`secret_buf`)
in non-local memory (`prf_ptr->secret`) can cause a
dangling pointer bug if the address is used after the function returns.

* fix compiling errors of FATFileSystem when exFAT was enabled

* Add OSPI support for STM32H7

* Nuvoton: Enable extending sampling time for ADC/EADC

For all Nuvoton targets, enable extending sampling time in ADC/EADC clocks on per-pin basis.

---------

Signed-off-by: Saheer Babu <saheer.babu@arm.com>
Signed-off-by: Yilin Sun <imi415@imi.moe>
Signed-off-by: Martin Kojtal <martin.kojtal@arm.com>
Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
Signed-off-by: Jasper Jonker <jasper.jonker@wingtra.com>
Signed-off-by: Jasper <jasper.jonker@wingtra.com>
Co-authored-by: caodd <caodd1993@qq.com>
Co-authored-by: YannCharbon <yann.charbon@ik.me>
Co-authored-by: Jerome Coutant <jerome.coutant@st.com>
Co-authored-by: Saheer Babu <saheer.babu@arm.com>
Co-authored-by: Martyx00 <martin.petran@protonmail.com>
Co-authored-by: Yilin Sun <imi415@imi.moe>
Co-authored-by: Martin Kojtal <martin.kojtal@arm.com>
Co-authored-by: akiroz <akiroz.vectis@gmail.com>
Co-authored-by: Charles <hallard04@free.fr>
Co-authored-by: Leonard Chiang <leochiang2002@gmail.com>
Co-authored-by: Chun-Chieh Li <ccli8@nuvoton.com>
Co-authored-by: jmcloud <jmcloud@tesla.com>
Co-authored-by: Augusto Zanellato <augusto.zanellato@gmail.com>
Co-authored-by: Sadik.Ozer <sadik.ozer@analog.com>
Co-authored-by: Mingjie Shen <shen497@purdue.edu>
Co-authored-by: Jasper Jonker <jasper.jonker@wingtra.com>
Co-authored-by: wdx04 <wdx04@outlook.com>
2023-05-17 01:18:28 -07:00
Jamie Smith 6e2e7b9414
Remove all source files exclusive to Arm Compiler and IAR (#159)
* Remove all source files exclusive to Arm Compiler and IAR

* Also remove 'TOOLCHAIN_ARM'

* Remove targets.json entries for ARM and IAR
2023-05-15 08:23:01 -07:00
Jamie Smith af6d50aefe
Teensy 4.1 port with Ethernet support (#144)
* Start porting to Teensy 4.1, also fix some compiler warnings in FSL HAL

* Add hardware init for Teensy, refactor phy drivers, rework IMX EMAC autonegotiate code

* Revert some testing changes

* Fix incorrect phy address used outside of low_level_init_successful()

* Ethernet operational!

* Turn off DEBUG_IMX_EMAC

* Style fixes

* Style again

* Bugfix: mbed_lib.json files in project source dir were not getting picked up

* Bugfix: CLion debug configurations not generated properly due to variables going out of scope

* Support Teensy OTP MAC address
2023-03-08 20:18:33 -08:00
Jamie Smith bf5be9f630
Fix TLS example by enabling SHA-1 certificates out of the box (#149) 2023-03-07 17:37:05 -08:00
Jamie Smith 1c00ec562f
Fix BlueNRG undefined reference to ble_cordio_get_hci_driver() (#145) 2023-03-01 09:12:00 -08:00
Ladislas de Toldi 3176fc7ca5
mbed-ce@master + fixes + gcc 11 support (#135)
* Fix rtos::Mutex stub, add trylock() method

* LowPowerTicker - Add ::attach(...) method + call callback

* mbed_power_management - rename sleep --> mbed_sleep to avoid conflicts

Fixes conflicts w/ unistd.h and boost::ut

* GCC 11/C++ 20 - Remove deprecated type_traits

* GCC 11/C++ 20 - Remove redundant templating of methods

* Warning - pragma ignore invalid-noreturn for unit tests

* Fix astyle errors

* Fix missing mbed_sleep() calls
2023-02-21 09:04:34 -08:00
Jamie Smith b91fc218ac
MIMXRT1060_EVK and Teensy 4.0 support (#113)
* Initial attempt at Teensy 4.0 support

* Hide internal target

* Fix some targets.json issues, add boot code for the MIMXRT1060_EVK.  It boots but tests aren't able to run properly yet.

* Disable LPTICKER on MIMXRT1060, fix pin names for newer dev kits

* Enable MIMXRT106x ethernet
2023-01-09 08:48:25 -08:00
Jamie Smith 280d40c5c7
Update for Doxygen 1.9.5 (#119)
* Update for Doxygen 1.9.5

* Also update doxygen version in docs.yaml

* Also fix Doxygen version in basic_checks.yaml
2023-01-03 21:26:26 -08:00
Jay Sridharan afba4e1eb5
Merge upstream changes into mbed-ce (#117)
* Fix for calculating CAN timing settings.

NominalPrescaler value needs to be as high as possible to ensure a good approximation of the target CAN speed.
Previous usage of macro IS_FDCAN_DATA_TSEG1 refers to (unsupported by Mbed ) FDCAN CAN controller settings and leads to too low prescaler values.
Usage Macro IS_FDCAN_NOMINAL_TSEG1 yields optimum results.
See also correct macro usage in line #158.

* Add complete support of DHCP relay interface ID option

RFC3315 specifies the following: "The relay agent MAY send the Interface-id
option to identify the interface on which the client message was received.
If a relay agent  receives a Relay-reply message with an Interface-id
option, the relay agent relays the message to the client through the
interface identified by the option."

The current implementation of the DHCP relay reply handling, the interface
ID field from the server response is ignored. Managing the interface ID
is very important especially as DHCP requests/replies use link-local
addresses. The consequence of this is that the interface must always be
specified because the routing layer cannot guess the correct interface.
Moreover, Mbed provides a mechanism to enable/disable the interface ID
option on a DHCP relay instance, so it is important to fully support it.

The reason why this issue has not been discoverd until now is that the DHCP
relay is mainly used on systems that use only one interface (such as Wi-SUN
routers). By default, when no interface ID is specified for the socket, the
latter will choose 6loWPAN interface by default. This means that if two
interfaces are used on the same device, the 6loWPAN interface is always
selected.

The commit adds code to retrieve the interface-id value contained within
the DHCP relay reply message and write it to a control message header
that is added to the socket message. This tells the socket which
interface to choose. If the interface-id option is not enabled on the
relay, this procedure is simply ignored.

* Support Nuvoton target NUMAKER_IOT_M467

1.  Based on alpha version BSP (85564a2716548e7b6d6a79a490c6d94a24cf9bcf)
2.  Continuing above, tweak BSP:
    (1) Add EPWM_ConfigOutputChannel2() to enable below 1Hz and below 1% duty cycle for PWM output (m460_epwm.h/c).
    (2) Add dummy RTC_WaitAccessEnable() for consistency with previous ports (m460_rtc.h).
3.  Target NuMaker-M467HJ V0.1 board temporarily
4.  Support Arduino UNO form factor for NUMAKER_IOT_M467 target
5.  Enable export to Keil/IAR project
    -   tools/arm_pack_manager/index.json
    -   tools/export/iar/iar_definitions.json

* M467: Fix Greentea reset_reason test failure

HRESETRF is combined reset flag. Filter it out to avoid interference with reset reason check.

* M467: Support HyperRAM

1.  For GCC, support multi-block .data/.bss initialization
2.  HyperRAM is mapped to two regions: 0x0A000000 and 0x80000000
    According to default system address map, 0x0A000000 is located at 'Code' region and 0x80000000 at 'RAM' region.
    With MPU enabled on Mbed OS, 'Code' region is write-never and 'RAM' region execute-never.
    0x80000000 is chosen because 'RAM' regioin is naturally for HyperRAM.
3.  Configurable multi-function pins for HBI
4.  To locate code/data at external HyperRAM:
    -   Specify __attribute__((section(".text.nu.exthyperram"))) for RO/.text/readonly section type
        Invoke mbed_mpu_manager_lock_ram_execution()/mbed_mpu_manager_unlock_ram_execution() to run HyperRAM code
    -   Specify __attribute__((section(".data.nu.exthyperram"))) for RW/.data/readwrite section type
    -   Specify __attribute__((section(".bss.nu.exthyperram"))) for ZI/.bss/zeroinit section type
5.  Add readme

* Config for M460 EMAC

* Add M460 EMAC driver

* Adjust M460 EMAC RX/TX buffer

* M467: Fix EMAC compile error with IAR

* M467: Support Crypto SHA/ECC H/W

1.  Prepare crypto common code
2.  Support list
    -   SHA
    -   ECC
    NOTE: AES/RSA are to support in other works
    NOTE: Compared to M487, M467's SHA supports context save & restore (DMA Cascade mode) and so no software fallback is needed.
    NOTE: M467's ECC, following M487, goes partial-module replacement and it can just improve primitives e.g. point addition/doubling by 2X,
          and cannot improve high level point multiplication because MbedTLS doesn’t open it.
          To improve performance best, full-module replacement is needed.
    NOTE: Continuing above, add support for Montgomery curve

* M467 H/W AES self-test pass

* M467 Support crypto GCM H/W

* M467: GCM support one simple mode instead of using composite GHASH & CTR MODE

* Update M467 AES-GCM to pass AWS-IoT test

* Update M467 AES-GCM for H/W gcm in-buffer creteria

* M467: Improve Crypto H/W wait helper routine

Add crypto_xxx_wait2 helper routine to replace crypto_xxx_wait for Crypto H/W control

* M467: Seed PRNG with TRNG for SCAP

According to TRM, it is suggested PRNG be seeded by TRNG on every Crypto H/W reset.

* M467: Support Crypto RSA H/W

1.  Crypto RSA H/W supports 1024/2048/3072/4096 key bits. Fall back to software implementation for other key bits.
2.  For decrypt, if MBEDTLS_RSA_NO_CRT isn't defined, go CRT, or normal.
3.  For decrypt, when blinding (f_rng != NULL), enable SCAP mode.
4.  Recover from Crypto RSA H/W failure:
    (1) Enable timed-out wait to escape from RSA H/W trap
    (2) On RSA H/W timeout, stop this RSA H/W operation
    (3) Fall back to S/W implementation on failure

NOTE: RSA 4096 key bits can fail with default mbedtls configuration MBEDTLS_MPI_MAX_SIZE.
      Enlarge MBEDTLS_MPI_MAX_SIZE to 1024 or larger if this feature is required.
NOTE: Fixed in BSP RSA driver, for non-CRT+SCAP mode, temporary buffer for MADDR6 requires to be key length plus 128 bits.
NOTE: Fixed in BSP RSA driver, DMA buffer must be 4-word aligned, or RSA H/W will trap.

* M467 Support crypto AES-CCM H/W with one-shot & cascade mode

* M467: Support Crypto ECC H/W in full-module replacement

1.  Replace ecp.c full-module, and other ec modules dependent on ecp.c (ecdh.c/ecdsa.c/ecjpake.c) will improve followingly.
2.  Recover from Crypto ECC H/W failure:
    (1) Enable timed-out wait to escape from ECC H/W trap
    (2) On ECC H/W timeout, stop this ECC H/W operation
    (3) Fall back to S/W implementation on failure
3.  Support Short Weierstrass curve
4.  Support Montgomery curve
    Montgomery curve has the form: B y^2 = x^3 + A x^2 + x
    (1) In S/W impl, A is used as (A + 2) / 4. Figure out its original value for engine.
        2eb06e7620/connectivity/mbedtls/include/mbedtls/ecp.h (L219-L220)
    (2) In S/W impl, B is unused. Actually, B is 1 for Curve25519/Curve448 and needs to configure to engine.
        2eb06e7620/connectivity/mbedtls/include/mbedtls/ecp.h (L221-L222)
    (3) In S/W impl, y-coord is absent, but engine needs it. Deduce it from x-coord following:
        https://tools.ietf.org/id/draft-jivsov-ecc-compact-05.html
        https://www.rieselprime.de/ziki/Modular_square_root
    NOTE: Fix Curve448 has wrong order value
          https://github.com/Mbed-TLS/mbedtls/pull/5811

* M467: Disable SCAP in RSA H/W

This is to follow designer's resolution.

* M467: support fullspeed usb device

* M467: Fix mbedtls_ecp_point_cmp() call with null argument

Guard from null argument passed to mbedtls_ecp_point_cmp() in ECC H/W port

* M467: Make mbedtls H/W port removable

Some M460 chips don't support AES/SHA/ECC/RSA H/W.
Make them removable from mbedtls H/W port through '"target.macros_remove": ["MBEDTLS_CONFIG_HW_SUPPORT"]'.

* Added TMPM4NR Platform

New Platform for Toshiba Added

* Removed UTF8 Chars

* M467: I2C: Fix potential role switch failure

Fix in i2c_do_trsn(), interrupt doesn't change back to enabled due to premature return.

* M467: Exclude UNO SPI pins from FPGA CI Test Shield test

UNO D8/D9/D10/D11/D12/D13 can wire to on-board SPI flash.
Exclude these pins from FPGA CI Test Shield test.

* M467: Adjust UART pinmap to pass FPGA CI Test Shield test

* M467: Support NuMaker-IoT-M467 board

Pinout comparison between NuMaker-M467HJ and NuMaker-IoT-M467 boards:
1.  UNO are unchanged
2.  LEDs are unchanged
3.  Buttons are unchanged, except button names
4.  NuMaker-M467HJ has HBI but NuMaker-IoT-M467 does
5.  NuMaker-M467HJ doesn't have ESP8266 but NuMaker-IoT-M467 does
6.  SDHC are unchanged

* Nuvoton: I2C: Fix potential role switch failure

Fix in i2c_do_trsn(), interrupt doesn't change back to enabled due to premature return.

Fix targets:
-   NUMAKER_PFM_NANO130
-   NUMAKER_PFM_NUC472
-   NUMAKER_PFM_M453
-   NUMAKER_PFM_M487/NUMAKER_IOT_M487
-   NUMAKER_IOT_M252
-   NUMAKER_IOT_M263A
-   NU_M2354

* Update can_api.c

Modified comment as discussed.

* M467: Remove invalid UTF-8 byte sequence

* Replace MAX32660, MAX32670 I2C driver with final one in MSDK
- apply clang-format
- Fix i2c repeated start issue

Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>

* Add proper support for NUCLEO-H723ZG.

- add board specific EMAC setup to connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7
  - stm32h7_eth_init.c was derived from the NUCLEO-H743ZI2 code whilst comparing to the output of STM32CubeIDE
- complete board specific code in targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H723xG
  - PeripheralPins.c and PinNames.h were created by targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py
  - ST ZIO connector pins in PinNames.h have been adapted from NUCLEO-H743ZI2
  - CONSOLE_TX and CONSOLE_RX have been interchanged in PinNames.h to match the actual board layout
  - startup_stm32h723xx.S was derived from startup_stm32h743xx.S
  - stm32h723xg.ld was completely rewritten to match the actual MCU including:
    - split heap support
    - SRAM2 and SRAM4 support
    - crash dump support
    - proper use of DTCM as stack
  - system_clock.c has been changed to support the maximal main clock speed of 550 MHz
- fix handling of HS in FS mode for the target board in targets/TARGET_STM/USBPhy_STM32.cpp
- add board definition to targets/targets.json and correct linker setup for the chip

Signed-off-by: Daniel Starke <daniel-email@gmx.net>

* Fix I2C for MCU_STM32H723xG

Add I2C configuration to MCU_STM32H723xG in target.json as suggested by @jeromecoutant.

Signed-off-by: Daniel Starke <daniel-email@gmx.net>

* Correct MAX32620 boards macro for USB library.

* Limit NUCLEO_H723ZG toolchain to GCC_ARM

Limit NUCLEO_H723ZG toolchain to GCC_ARM only.
This is the only toolchain this target has been tested with yet.

Signed-off-by: Daniel Starke <daniel-email@gmx.net>

* M2354 support FS-USBD and update TF-M for USB PHY select

* Rethink STM32 I2C v2 HAL

* Add documentation for I2C_EVENT macros

* Add some additional I2C error codes

* Added TMPM4GR Platform

New Platform for Toshiba Added

* Resolve delimeter issues for target.json

* Fix compile error on static pinmap targets

* github: Fix click version

Signed-off-by: Martin Kojtal <martin.kojtal@arm.com>

Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
Signed-off-by: Daniel Starke <daniel-email@gmx.net>
Signed-off-by: Martin Kojtal <martin.kojtal@arm.com>
Co-authored-by: chdelfs <109847651+chdelfs@users.noreply.github.com>
Co-authored-by: YannCharbon <yann.charbon@ik.me>
Co-authored-by: Chun-Chieh Li <ccli8@nuvoton.com>
Co-authored-by: cyliangtw <cyliang@nuvoton.com>
Co-authored-by: Deepak V. Shreshti <DeepakVS@TOSHIBA-TSIP.COM>
Co-authored-by: Martin Kojtal <martin.kojtal@arm.com>
Co-authored-by: Sadik.Ozer <sadik.ozer@analog.com>
Co-authored-by: Daniel Starke <daniel-email@gmx.net>
Co-authored-by: Ahmet Alincak <Ahmet.Alincak@maximintegrated.com>
Co-authored-by: Jamie Smith <smit109@usc.edu>
Co-authored-by: Jamie Smith <jsmith@crackofdawn.onmicrosoft.com>
2022-12-31 20:20:01 -08:00
Jamie Smith 97c267219a
Fix all Doxygen errors and make any future errors fatal (#118)
* Start working on fixing doxygen warnings

* Upgrade doxyfile to Doxygen 1.9.1

* Clean up some unmatched groups and add some exclusions

* Fix docs for rtos::ThisThread not showing up

* Fix up KV store docs

* Fix incorrect @files, some more incorrect groups

* Fix lots of broken links

* Start fixing mbedtls groups

* Fix more mbedtls docs

* Fix remaining mbedtls files with missing or incorrect grouping

* Fix a huge amount of PSA docs errors

* Fix a few more mbedtls docs errors

* Fix __cplusplus not defined for docs, clean up call in callback typedef, fix some docs errors

* Fix some broken doc links in HAL headers

* Fix more PSA doc errors

* Fix some doxygen errors in networking code

* Fix lots of network related doc errors

* Try and fix some CI failures

* Use Doxygen Action instead of doxygen in Mbed container to get the right version

* Try removing docs check

* Add first part of doxygen action

* Add next part of doxygen action

* Fix yaml syntax error

* Add in license check fix

* Try using verbose scancode

* Fix some more docs issues, workaround scancode-toolkit#3179

* Clean up the LoRaRadio get_state() function on each implementation.  Also fix some other compile and doc errors.

* Fix all remaining doxygen errors

* Fix escaping, for realsies this time

* Remove Doxygen unsupported config options, fix some more get_status() declarations

* Fix some UNITTESTS build errors

* Fix one more compile error

* Another unittest error
2022-12-30 18:41:41 -05:00
Jamie Smith 91d1cb89fc
Fix build of BlueNRG components by making them their own targets (#111)
* Fix build of BlueNRG components by making them their own targets

* Link ble cordio to fix link order dependency

* Fix typo breaking STM32L562 build

* Revert "Link ble cordio to fix link order dependency"

This reverts commit 1a9192f01f8ecf152c00c777bcfe880a34434d25.
2022-12-04 09:37:51 -08:00
Jamie Smith 73f1f12158
Fix compilation of I2C code on static pinmap targets (#110) 2022-12-04 00:17:49 -08:00
Jay Sridharan 961632a860
Clean up group/module definitions in doxygen (#97)
* Clean up group definitions in doxygen

* remove THIRD_PARTY_DOCS

* some stragglers

* fix astyle formatting
2022-11-12 23:27:50 -08:00
Jamie Smith 32a9080c7d
Enable Arduino Nano 33 BLE (#55)
* Add upload target for Arduino Nano 33 BLE, fix linker script preprocessing, add option for USB serial by default

* astyle error

* Use HINTS instead of PATHS so that the Arduino dir is searched first

* Enable OpenOCD and PyOCD for Nano 33 BLE in SWD mode

* Fix missing dependency for USB tests on Windows

* Add RAM defines for nrf52840

* Fix mbed-storage-kv-config depending on SD card library even if said library was not enabled

* Update dsrdtr value

* No longer need to modify linker script now that we aren't using whole-archive!

* Add OPENOCD_ADAPTER_SERIAL

* Add handling for cmsis dap

* Fix typo

* Fix weak symbol issue causing Bluetooth to not work.  In this case, the weak implementation can simply be removed, because there's no legitimate case where it is used.
2022-10-16 10:32:38 -07:00
Jamie Smith ce093f1785
Don't use whole-archive linking (#71)
* First attempt at converting to OBJECT libraries.  Not working due to more object library limitations

* Only compile the main libraries as OBJECT, because that's all that CMake can be made to do right now.

* Fix availability of target-specific flags

* Missed some usages

* Fix some STM32 ethernet stuff that was not linking correctly

* More fixes for STM32 ethernet and weak symbols

* Fix prebuilt object file linking for MUSCA_S1

* Fix STM32 eth init license headers
2022-10-09 12:16:15 -07:00
Jamie Smith 02b6bdb295 Fix event queue being stuck in non-RTOS mode, causing all sorts of weird behavior 2022-09-14 00:25:32 -07:00
Jamie Smith d83dbc2ac4 Fix ABI differences between mbed-baremetal and mbed-os, remove PlatformMutex 2022-09-14 00:25:30 -07:00
Jamie Smith 69c1d4a55a Rename inconsistently named testing-related variables. Also fix STM32CUBE not working from application code. 2022-09-14 00:25:29 -07:00
Jamie Smith 5b469e13c2 Move unit test to match file 2022-09-14 00:25:29 -07:00
Jamie Smith 391163922a Convert mbed-ble to STATIC 2022-09-14 00:25:28 -07:00
Jamie Smith 2e797c3a32 Convert 802.15.4 and nfc to STATIC 2022-09-14 00:25:28 -07:00
Jamie Smith f47bbf82da Convert lorawan to a STATIC library 2022-09-14 00:25:28 -07:00
Jamie Smith 3cf77c2ca1 Convert emac, cellular, and wifi targets, and enable one UDP test 2022-09-14 00:25:28 -07:00
Jamie Smith e97e9424b4 Convert nanostack and lwipstack to STATIC libraries 2022-09-14 00:25:28 -07:00
Jamie Smith fe23ff8d5b Only support GCC ARM compiler, but reap the benefits of static libraries instead of objects 2022-09-14 00:25:28 -07:00
Jamie Smith 000c7c73c1 Convert the rest of the hal tests, convert mbedtls to an OBJECT library 2022-09-14 00:25:25 -07:00
Jamie Smith c11d32fbf4 - Split mbed-core and mbed-rtos into -sources and -flags targets
- Fix some logic errors in top level cmakelists related to building greentea tests
- Fix mbed_create_distro() for OBJECT libraries
2022-09-14 00:25:25 -07:00
Jamie Smith 63aa3360c0 Clean up top-level build file and build options, fix build issues on MinGW 2022-09-14 00:25:25 -07:00
Martin Kojtal 807fd79651
Merge pull request #15320 from dgoo2308/lora_as923_sub_region
LoRaWAN AS923 Add SUB_REGION AS1..AS4
2022-08-25 17:32:38 +02:00
Jerome Coutant 1bf8667136 STM32WL: fix MBED_CONF_STM32WL_LORA_DRIVER_SLEEP_MODE option 2022-08-18 14:53:58 +02:00
Danny Goossen 3508ec2b71
apply astyle patch 2022-08-18 00:25:21 -04:00
Martin Kojtal b482f2dcec
Merge pull request #15312 from hallard/prep_rak3172sip
STMWL32 preparation for new chip rak3172sip
2022-08-17 13:11:07 +02:00
Charles 42e11ac9bd Allow to use LowPower fix as a parameter
Allow to use TCXO Control Voltage and LowPower fix as a parameter

leave current default value to avoid breaking changes

astyle fix
2022-08-16 13:45:45 +02:00
Danny Goossen 30a156056c
fix styling with astyle for LoRaPHYAS923.cpp 2022-08-11 11:08:40 -04:00
Danny Goossen 199c85629d LoRaWAN AS923 Add SUB_REGION AS1..AS4 2022-08-11 04:06:30 -04:00
Martin Kojtal 9ca538338a
Merge pull request #15311 from skazemi/fix/missing-global-up-callback
Fix missing global up callback in CellularContext
2022-08-03 13:13:22 +01:00
Chun-Chieh Li 127b5aa023 M487: Fix mbedtls_ecp_point_cmp() call with null argument
Guard from null argument passed to mbedtls_ecp_point_cmp() in ECC H/W port
2022-07-26 09:23:37 +08:00
Saeed Kazemi 19fddbf01a
Fix missing GLOBAL_UP callback on successful connect
Fix an issue where CellularContext::do_connect_with_retry() does not call NSAPI_STATUS_GLOBAL_UP callback and validate_ip_address() on successful connect after failed try in blocking mode.
2022-07-25 09:25:36 +02:00
Saeed Kazemi 63dc2fd550
Fix missing GLOBAL_UP callback on successful connect
Fix an issue where CellularContext::do_connect_with_retry() does not call NSAPI_STATUS_GLOBAL_UP callback on successful connect after failed try in blocking mode.
2022-07-22 17:01:39 +02:00
xiaohuizhang98 fe13765d1f lwiperf: fix double-free of pcb on error 2022-06-11 00:08:46 +08:00
Martin Kojtal d994efc2b8
Merge pull request #15273 from Tobi15/main
add the possibility to customize the delimiter of the ATHandler in AT…
2022-06-10 11:13:13 +01:00
Martin Kojtal 6170f55c64
Merge pull request #15287 from OpenNuvoton/nuvoton_fix_ecp-load-curve448
Mbed TLS: Fix wrong MPI N in ECP Curve448 curve
2022-06-02 10:31:39 +01:00