Commit Graph

10318 Commits (ada0d214015aa2e095be1e0108cf6bdd8417cf15)

Author SHA1 Message Date
ccli8 c878a91627 Support flash 2017-04-21 15:42:14 +01:00
Martin Kojtal 42be5c01a7 Merge pull request #4134 from ARMmbed/release-candidate
Release candidate for mbed-os-5.4.3
2017-04-10 12:14:52 +01:00
Anna Bridge 8d89dc0877 Update MBED_LIBRARY_VERSION to v140 2017-04-07 14:03:12 +01:00
Jimmy Brisson 890472c3ce Raise error when mbed_app.json is bad 2017-04-07 14:03:05 +01:00
Adam Green 7a08fb0d2b Only link in LPC17xx ethernet ISR as needed
Originally the ethernet ISR would be linked in to all mbed-os based
firmware because it was named ENET_IRQHandler() so that it would be
automatically placed in the FLASH image's interrupt vector table. This
meant that programs which made no use of the lwIP stack still pulled in
this ISR.

This commit changes the name of the routine so that the ISR isn't
automatically placed in the interrupt vector table at link time but is
instead dynamically placed in the interrupt vector table at runtime
when the lwIP stack is initialized. Now the ethernet ISR is only linked
in when it is actually needed.

Example arm-none-eabi-size output for a simple LED blinking program
showing the before and after size results:
   text	   data	    bss	    dec	    hex	filename
  13208	    148	   7784	  21140	   5294	LPC1768/HelloWorld.elf

   text	   data	    bss	    dec	    hex	filename
  12700	    148	   7468	  20316	   4f5c	LPC1768/HelloWorld.elf
2017-04-07 14:02:59 +01:00
Rob Meades 703817c1e0 Introducing UBLOX_C030 platform. 2017-04-07 14:02:53 +01:00
mjrgh 047059837f Update us_ticker.c 2017-04-07 14:02:46 +01:00
mjrgh 9229772c92 Force events into the future 2017-04-07 14:02:40 +01:00
mjrgh 9954072a84 Fix crash with events in the past
ticker_insert_event() can crash on KLXX (and probably other platforms) if an event is inserted with a timestamp before the current real time.

The problem is easy to trigger:  you just need to set up a Ticker object, and then disable interrupts for slightly longer than the Ticker object's interval.  It's generally bad practice to disable interrupts for too long, but there are some cases where it's unavoidable, and anyway it would be better for the core library function not to crash.  The case where I had an unavoidably long interrupts-off interval was writing flash with the FTFA.  The FTFA hardware prohibits flash reads while an FTFA command is in progress, so interrupts must be disabled for the whole duration of each command to ensure that there are no instruction fetches from flash-resident ISRs in the course of the execution.  An FTFA "erase sector" command takes a fairly long time (milliseconds), and I have a fairly high frequency Ticker (1ms).

The problem and the fix are pretty straightforward.  ticker_insert_event() searches the linked list to figure out where to insert the new event, looking for a spot earlier than any event currently queued.  If the event is in the past, it'll usually end up at the head of the list.  When the routine sees that the new event belongs at the head of the list, it calls data->interface->set_interrupt() to schedule the interrupt for the event, since it's the new soonest event.  The KLXX version of us_ticker_set_interrupt() then looks to see if the event is in the past, which we've stipulated that it is, so rather than actually setting the interrupt, it simply calls the handler directly.  The first thing the Ticker interrupt handler does is re-schedule itself, so we re-enter ticker_insert_event() at this point.  This is where the problem comes in:  we didn't finish updating the linked list before we called set_interrupt() and thus before we recursed back into ticker_insert_event().  We set the head of the list to the new event but we didn't set the new event's 'next' pointer.

The fix is simply to finish updating the list before we call set_interrupt(), which we can do by moving the obj->next initialization ahead of the head pointer update.
2017-04-07 14:02:33 +01:00
Głąbek, Andrzej 2658bdb113 IAR exporter: extended debugger settings template with modifiable options needed for Nordic targets. 2017-04-07 14:02:27 +01:00
jeromecoutant 85db457b9e NUCLEO_L476RG : minor serial pin update
SERIAL_TX and SERIAL_RX pins used for debug printf cannot be set as available
2017-04-07 14:02:21 +01:00
Adam Green 5b82378c06 Modify semihost_disabledebug() to support more interface FW revs
The current implementation of semihost_disabledebug() hangs when used
with mbed interface firwmare revision 21164, the first version which
added support for this semihost call. I encountered this hang when
running a Release build on my mbed-LPC1768 board as the RTOS attempted
to disable the debugger before the idle thread put the CPU to sleep.

The 21164 interface firmware expects that R1 points to a valid argument
block but the current implementation passes in NULL. The fix was to
pass in a dummy block which is ignored by the newer 141212 revision of
the firmware and allows the 21164 version to proceeed without halting
the CPU until a manual reset.

Before this fix semihost_disabledebug() did work with the latest
mbed interface firmware revision 141212 but I rarely use this revision
of the interface firmware due to the instability issues I have
encountered in the past with its CDC and LocalFileSystem functionality.

With this proposed fix, the code now works with both the 21164 and
141212 revisions of the mbed interface firmware on the mbed-LPC1768.
2017-04-07 14:02:15 +01:00
Willie Walker a1391f563d Fix mbed-cli issue #468. Add LPCTargetCode.lpc_patch to POST_BINARY_WHITELIST. 2017-04-07 14:02:08 +01:00
Seppe Stas 23499843b1 Removed superfluous space
The extra space between "--no_wrap_diagnostics" and "-e" is inconsistent with the development and release targets.

It bugs people (like me) that have little OCD tics 😉.
2017-04-07 14:02:02 +01:00
Jimmy Brisson 1ce69d1b26 Elide adding regions to profile when empty 2017-04-07 14:01:56 +01:00
Christopher Haster 523f543726 lpc1768: Removed invalid use of IP_SOF_BROADCAST_RECV option
From opt.h:
IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast
filter on recv operations.

The IP_SOF_BROADCAST_RECV option does not enable or disable recieving
broadcast packets, it only enables a software filter.
2017-04-07 14:01:49 +01:00
jeromecoutant f7c392eb75 reduce IAR heap and stack size for small targets 2017-04-07 14:01:41 +01:00
Mahadevan Mahesh 88b3a7b1a5 Issue 3763: Reduce heap allocation in the GCC linker file
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-04-07 14:01:35 +01:00
Mahadevan Mahesh 4d3a34ee29 K66F: Move bss section to m_data_2 Section
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-04-07 14:01:29 +01:00
Tony Wu 95ccafa7f6 tools - turn off page alignment of sections
By default, ld sets page alignment of sections to 0x8000, which bloats
up elf file size. This behavior is unnecessary for MCU.

Example:

1. page alignment on

mbed.elf file size 144936

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x008000 0x00000000 0x00000000 0x00400 0x00400 R   0x8000
  LOAD           0x008400 0x00000400 0x00000400 0x00010 0x00010 R   0x8000
  LOAD           0x008410 0x00000410 0x00000410 0x0ab3c 0x0ab3c RWE 0x8000
  LOAD           0x018000 0x20000000 0x0000af4c 0x008d0 0x008d0 RW  0x8000
  LOAD           0x01b81c 0x0000b81c 0x0000b81c 0x00000 0x00004 RW  0x8000
  LOAD           0x020000 0x1fff0000 0x1fff0000 0x00000 0x00400 RW  0x8000
  LOAD           0x0188d0 0x200008d0 0x200008d0 0x00000 0x08860 RW  0x8000

2. page alignment off

mbed.elf file size 91792

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000114 0x00000000 0x00000000 0x00400 0x00400 R   0x4
  LOAD           0x000514 0x00000400 0x00000400 0x00010 0x00010 R   0x1
  LOAD           0x000528 0x00000410 0x00000410 0x0ab3c 0x0ab3c RWE 0x8
  LOAD           0x00b068 0x20000000 0x0000af4c 0x008d0 0x008d0 RW  0x8
  LOAD           0x00b938 0x0000b81c 0x0000b81c 0x00000 0x00004 RW  0x1
  LOAD           0x00b938 0x1fff0000 0x1fff0000 0x00000 0x00400 RW  0x1
  LOAD           0x00b938 0x200008d0 0x200008d0 0x00000 0x08860 RW  0x8

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-04-07 14:01:22 +01:00
Michel Jaouen bf96039159 USBHOST : fix device disconnection from hub during hub port reset 2017-04-07 14:01:15 +01:00
jeromecoutant f50accc03c NUCLEO_L011K4 remove unsupported tool chain files 2017-04-07 14:01:09 +01:00
Bradley Scott 72c7cedf12 STM32: Correct I2C master error handling
If I2C slave support is included, then the I2C error handler would
always reset the I2C address, resulting in incorrectly changing the
I2C state to listen for a controller configured as I2C master.  This
change conditionalizes the address setting to only occur if the
controller was in slave mode when the error occurred.
2017-04-07 14:01:03 +01:00
Seppe Stas 79c79a4347 Fixed OBOE in async serial tx for NRF52 target, fixes #4002 2017-04-07 14:00:57 +01:00
Jimmy Brisson 80756e9d7a Add some type checking of configs
Before, the types were not checked and just expected. The old behavior
would cause lots of tracebacks, or, much worse, convert things like:
```
{
     "target_overrides": {
        "*": {
		"target.macros_add": "CONFIG_GPIO_AS_PINRESET"
        }
     }
}
```
into a definition of each of the letters as macros that expand to
nothing, causing massive compilation problems.

I resolved this by adding some type checking to the config data. Now
there is a type check for most of the fields within a library and
application configurations.
2017-04-07 14:00:50 +01:00
Rob Meades 31d1338c82 Construct a ticker-based wait, rather than calling wait_ms(), in the C027 board startup code since, for mbed 5, wait_ms() is an RTOS function and the RTOS is not initialised at this stage in start-up. 2017-04-07 14:00:44 +01:00
Mahadevan Mahesh a0aacd607a KW24D: Add missing SPI defines and Arduino connector definitions
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-04-07 14:00:38 +01:00
Jimmy Brisson cebf64a7a3 Remove the nrf_soc_nosd directory
This removes the duplicate header files from the build. We were getting
lucky on most invocations of `mbed compile` in that these headers were
searched for after some others, but not when exporting to uvision.
2017-04-07 14:00:32 +01:00
Brian Daniels 87cc3d599a Fixing a macro to detect when RTOS was in use for the NRF52840_DK 2017-04-07 14:00:26 +01:00
Andrzej Puzdrowski 1d1df9e172 use core_util_critical_section_enter/exit instead of __enable_irq/__disable_irq 2017-04-07 14:00:19 +01:00
Ron Eldor 7e2a2ca1df Fix compilation errors on linux machine
Change path of include from '\' to '/', which works on linux as well.
2017-04-07 14:00:13 +01:00
Andrzej Puzdrowski ff5ad3ff92 Removed nrf52 targets files form nrf5_sdk13 sources. 2017-04-07 14:00:06 +01:00
Andrzej Puzdrowski 842bfc70f7 code formating, CR changes corrected spi_init() to properly handle re-initialization… #3842 2017-04-07 14:00:00 +01:00
Andrzej Puzdrowski afdbcd3db9 i2c_api implementation has been changed in order to support single byte reads and writes (the latter are used in I2CEeprom module used in CI tests, and this caused that tests-i2c-api were failing). These operations (single byte transfers) are not possible to achieve with the driver from nrf5 SDK (nrf_drv_twi), so the new implementation uses TWI HAL only. 2017-04-07 13:59:53 +01:00
Andrzej Puzdrowski 8731015202 fix mbed-os-rtos-rtx-target_cortex_m-tests-memory-heap_and_stack@IAR by increasing heap size for IAR. Corected initial MSP for ARMCC. 2017-04-07 13:59:47 +01:00
Andrzej Puzdrowski 8898650c66 Removed nRF52840 from memory constrained device list. 2017-04-07 13:59:40 +01:00
Andrzej Puzdrowski febf63b728 fix bugs: - 128 bits service's UUID discovered by a GATT client was shifted. - not possible to connect while being scanning. - not possible to scanning while being connected. for sd >= 3 whitelisting is now setups into setWhitelist method - Gap::setAddress could failed - Gap::getWhitelist wron implemenation 2017-04-07 13:59:34 +01:00
Andrzej Puzdrowski c4e6c0e938 fix: - whitelistin setup modifies identitiy flag and omits address' type. 2017-04-07 13:59:28 +01:00
Andrzej Puzdrowski b5d9db7b44 fix: Gap::setAddress implementation Gap::getPermittedTxPowerValues implemnetation 2017-04-07 13:59:21 +01:00
Andrzej Puzdrowski bb1f316ad5 Changes from CR. - fix typso, renaming, repharse commnets. - fix alghoritm of white/id lists setup functions in nRF5xGap class. 2017-04-07 13:59:15 +01:00
Andrzej Puzdrowski f7aa6e5efe fix: - bad number of pin from nRF52840 , - bad type of mask of gpio for nRF52940 - typo (object.h) - revert abort func. to spi_master driver - update twi_master driver to the newest (e8527f65e90eee6a4dd48ca55d3fc051a556320a master SDK nRF5) 2017-04-07 13:59:09 +01:00
Andrzej Puzdrowski 69919a45e5 upgrade implementationof gap::connect in case of private address and whitelisting for SD API 3 and further 2017-04-07 13:59:02 +01:00
Andrzej Puzdrowski 3a969c6748 introduce API update to (v3.x.x and further)in BLE_GAP_EVT_CONNECTED service. whitelist and identiti list settings provider now takes into account scaner filter po0licy and advertise r filter policy 2017-04-07 13:58:56 +01:00
Andrzej Puzdrowski 8c4c1bd4d6 nrf5_SDK13 update copyright clause 2017-04-07 13:58:50 +01:00
Andrzej Puzdrowski d6a7eeb94c nRF5: whitelisting update fo SD API >-3.x.x 2017-04-07 13:58:44 +01:00
Andrzej Puzdrowski 1730def8b6 add mising fds configuration 2017-04-07 13:58:38 +01:00
Andrzej Puzdrowski 0e8a393d54 NRF5_SDK13: Make BLE sources compilable - this is not redy to use! - Remove ble_advertising.h/c - it was unused, redundant code - includes for SD header ble.h were changed to headers\ble.h in order to distingusch form feature-ble BLE.h - btle_init() introduced PM for disable <B>privacy</B> for API 3 and further. - temporary removed or mocked real implemantation of whitelist-ing support functionalities: btle_security.createWhitelistFromBondTable , gap::startAdvertising, gat::startRadioScan, gap::stopAdvertising Gap::generateStackWhitelist, Gap::getStackWhiteIdentityList-(mock) - Characteristic Descriptor Discoverer - aligned to the apply SD API - long uuid service's read spupport - add BLE features support to sdk configurations file - publicate sdk's id_manager.ah() function. - cutted out f. app_error_handler for mbed-os - removed PACKED definition form app_util_platform (redefined by mbed-os) - Gap::setAddress - allign to new SD API using peer manager - extend Gap::getPermittedTxPowerValues for nRF52840 2017-04-07 13:58:32 +01:00
Andrzej Puzdrowski baaa6086e6 nrf52840: add workaround for RTC errata 20 include thered main stack for cmsis rtos 2017-04-07 13:58:25 +01:00
Andrzej Puzdrowski 60d90ac939 initial creation of nRF52840 BLE target implementation "NRF5_SDK13" as a copy of "NRF5" 2017-04-07 13:58:19 +01:00
Andrzej Puzdrowski 9ff6e8120a Enabled nRF52840_DK's compilation for IAR IDE: - corected scater & startup file for IAR EW - fix warnings caused by port_api.c, ble_radio_notification.c, nrf_drv_spi.c (for IAR it was error), serial_api.c 2017-04-07 13:58:12 +01:00