Commit Graph

271 Commits (94c27aa7509be020ea10ed0f7fb0fd07204553d2)

Author SHA1 Message Date
Martin Kojtal 489bd10626
Merge pull request #10629 from trowbridgec/add-target-ep-agora
Add support for the Embedded Planet Agora target
2019-06-06 14:50:14 +01:00
Chris Trowbridge 7531c2bb56 Remove unneeded custom_board.h file 2019-05-30 14:16:29 -04:00
Chris Trowbridge f81130dd23 Update licenses for EP_AGORA target 2019-05-23 11:30:25 -04:00
RFulchiero 3343022f70 Remove redundant legacy files and definition of PACKED
* The following v14.2 files are removed from nrfx/legacy:
  nrf_drv_clock.h
  nrf_drv_common.h
  nrf_drv_gpiote.h
  nrf_drv_spi.h
  nrf_drv_twi.h
  nrf_drv_uarth.h
* Remove unneeded references to "nrfx_glue.h" and "nrf_drv_common.h"
* Remove the definition of PACKED from app_util_platform.h (already defined
  in mbed_toolchain.h)
2019-05-23 11:31:40 +08:00
RFulchiero 8550fd0ed2 Fix preprocessor conditionals for AC6 build 2019-05-23 11:31:39 +08:00
RFulchiero 5c276f2c0e Fix SOFTDEVICE_NONE builds and clean up
* Update all scatterfiles to define MBED_RAM_START and MBED_RAM_SIZE.  These
get defined in mbed_lib.json when building with a SoftDevice but were missing
when no SoftDevice is brought in.
* Remove SDK 14.2 SoftDevice files.
* Add missing header file to qspi_api.c.
2019-05-23 11:31:38 +08:00
RFulchiero 2690f0f8bc Update QSPI in the SDK to support long frame mode
* Carry forward changes made to v14.2SDK to support long frame mode
(from commit 2a72bb67a3).
* Fixed a few driver calls from rebase
2019-05-23 11:31:35 +08:00
RFulchiero 8237229530 Rebase to master in preparation for v5.12.0 2019-05-23 11:31:35 +08:00
Desmond Chen 4e8eed07e5 Fix nrf section iter macro check 2019-05-23 11:31:33 +08:00
Naveen Kaje e8e1ef2a70 NRF52: reloc_vector_table: check the RTS pin settings in code
Move the check from preprocessor to the if condition
2019-05-23 11:31:33 +08:00
Desmond Chen c048a34e00 Add BLE feature to mbed_lib.json of SoftDevice 2019-05-23 11:31:32 +08:00
RFulchiero f8e2b7e679 Update file header at TARGET_NRF52 level
- Update (c) year and company name
 - Add SPDX-License-Identifier
 - Impacted files:
    - Files touched for SDK15 port
    - Files added in 2018
2019-05-23 11:31:32 +08:00
RFulchiero cf162cdbab Remove duplicate file 2019-05-23 11:31:31 +08:00
Desmond Chen d20ca05a68 Fix SoftDevice configuration on NRF52_DK 2019-05-23 11:31:31 +08:00
Desmond Chen b69dc2bdae Update BLE SoftDevice from SDK14 to SDK15
- Adjust memory for SoftDevice
    - Enable PRIO=5 for interrupt priority check
    - Change NRF_SD_BLE_API_VERSION to 6
    - Add handle and buffer for advertising and scanning
    - Remove guard for phy update
    - Change scatter files and mbed_lib.json for PR #8607
2019-05-23 11:31:31 +08:00
Desmond Chen 2fbc20f9b1 Fix timer1 irq configuration 2019-05-23 11:31:30 +08:00
Naveen Kaje b17601ef43 NRF52: Cleanup unused code 2019-05-23 11:31:29 +08:00
Naveen Kaje 8eaf87cd50 NRF52: serial: fix build warnings 2019-05-23 11:31:29 +08:00
RFulchiero e9a3ca6259 Set the PWM clock prescaler back to default (1MHz clock) 2019-05-23 11:31:29 +08:00
RFulchiero 501000e6a2 Changes required for rebase:
- Brought in new nrfx APIs
 - Brought in PPI additions
 - Removed dead code for RTC
2019-05-23 11:31:28 +08:00
RFulchiero 36c70a1c78 Enabling NRFX_PPI_ENABLED for serial_api updates 2019-05-23 11:31:26 +08:00
RFulchiero 74cb69873c Cleanup for feature release
* Update TARGET_NRF5x/README.md to improve "Changing SoftDevice" section
  and added section on NRF52840 CryptoCell310 Support
* Update the file list in TARGET_SDK_15_0/TARGET_SOFTDEVICE_COMMON/README.md
* Add missing CR-LF to Nordic-provided SDK file
* Rename a header file in the TARGET_SOFTDEVICE_S112 tree
2019-05-23 11:31:26 +08:00
RFulchiero 2a968d4d35 Revert "NRF52: Fix vector table"
This reverts commit 3d2fa535a71b7bad08c6a91a31d74f4492c8948c.

This was a breaking change for the "MBR" and "NONE" builds.
After testing it was also determined that copying the vector
table a second time wasn't required for the "FULL" build.
2019-05-23 11:31:26 +08:00
Ralph F 742d10fcc2 Add missing SoftDevice build support (MBR, NONE, OTA)
- Add MBR, NONE and OTA SoftDevice build options for S132 and S140
- Add S112 SoftDevice (single build option)
- Some folder restructuring in TARGET_SOFTDEVICE_COMMON was required
2019-05-23 11:31:25 +08:00
RFulchiero 3e3ac27698 Remove dead #define PORT_SHIFT
nRF5x PinNames.h never utilized PORT_SHIFT so removed for clarity after
user commented on it.
2019-05-23 11:31:24 +08:00
RFulchiero fa84352752 Fix build for nRF51 (fewer common files with nRF52)
The 15.0 SDK doesn't support the nRF51 so it must continue to use the legacy
NRF drivers.  Thus the original common_rtc.c, gpio_api.c and us_ticker.c are
restored and placed under TARGET_NRF5x/TARGET_NRF51.

Likewise the modified common_rtc.c, gpio_api.c and us_ticker.c are moved to
TARGET_NRF5x/TARGET_NRF52 so they are excluded from nRF51 builds.
2019-05-23 11:31:23 +08:00
RFulchiero e85106129a Updates after rebase with Mbed master (circa OS v5.10.1)
* Remove NRF_SDH_CLOCK parameters from mbed_lib.json
* Bring in QSPI for nRF52840
* Migrate legacy QSPI driver to SDK v15 (nrfx_qspi.h)
* Remove outdated comment in i2c_api.c
2019-05-23 11:31:23 +08:00
Naveen Kaje 6064ef30e9 NRF52: Fix vector table
Ensure that vector table gets initialized properly. The table that we
initialize in startup_nrf52840.S gets wiped out as the section is
declared as noinit. Fix this by implementing the weak function mbed_sdk_init
that inits the vector table.
2019-05-23 11:31:22 +08:00
RFulchiero f79531414f nRF52_DK: Use mbed_lib.json to set app_offset (MBED_APP_START)
When the SoftDevice (SD) is enabled we need to set the app_offset
to 0x26000 to make room for the SoftDevice.  If we let the build
tools self-manage this, MBED_APP_START is coming out at 0x25000
which is not correct for the Nordic 15.0 SDK.

The app_offset value is translated to MBED_APP_START by the build
infrastructure.  We were hard coding MBED_APP_START in the scatter
and ld files as a temporary measure while testing.  This now sets
it properly if the SD is being brought in.
2019-05-23 11:31:22 +08:00
RFulchiero 317598604a nRF52832 needs NRFX_RNG_ENABLED to use the legacy driver 2019-05-23 11:31:22 +08:00
Naveen Kaje 35c14ebbe3 NRF52832: enable UART 2019-05-23 11:31:21 +08:00
Naveen Kaje d875c2ba2e NRF: enable PRS (Peripheral Resource Sharing) for NRF52832 and NRF52840 2019-05-23 11:31:21 +08:00
Naveen Kaje 976ba7d4da NRF52: i2c_api: port from Softdevice 14.2 to 15.0 2019-05-23 11:31:20 +08:00
Naveen Kaje 4f9782dfeb NRF52: spi_api: port from Softdevice 14.2 to 15.0 2019-05-23 11:31:20 +08:00
RFulchiero a1d5a4d973 Updates for IOTDEV-1576 (only TRNG API)
- Added legacy nrf_drv_rng.c as there is no merit in fully adopting nrfx_rng.c
- Added nrf_queue library component
- Removed apply_old_config.h (unused for some time now)
- Updated sdk_config.h for queue and RNG support for nRF52832
- Brought back RNG into targets.json for nRF52832
Note: nRF52840 still uses CryptoCell 310 for TRNG
2019-05-23 11:31:20 +08:00
RFulchiero 38c68e0a45 Updates for IOTDEV-1575 and nRF52_DK builds
- Use new NRFX header file
- Fix nRF52832 linker script/ld files (hardcoded addresses for now)
- Temporarily remove DEVICE_TRNG for nRF52832 (which broke the build)
- Improve serial_putc() fix so we don't rely on "extra" functions
2019-05-23 11:31:19 +08:00
Naveen Kaje 8123b5128d serial_api: Fix the interrupt registration for Nordic Serial Device
Using the nrfx_get_irq_number only works with the handle. Since we
know the IRQ numbers for UART0, RTC2 and EGU0, use them directly.
2019-05-23 11:31:19 +08:00
Naveen Kaje 52c6048dc8 Nordic sdk_config: Configure UART instances
Enable UART interfaces to enable serial debug prints.
2019-05-23 11:31:19 +08:00
Naveen Kaje 3ee440c9db serial_api: add changes to port from Softdevice 14.2 to 15.0 2019-05-23 11:31:18 +08:00
Naveen Kaje af8d171a73 serial_api: Fixes to compile with SDK15.0 2019-05-23 11:31:18 +08:00
RFulchiero 9593a53e25 Updates to PWM for IOTDEV-1573
- Missed some NRFX defines that needed to changed
- Set PWM base clock to 125kHz (needs to be reverted back to 1 MHz)
- Updated sdk_config.h for nRF52_DK builds
- Brought in updates from PR7779 (fix for nRF52 PWM issues)
2019-05-23 11:31:18 +08:00
RFulchiero cc54611f02 Ported analogin and pwm_out for IOTDEV-1573.
Also addressed:
- removed dependency on legacy config (excluded apply_old_config.h)
- removed legacy pwm and saadc headers
- Arm Compiler 5 linking issue (a band-aid for now... needs to
  be properly addressed for peripheral sharing)
- added missing header in SoftDevice file
2019-05-23 11:31:17 +08:00
RFulchiero 9ac7fe7ac9 First porting effort covered by JIRA IOTDEV-1572:
- top level files ported from TARGET_NORDIC/TARGET_NRF5x/

Also addressed:
- fixed linking issue for gcc
- added support for nRF52-DK builds, but reverted to using nRF52840 sdk_config.h (must be updated)
- introduced "RTC" to targets.json (might need to be removed eventually)
2019-05-23 11:31:17 +08:00
RFulchiero cd5b451320 Bringing in Softdevice but excluding BLE feature and improvements in feature defines 2019-05-23 11:31:13 +08:00
RFulchiero 511f8ebbd7 Mods for baseline 15.0 support 2019-05-23 11:31:13 +08:00
RFulchiero 6bd89e7939 Baseline legacy build using 14.2 drivers. 2019-05-23 11:31:12 +08:00
Chris Trowbridge 225f1de5ac Add support files for target EP_AGORA 2019-05-21 11:18:43 -04:00
Kevin Bracey 87396e0bf6 Assembler atomics
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.
2019-04-26 13:12:35 +03:00
j3hill f4b4ac76ea Data that is written to/read from external flash using QSPI needs to be in RAM and WORD aligned. 2019-04-11 13:24:33 -05:00
Martin Kojtal e75794ec6e
Merge pull request #9888 from ARMmbed/feature-armc6
ARM Toolchain update to ARM Compiler 6.11(ARMC6)
2019-03-04 12:23:38 +01:00