Commit Graph

662 Commits (7c17693c06dd3be022b36a58e86b10520ab81ec2)

Author SHA1 Message Date
Johnny Robeson 65533a9d81 Silence expansion-to-defined in nrfx 2021-05-26 01:06:01 -04:00
George Psimenos 61cfaa15cd Update UART pin names & add MBED_CONF_TARGET_STDIO_UART overrides 2021-03-23 11:17:17 +00:00
George Psimenos 885cdef5f7 Add standard pin-names validation script & tests 2021-03-18 17:01:53 +00:00
Hugues Kamba 811a72af88 EP_ATLAS: Remove requirement for USB library if not required
Move inclusion of USB header file within the existing
conditional pre-processor directive so the USB library
is not required if USB stdio console is disable
2021-03-12 12:19:17 +00:00
Hugues Kamba 2da1972012 CMake: Fix EP_ATLAS build
Enable Onboard TELIT ME310 driver only when cellular library is included.

This allows us to remove the cellular library as a requirement

to build applications that do not require it (i.e Blinky).
2021-03-12 12:19:17 +00:00
George Beckstein d00699c70f Add subtarget_init files to cmake 2021-02-25 10:34:42 -05:00
George Beckstein 0212fde7fb Fix astyle issues 2021-02-23 15:44:09 -05:00
George Beckstein ec9d647c31 Add default app start and size limitations
This commit introduces a default application start address (`0x1000`) and size limitation (`0xDF000`) to accomodate the Nordic USB bootloader.

The bootloader consists of a master boot record in flash from address `0x0` to `0x1000` and the actual bootloader application starting at `0xE0000` to the end of flash (`0x100000`). The bootloader enables firmware updates over USB using nRF Connect for Desktop.

More documentation regarding the open bootloader can be found here: https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/ble_sdk_app_open_bootloader.html
2021-02-23 10:03:26 -05:00
George Beckstein 95415ebd47 Add option to use USBSerial for stdio console
This commit introduces an option, `ep-atlas.enable-usb-stdio-console`, that will retarget the Mbed stdio console handle to a USBSerial instance if enabled.

Please note that if your application uses USB, it will conflict with this option. You should disable this option and implement a composite USB device in your application if you require stdio over USB.

This option is disabled by default so it will not cause issues with existing user code.
2021-02-23 10:03:26 -05:00
George Beckstein 392d0f8f72 Configure internal regulators at startup
This commit introduces an implementation of the `subtarget_sdk_init` startup hook (called during `mbed_sdk_init`) that configures the internal regulators of the nRF52840.

The configuration sets up the internal regulator to output 3.3V. If this is not done, the default system voltage may be too low for the on-board indicator LEDs to conduct (ie: system voltage is lower than LED forward voltage).
2021-02-23 10:03:26 -05:00
George Beckstein 9e4d46262d Introduce `subtarget_sdk_init` startup hook.
The `mbed_sdk_init` startup hook is implemented at the NRF52-series level and so is unavailable for override. This commit adds an additional startup hook for NRF52 subtargets to perform any other startup initialization required.
2021-02-23 10:03:26 -05:00
Hugues Kamba 2c3481297c CMake: Create CMSIS library targets to remove dependency on MBED_TARGET_LABELS
This goes towards eventually removing reliance on targets.json to specify
the requirements of Mbed targets.
2021-02-19 13:39:32 +00:00
Harrison Mutai 0ec92a07d5 CMake: clean up code comments after refactor 2021-02-11 12:04:24 +00:00
Harrison Mutai b49aa0457a CMake: Refactor all Nordic targets to be CMake buildsystem targets
This removes the need for checking MBED_TARGET_LABELS repeatedly and allows us to be
more flexible in the way we include MBED_TARGET source in the build.

A side effect of this is it will allow us to support custom targets
without breaking the build for 'standard' targets, as we use CMake's
standard mechanism for adding build rules to the build system, rather
than implementing our own layer of logic to exclude files not needed for
the target being built. Using this approach, if an MBED_TARGET is not
linked to using target_link_libraries its source files will not be
added to the build. This means custom target source can be added to the
user's application CMakeLists.txt without polluting the build system
when trying to compile for a standard MBED_TARGET.
2021-02-11 10:59:41 +00:00
Martino Facchin 56c508b974 nRF52: properly clean pwm structures on deinit() 2021-02-03 09:36:27 +01:00
Martino Facchin ee2e5ad794 Arduino_NANO33BLE: don't define Arduino pins if compiling in Arduino core 2021-01-18 15:43:11 +01:00
Hugues Kamba 4780dd55e5 NRF52840: Fix heap size formula in scatter files
The heap size was incorrectly calculated.
This fixes it by subtracting the Stack size, any memory chunks allocated
before the start of the application (for vectors and/or crash report), and
finally the size of the application from the total RAM size.
2021-01-08 18:32:46 +00:00
Harrison Mutai 7cb2407446 CMake: add support for Nordic targets 2020-12-18 10:53:57 +00:00
Martin Kojtal 8196045f20
Merge pull request #14047 from harmut01/clean_nordic_targets
Remove unsupported Nordic SoftDevice build support
2020-12-17 12:59:47 +00:00
phst ec6e865607 fix QSPI-API for NRF52 2020-12-15 17:03:34 +01:00
Harrison Mutai 1e96afbe6e Remove unsupported common SoftDevice build support 2020-12-15 12:25:07 +00:00
Harrison Mutai 8ddef46e90 Remove unsupported S140 SoftDevice build support (MBR,OTA,FULL) 2020-12-15 12:25:07 +00:00
Harrison Mutai 3879b7ca31 Remove unsupported S132 SoftDevice build support (MBR,OTA,FULL) 2020-12-15 12:25:07 +00:00
Harrison Mutai 5243adcb8c Remove unsupported S112 SoftDevice build support 2020-12-15 12:24:17 +00:00
Lingkai Dong b174edb282 MCU_NRF52832: use two-region memory layout (stack + heap) to support MicroLib
MicroLib is the lightweight C lib for the Arm toolchain and
used as the default C lib on bare metal builds with the Arm
toolchain. It requires two separate memory regions for stack
and heap.

The change is based on nRF52840.sct.
2020-11-24 16:35:02 +00:00
Martin Kojtal 76ff098e94
Merge pull request #13691 from jrobeson/drop-nordic-sdk11
Remove unused Nordic TARGET_SDK_11
2020-11-12 09:35:42 +00:00
Hugues Kamba 794e32df74 CMake: Use relative paths to list source files and directories
The absolute path is still required for listing linker
files as they are referenced from a function in the top
level CMake input source file.
2020-11-09 12:32:30 +00:00
Martin Kojtal d48415cc67 CMake nrf52480: fix startup/linker inclusion 2020-11-06 17:25:23 +00:00
Rajkumar Kanagaraj e7c0d93ad4 CMake: add mbed-os and mbed-baremetal targets
mbed-os consists of mbed-core and mbed-rtos
mbed-baremetal consists of mbed-core

The main change is for mbed-core. Changing from object library to be interface. This way it allows us to do the above to have 2 main targets for users to use.

This should be backward compatible change as mbed-os target we used contains the same files/options as previously set.
2020-11-06 17:25:22 +00:00
Hugues Kamba bf84a5b329 CMake: Rename CMake targets
* mbed-os renamed mbed-core
* mbed-os-<COMPONENT> renamed mbed-<COMPONENT>
2020-11-06 17:25:22 +00:00
Rajkumar Kanagaraj 8016a53400 CMake: replace usage of the mbed_add_cmake_directory_if_labels() function (#13754)
Directories that start with special prefixes (TARGET_, FEATURE_, COMPONENT_)  are added to the build based on Mbed target configuration from targets.json instead of calling utility function mbed_add_cmake_directory_if_labels().
2020-11-06 17:25:21 +00:00
Hugues Kamba 01ddb7d471 CMake: Fix NRF52840_DK build failure
* Remove duplicated ARM toolchain directory
* Link with archived cryptocell 310 libraries instead
  of adding them as source files
* Provide default MBED_BOOT_STACK_SIZE definition
  in scatter file as is done for GCC_ARM linker file
2020-11-06 17:25:19 +00:00
Hugues Kamba eb4102be48 CMake: Fix failure due to BLE component dir move 2020-11-06 17:25:19 +00:00
Hugues Kamba 8a74bf1d04 CMake: Add support for NRF52840_DK target 2020-11-06 17:25:15 +00:00
Martin Kojtal 61aa6817f0
Merge pull request #13724 from harmut01/license_refactor
Add license notice to Arm copyrighted source files
2020-10-16 09:09:53 +01:00
Martin Kojtal c8345a3490
Merge pull request #13595 from gutbag/add-nrf52-midi-baud-rate
Nordic: Support 31250 baud rate
2020-10-16 09:06:31 +01:00
Harrison Mutai 4fad1112e5 Add SPDX license identifier to Arm files
Add license identifier to files which Arm owns the copyright to,
and contain either BSD-3 or Apache-2.0 licenses. This is to address
license errors raised by scancode analysis.
2020-10-15 10:47:27 +01:00
Johnny Robeson 394c976f5f Remove unused Nordic TARGET_SDK_11 2020-09-30 20:22:48 -04:00
winneymj d60af095ba Fix spacing 2020-09-29 17:55:06 -05:00
winneymj 38e6bdc8f4 Fixes for nrf52840 SPIM 3 implementation. Specifically:
- Correct definition of SPI2C_INSTANCES when using SPIM vs SPI
- Use NRFX_SPIM_XFER_TRX macro vs manually filling structure.
- Fix compile error in NRFX_SPIM_DEFAULT_EXTENDED_CONFIG where ordering of members does not match structure nrfx_spim_config_t
- Use High Drive if using SPIM3 on MOSI and SCK pins.
2020-09-29 17:13:30 -05:00
Martin Kojtal 468372e759
Merge pull request #13492 from talorion/fix-PwmOut-resets-after-suspend
Fix pwm out resets after suspend
2020-09-10 12:40:18 +01:00
Jaeden Amero 612b148fd4 stack: armc: Workaround config passing bug
Workaround a bug where the boot stack size configuration option is not
passed on to armlink, the Arm Compiler's linker. Prefer
MBED_CONF_TARGET_BOOT_STACK_SIZE if present, as this is what the
configuration system should provide. Fall back to MBED_BOOT_STACK_SIZE
if MBED_CONF_TARGET_BOOT_STACK_SIZE is not defined, as in the case of
buggy tools. If both MBED_CONF_TARGET_BOOT_STACK_SIZE and
MBED_BOOT_STACK_SIZE are not defined, then we fall back to a hard-coded
value provided by the linkerscript. See
https://github.com/ARMmbed/mbed-os/issues/13474 for more information.
2020-09-10 10:08:38 +01:00
Hugues Kamba 2ed7403e3e NRF52: Fix failure if boot stack size is not provided
The same default value is provided in the GCC_ARM linker file.
2020-09-10 10:08:38 +01:00
Jaeden Amero 39e69d328d Use boot stack size from config system
To allow overriding of the boot stack size from the Mbed configuration
system, consistently use MBED_CONF_TARGET_BOOT_STACK_SIZE rather than
MBED_BOOT_STACK_SIZE.

Fixes #10319
2020-09-10 10:08:38 +01:00
Mark Lamb 9ffd462a28 Support 31250 baud rate 2020-09-09 20:13:11 +01:00
talorion b03d80fd08 pwmout - fixed compile errors 2020-09-02 13:39:17 +02:00
talorion dda71f0262 pwmout - NRF52 - add read methods for period and pulsewidth 2020-09-02 13:39:12 +02:00
winneymj e5f32ff3f9 Add SPIM description to README.md 2020-08-17 10:27:46 -05:00
winneymj b72adbe5c0 Fix defines 2020-08-16 12:42:18 -05:00
winneymj 21c928e6e5 Fix detection of enabled SPIM 2020-08-15 08:02:49 -05:00