Commit Graph

34547 Commits (73b030623033ea0436fda91cf83e5584da40cdb8)

Author SHA1 Message Date
Jamie Smith 73b0306230
Increase RPi Pico PWM range and resolution to the max supported by HW (#203)
* Attempt to increase RPi Pico PWM range and resolution to the max supported

* Fix copyright for pwmout_api.c

* Fix ADC implementation so it works!  Fixes incorrect return type, adds +1 to top_count, fixes missing pwm_config_set_wrap() call.

* Revert printf change in this PR
2024-01-16 08:33:59 -08:00
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 c1effb15ec
Enable RPi Pico's optimized ROM floating point routines (#202)
* Enable RPi Pico's optimized ROM floating point routines

* Add license header
2024-01-06 00:16:01 -08:00
timIdeaTech 79c56f3155
add lfsv2 to storage/platform lib list (#201)
add lfsv2 to storage/kvstore/kv_config link libs
2023-12-20 16:42:04 -08:00
Jamie Smith 69d95b598a
Make DMA SPI driver aware of CPU cache, fix data corruption and other SPI issues on STM32H7 (#199)
* Handle cache alignment in DMA SPI driver

* Fix build on cache-less devices

* Fix a couple things I missed

* Run formatter, improve CacheAlignedBuffer docs

* Add missing license identifiers to source files

* Make CacheAlignedBuffer heap-allocatable, try and add exclusion for Nordic license in scancode_evaluate.py

* Formatting, docs, revert accidental change

* Update code blocks to pass spell checker
2023-12-19 10:21:47 -08:00
Jamie Smith d9676cccca
Fix STM32 I2C v2 async transfer not doing a repeated start (#197)
* Fix STM32 I2C v2 async transfer not doing a repeated start

* Clarify docs
2023-11-21 20:38:36 -08:00
Jamie Smith 28815b13d3
DMA SPI support for STM32 devices (#162)
* Start on STM32 DMA SPI

* Update all objects.hs, add interrupt function

* Initial DMA code should be ready to test out...

* Fix SPI interrupt-mode IRQ handlers, add SPI::transfer_and_wait

* Fix CMake error when building for STM32WL processors

* Now builds on all STM devices!

* Properly support STM32U5 / DMA IP v3

* Start on STM32F4 support, fix hardfault on IP v1 and v3 due to incorrect indexing

* Fix Rx-only transfers, add abort code, fix incorrect channel assignments for DMA IP v1 devices

* Start on STM32H7 SPI DMA

* Fixes for H7: Correctly manage data cache, keep SPI ISR enabled

* Implement DMA SPI header constants for all remaining STM32 families.  Also add support for freeing DMA channels

* Try and fix build on STM32G0

* Fix build on STM32G0

* Add SPI_32BIT_WORDS label, start on fixing SPI docs

* SPI: Implement reference counting so that DMA channels get freed properly

* Fix issue where SPI data could get corrupted (by TI mode turning on) depending on memory layout (if your spis pointer & 0x10 was nonzero)

* Mark DMA channels as unallocated when SPI bus is freed

* Simplify spi_abort_asynch()

* Fix some rebase issues, fix failing to allocate DMA channel on STM32U5

* Fix DMA getting stuck on STM32F4, F7, and F2
2023-11-02 20:16:45 -07:00
Jamie Smith 7e9d658ae9
Allow Mbed config files to be json5 in addition to json (#194)
* Allow Mbed config files to be json5 in addition to json

* Also handle custom_targets.json

* Add missing "install python packages" step
2023-10-26 09:48:33 -07:00
Jamie Smith 7c61babb10
Fix incorrect requirements line for dotenv (#193)
* Fix incorrect requirements line for dotenv

* Also use requirements.txt in CI jobs
2023-10-10 13:00:03 -07:00
Jamie Smith 3af1c75ca8
Bring python packages into the mbed-os source (#192)
* Initial import of python packages

* Move tests to subfolder, use tests in generate_configuration.cmake

* Bring python packages into the source tree instead of needing to be installed separately

* Use python3

* Just use distro default python

* Install all the requirements with apt-get

* unittests is part of Python now

* Add appdirs, set python version

* Add some missing dependencies

* Add more packages

* Add requirements.apt.txt files, fix relative paths with scancode_evaluate.py

* Fix return code handling for license scan errors

* ok let's try that again, also improve error output from scancode evaluate

* Add missing license headers
2023-10-10 09:54:53 -07:00
Jamie Smith e1a1542310
Reactivate tests under drivers/ and fix deprecation warnings (#191)
* Reactivate tests under drivers/ and fix deprecation warnings

* Fix missing statement

* Oops, fix commented tests
2023-10-03 21:21:16 -07: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 9f4987d1cb
Refactor flash setup for MIMXRT105x devices, add flash API support for MIMXRT1062 EVK (#187)
* Refactor flash setup for MIMXRT105x devices, adds flash support for MIMXRT1062 EVK

* Remove commented code

* Use BOARD_FLASH_SIZE in boot headers

* Fix setting which should be disabled in run mode
2023-10-01 09:25:26 -07:00
Jamie Smith 05a57dc62c
Replace REDLINK upload method with LINKSERVER (#186)
* Replace REDLINK upload method with LINKSERVER

* Fix sleep test failure on MIMXRT, fix failure to debug

* Remove no longer needed XML files
2023-09-26 23:28:35 -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
Jamie Smith 162acab842
STM32U5 HAL update, NUCLEO_U575ZI upload method file (#184)
* STM32U5: STM32Cube_FW_U5_V1.2.0

* Update STM32U5 upload method config files

* Fix HAL sleep manager test bug causing test failure on STM32U5

---------

Co-authored-by: Jerome Coutant <jerome.coutant@st.com>
2023-09-24 09:54:31 -07:00
Jamie Smith 36506c9d61
Fix warnings from kill and getpid not being implemented (#183)
* Fix warnings from kill and getpid not being implemented

* Fix comments
2023-09-20 21:52:30 -07:00
Jamie Smith 264dbe219f
SDBlockDevice: revert HW CS support, add async support (#181)
* SDBlockDevice: revert HW CS support, add async support

* Convert one last call

* Turn off debug mode, whoops

* Run formatter
2023-08-27 11:05:18 -07:00
Jamie Smith 1ed5f1f149
SPI Driver API bugfixes and cleanup, part 2 (#180)
* Make it so that SPI::select() works correctly with async stuff

* Add more overloads for SPI functions, make sure that SPI::abort_transfer() correctly toggles CS

* SPI: Implement reference counting so that DMA channels get freed properly

* Fix initialization of SPI peripheral structures

* Update docs a bit

* Use a mutex to protect SPI::_peripherals instead of a critical section, because spi_free() may not be ISR safe

* Style fixes
2023-08-25 09:14:00 -07:00
Jamie Smith 20756f3bd7
Upversion RPi Pico SDK (#176)
* Remove old pico SDK, import latest version using new importer script

* Add new importer script, update CMakeLists

* Merge changes from newer SDK into  init assembly and linker script

* Update pico hal code for new SDK version

* Clean up linker script a bit, revert ram size

* Fix accidental breakage of watchdog-reset test from warning fixing!  Also better document USB setup procedure and disable reset as part of the test runner.
2023-08-07 00:22:03 -07:00
JohnK1987 eb231be2cd
Add HAL for STM32H5 family into MbedCE (#172)
* Add HALs to MbedCE

* HALs for i3c like an option

* Update stm32h5xx.h because of UTF-8 check
2023-07-23 23:21:45 -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
JojoS 5b25b173c8
fix argument number for custom linker script (#169) 2023-07-17 19:54: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
Jamie Smith a9f8e097e2
Add RP2040 support (#168)
* Add PICO SDK

* Add RP2040 HAL implementation

* Add target Raspberry Pi Pico and its Upload method

* Modified PICO SDK-RTC because of conflict in name

* Use USB from boot, fix USB linking

* Try removing redundant init call

* Add SWD upload configuration, copy most init code from Pico SDK

* Fix RTC linking, fix ram size constant, fix test warning

* Add upload support for RPi Pico devices using Picotool

* Fix implementation of Tx IRQ for serial ports.  BufferedSerial works now!

* Make PinNames.h pass pin validation

* Fix us ticker not working when debugging

* Fix us ticker double-init and manual fire interrupt function, us ticker tests now pass!

* Fix writing to rtc and rtc double-init, RTC tests now pass (except rtc-reset)

* Fix panic() not working from a critical section or ISR

* Fix compile failure due to extra LED1 definition

* Fix style

* Fix flash_api detection of invalid parameters, fix reset_reason to advertise the correct capabilities and implement them correctly

* Fix watchdog test warnings, fix broken hal_watchdog_get_reload_value(), fix missing frequency field in watchdog features

* Fix watchdog_reset failing to compile on some devices

* Fix us ticker fire_interrupt() not being callable from an ISR

* Fix incorrect license header

---------

Co-authored-by: Johnk1987 <odiin@seznam.cz>
2023-07-12 21:11:26 -07:00
Jamie Smith 785e3fb87b
Improve usability and documentation of the SPI API (#165)
* Make TRANSACTION_QUEUE_SIZE_SPI a proper option instead of a weird macro

* Document DMAUsage constant

* Copy over reworked SPI header

* Spelling -_-

* Document SPI event flags
2023-06-25 19:44:34 -07:00
Jamie Smith 626b4927e3
scancode: version >31.2.4 contains fix for reindexing (#166)
The workaround is not needed anymore (v32 is breaking this reindexing as they created new command to do that anyway).

Co-authored-by: Martin Kojtal <martin.kojtal@arm.com>
2023-06-20 09:31:55 -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 b9c04813b3
More fixes for sleep and clocking stuff on MIMXRT105x (#158)
* More fixes for sleep and clocking stuff on MIMXRT105x

* Fix a couple of inadvertent changes
2023-05-11 22:49:55 -07:00
Jamie Smith 04a76b3882
Refactor MIMXRT105x target labels and linker script, locate general data in DTCM memory instead of OCRAM for improved performance (#157) 2023-05-11 13:04:31 -07:00
Jamie Smith 9c65ad95cc
Bugfix: LPC1768 IAP could not copy flash to flash (#156)
* Bugfix: LPC1768 IAP could not copy flash to flash

* Add flash to flash test for flash API

* Fix style

* Style again

* Augh again
2023-04-26 19:20:19 -07:00
Jamie Smith d9d9f7003d
STM32 I2C v2 HAL: Fix repeated starts in transaction mode (#153)
* Try and fix repeated start for transactional I2C API

* Use OTHER_FRAME everywhere
2023-04-11 19:59:19 -07:00
Janco 9a4bdb864b
Add STM32F103xD and xG entries in CMakeLists.txt (#155)
* Add STM32F103xD, STM32F103xG series and fix STM32F103xE startup file

* Add system_clock.c file for STM32F103xD series

* Add STM32F103xD and STM32F103xG to targets.json

* Update CMakeLists.txt to add STM32F103xD and STM32F103xG series

add_subdirectory(TARGET_STM32F103xD EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_STM32F103xG EXCLUDE_FROM_ALL)

* Add remaps for STM32F1 timers as in original mbed-os

Added extra remaps for timers 9 to 14 for STM32F1 needed in STM32F103xG series

#define AFIO_REMAP_TIM9_ENABLE    17
#define AFIO_REMAP_TIM10_ENABLE   18
#define AFIO_REMAP_TIM11_ENABLE   19
#define AFIO_REMAP_TIM13_ENABLE   20
#define AFIO_REMAP_TIM14_ENABLE   21

---------

Co-authored-by: Perez <maperez@hp.com>
2023-04-11 19:58:57 -07:00
Jamie Smith e93b80a006
I2C pinmap and HAL fixes for MIMXRT (#150)
* Start fixing up I2C on MIMXRT

* Fix typod peripheral names
2023-03-21 21:43:15 -07:00
Jookia ea044e0695
STM32F7 QSPI flash timeouts and 4-byte addressing (#152)
* STM32F7: Unconditionally enable QSPI workarounds

On the STM32769NI at least this patch is required for stable QSPI use.
Enable it uncondtionally in case other boards need it too.

Further discussions:

https://github.com/ARMmbed/mbed-os/issues/10049
https://github.com/ARMmbed/mbed-os/issues/15108

https://github.com/STMicroelectronics/STM32CubeF7/issues/52
https://github.com/STMicroelectronics/STM32CubeF7/issues/82

* QSPIF: Attempt 4-byte addressing on Macronix chips

mbed-os PR 11531 introduced 4-byte addressing in the QSPIF block device:

https://github.com/ARMmbed/mbed-os/pull/11531

During testing it was found that this code broke on the NRF52840_DK and
DISCO_F769NI.

The NRF52840_DK controller seems unable to handle 4-byte addressing at
all and has been disabled entirely in another code section.

The DISCO_F769NI breakage was attributed to the flash chip but after more
research I believe this is related to the QSPI controller, not the 4-byte
addressing itself.

Now that the QSPI controller has a workaround, enable 4-byte addressing
again and hope it works fine this time.
2023-03-21 09:19:22 -07:00
Janco ed4c4f432b
Add STM32F103xD, STM32F103xG series and fix STM32F103xE startup file (#151)
* Add STM32F103xD, STM32F103xG series and fix STM32F103xE startup file

* Add system_clock.c file for STM32F103xD series

* Add STM32F103xD and STM32F103xG to targets.json

---------

Co-authored-by: Perez <maperez@hp.com>
2023-03-11 09:25:51 -08: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
Ladislas de Toldi 16247af752
🔧 (profiles): Remove debug symbols from release profile, compress debug sections (#147) 2023-03-02 21:19:15 -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 4124a9a67d
(vscode + cmake) Add option MBED_GENERATE_VSCODE_CONFIG (#142) 2023-02-27 22:47:51 -08:00
Jamie Smith 823e795968
Fix serial_format() on MIMXRT1170 as well (#141) 2023-02-24 23:31:23 -08:00
Jamie Smith d9534516bf
Fix debug-less upload methods (#140)
* Fix debug-less upload methods

* Oops, fix build outside of Clion
2023-02-24 00:26:08 -08:00
JohnK1987 fb47f593e5
Add Wio-H725AE (#133)
* Add clock settings for H725xE

* Correction of memory mapping for H725xE

* Added new target WIO_H725AE

* Added WIO_H725 into targets.json

* Added upload methods file for WIO_H725

* Licence filled from original source file

* Space alignment

* Added macro MBED_SPLIT_HEAP for MCU_STM32H725xE

* Typo correction

* Correction of upload methods for WIO_H725AE
2023-02-21 09:13:38 -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 eda766ec8f
Refactor upload methods to streamline the debugging experience (#129)
* Change all debug configurations to not reset and exit on error.  Initial tasks.json implementation.

* st-util working on command line and VS Code!

* Convert STM32CUBE, fix spaces in GDB server task command

* pyocd working!

* Convert OpenOCD

* Convert JLINK

* Convert REDLINK upload method

* Fix CMake typo

* Try and fix some variable scope issues

* Initial CLion implementation.  Need to test with hardware.

* Add a separate task that kicks off a build before each debug session
2023-02-20 00:16:15 -08:00