Commit Graph

17259 Commits (mbed-os-5.9.6)

Author SHA1 Message Date
paul-szczepanek-arm 0dbcf97742 set correct default privacy configuration for centrals 2018-08-13 14:44:27 +01:00
David Saada f7b83f6e81 FlashIAP: Add timing test 2018-08-13 14:44:27 +01:00
deepikabhavnani 14e04bc9f4 Remove inclusion of mbed.h and mbed namespace from filesystem code 2018-08-13 14:44:27 +01:00
ccli8 1ca35fee1c Organize file structure
This re-organization is to avoid duplicates regarding targets of the same MCU series.
2018-08-13 14:44:27 +01:00
TomoYamanaka daf5b7785c Renesas : Improve Flash iap
I modified the _page_program() because when the request of the size exceeding the maximum size(256 byte) per one writing of Flash recieved, it was not able to loop the writing with sifting the address every 256 byte.

Also I modified the return value of flash_get_page_size() because I found that the minimum size per one writing of Flash is 1 byte by reviewing Flash spec.
"FLASH_PAGE_SIZE" macro's value is remain 256, it doesn't be used at flash_get_page_size(), used at _page_program() for refferencing of the maximum page size.
2018-08-13 14:44:27 +01:00
Teppo Järvelin 5d516f5a0d Cellular: fixed greentea tests C027 and BG96. 2018-08-13 14:44:27 +01:00
bcostm 96cc81412b STM32F7: remove HAL_InitTick() declaration in us_ticker_data.h files 2018-08-13 14:44:27 +01:00
Edd Inglis 87d7b2b7fb An incomplete connect (either abandoned with a disconnect() or just failed of its own accord) would prevent futher connect()'s due to the CONN_IN_PROGRESS_FLAG remaining set. This change clears that flag in the two cases described. 2018-08-13 14:44:27 +01:00
Brendan McDonnell 9222e972dc fix comment copy/paste error 2018-08-13 14:44:27 +01:00
Martin Kojtal 6d75e61e63 cellular: fix tests that astyle breaks
Ignore TEST_GROUP by AStyle. As this uses macro, is not visible to formatter.
By default, it assumes it is a function and treats methods as blocks inside a
function (inlined {}). We ignore it.

We might just not format UNITTESTS in the future if we face similar issues
in the future.
2018-08-13 14:44:27 +01:00
Martin Kojtal 522ef29722 cellular: astyle fix 2018-08-13 14:44:27 +01:00
David Saada a709e91920 Add init reference count to all block devices 2018-08-13 14:44:27 +01:00
David Saada 57bd7109f8 Skip a few tests if not enough memory can be allocated for them. 2018-08-13 14:44:27 +01:00
TomoYamanaka b9bb017419 Add the clear process of "inited" flag in lp_ticker_free()
I added "lp_ticker_inited = 0" in lp_ticker_free() of lp_ticker.c, so
re-initialization will work.
2018-08-13 14:44:27 +01:00
TomoYamanaka b5fee237eb Implementation of LPTICKER feature for Renesas mbed boards
Although other venders implement this feature by using RTC, in my H/W(RZ_A1), I cannot use RTC because it does not satisfy the spec of LP Ticker (ms order and low frequency between 8 KHz and 64 KHz).
Therefore I implemented this feature by creating 1024 division by MTU2(Multi function Timer pulse Unit 2) in order to satisfy this spec.
As a result of investigating, the most unaffected channel among MTU2 placed on GR-PEACH and GR-LYCHEE was channel 3, so I use channel 3 for this feature.

- mbed_drv_cfg.h
  I added a macro of MTU2 channel to this file for commonalizing code for GR-PEACH and GR-LYCHEE, and referenced it's macro at us_ticker.c.
- targets.json
  I added a macro for enabling LP Ticker.
- mtu2.c mtu2.h
  I defined fuction of MTU2's clock supply and stop.
  Because MTU2 is utilized by pwm driver too, those function were referenced at lp_ticker driver and pwm driver.

- lp_ticker.c lp_ticker_init()
  In order to satisfy the LP Ticker spec, I implemented by creating 1024 division by MTU2.
  When an interrupt is required, it will be set with ticker_set_interrupt().

- lp_ticker.c lp_ticker_free()
  This function stops the counting and powerdown the lp_ticker.

- lp_ticker.c lp_read()
  This function returns the timer counter of MTU2.

- lp_ticker.c lp_ticker_set_interrupt()
  In order to satisfy specifications, I implemented lp_ticker_set_interrupt() function.

- lp_ticker.c lp_ticker_fire_interrupt()
  In order to satisfy spec, I implemented lp_ticker_fire_interrupt() function.
  Also I added GIC_EnableIRQ for allowing the interrupt at end of function.

- lp_ticker.c lp_ticker_get_info()
  To satisfy the spec, I implemented lp_ticker_get_info() function. The value of freq includes rounding off.
2018-08-13 14:44:27 +01:00
bcostm 659cebad3a F1 ST CUBE V1.6.1: add I2C patches 2018-08-13 14:44:27 +01:00
bcostm 7449c11e2f F1 ST CUBE V1.6.1
- stm32f1xx hal V1.1.2
2018-08-13 14:44:27 +01:00
Kimmo Vaisanen 70435d28f4 Lora: Fix cancel_sending
This commit fixes some bugs from cancel_sending() method:
-  System crashed if method was called before initialization.
   Now LORAWAN_STATUS_NOT_INITIALIZED will be returned.
-  Method returned LORAWAN_STATUS_BUSY error when no send request was pending.
   LORAWAN_STATUS_OK should be returned in this case.
-  LORAWAN_STATUS_BUSY is now returned if backoff timer is just about to be
   dispatched (time_left returns 0).
2018-08-13 14:44:27 +01:00
Ashok Rao 553cfe9def Changing default SPI CS pin to SD card on MTB 2018-08-13 14:44:27 +01:00
Mika Leppänen 2a16bae7a4 Removed device emac check from emac greentea tests
DEVICE_EMAC is defined only for boards with default Ethernet emac.
It is not defined for example for Realtek RTL8195AM board that
does not have Ethernet. Removed the check for device emac from emac
greentea tests.
2018-08-13 14:44:27 +01:00
Kari Haapalehto 4f14ea7726 WiFiInterface::get_target_default_instance() added to TARGET_WICED. 2018-08-13 14:44:27 +01:00
cyliangtw a2b675197a Initialized return value of numaker_emac link-out 2018-08-13 14:44:27 +01:00
cyliangtw 7e3bd642ef Add error handling for getting null tx buffer 2018-08-13 14:44:27 +01:00
cyliangtw 37aa036117 Fixed NUC472 SD & EMAC IP reset define 2018-08-13 14:44:27 +01:00
Antti Yli-Tokola b307836efe Update mbed-coap version to 4.5.1
Fixes error: IOTCLT-2883 - Blockwise observations not completing
2018-08-13 14:44:27 +01:00
Hasnain Virk fa06653912 Fixing incorrect NetID causing ABP Failures
The issue rose up when using ARMC6. A test case didn't initialize NetID
parameter for ABP while using connect(params) API. NetID is the first 7 bits
of the Device Address. It makes sense to actually remove the net-id parameter
from ABP settings as the stack can deduce it from device address. However, the ABP
structure is exposed in public APIs, so we can't really do that at the moment.
Simpler fix is to move the mask that helps us to extract first 7 bits of the device address
is exposed in lorawan_types.h and the user can use it to deduce correct net-id.
2018-08-13 14:44:27 +01:00
deepikabhavnani ff16f69d87 Remove debug print 2018-08-13 14:44:27 +01:00
Senthil Ramakrishnan b630133a6b Optimize the configuration for RTX evr events to disable the ones not in use 2018-08-13 14:44:27 +01:00
Nis Madsen 81b75d482d MPS2 platform: Enable interrupt on rx for UART 2018-08-13 14:44:27 +01:00
Senthil Ramakrishnan cb119456d2 Fix for max_stack not returning right value when OS_STACK_WATERMARK is enabled 2018-08-13 14:44:27 +01:00
Mika Leppänen 921920846a On STM32F439xI IAR linker file decreased stack size and increased heap
Decreased stack size from 24kB to 1kB (stack is used on boot-up/interrupt
handler). Increased heap size from 65kB to 89kB.

Change is related to issue https://github.com/ARMmbed/mbed-os/issues/7137
where UBLOX_EVK_ODIN_W2 runs out of heap on WLAN.
2018-08-13 14:44:27 +01:00
ccli8 7fcf7deddd Fix __user_setup_stackheap and ARM_LIB_STACK/ARM_LIB_HEAP cannot co-exist in RTOS-less build 2018-08-13 14:44:27 +01:00
ccli8 39c8d2958c Merge multiple ARM/ARMC6 sys.cpp into one 2018-08-13 14:44:27 +01:00
Teppo Järvelin 1b792d6cd1 Cellular: updated unit tests. 2018-08-13 14:44:27 +01:00
Cruz Monrreal 485bdeee15
Merge pull request #7631 from ARMmbed/release-candidate
Release candidate for mbed-os-5.9.4
2018-07-30 15:23:29 -05:00
Cruz Monrreal II 6974f23e99 Fixed LWIP/EMAC issue for additional targets 2018-07-30 10:47:37 -05:00
Cruz Monrreal II d581e40042 Update Mbed version block 2018-07-30 10:47:36 -05:00
Seppo Takalo 2dc22250a2 WICED based WiFi devices still need FEATURE_LWIP
This feature is removed from the master, as it is obsolete now.
LWIP is always build in on the master.
However, 5.9 this still needs to be enabled.
2018-07-30 10:47:36 -05:00
Brendan Moran 6de34fbdbe Make location meaningful in print_error_report
`handle_error` calls `MBED_CALLER_ADDR()`, but this is always a location from within platform/mbed_error.c. This is because `handle_error` is declared static. This does not cause the function to be inlined however. Instead, it is called by each function within mbed_error.c. For example, mbed_error yields this code:

```
000625c8 <mbed_error>:
   625c8:       b510            push    {r4, lr}
   625ca:       460c            mov     r4, r1
   625cc:       4611            mov     r1, r2
   625ce:       461a            mov     r2, r3
   625d0:       9b02            ldr     r3, [sp, #8]
   625d2:       f7ff feff       bl      623d4 <handle_error>
   625d6:       b968            cbnz    r0, 625f4 <mbed_error+0x2c>
   625d8:       4620            mov     r0, r4
   625da:       f7ff ff67       bl      624ac <print_error_report.constprop.0>
   625de:       f7ff fea8       bl      62332 <core_util_is_isr_active>
   625e2:       b910            cbnz    r0, 625ea <mbed_error+0x22>
   625e4:       f7ff fe9f       bl      62326 <core_util_are_interrupts_enabled>
   625e8:       b908            cbnz    r0, 625ee <mbed_error+0x26>
   625ea:       bf30            wfi
   625ec:       e7fd            b.n     625ea <mbed_error+0x22>
   625ee:       2001            movs    r0, #1
   625f0:       f000 f948       bl      62884 <__wrap_exit>
   625f4:       4800            ldr     r0, [pc, #0]    ; (625f8 <mbed_error+0x30>)
   625f6:       bd10            pop     {r4, pc}
   625f8:       80ff010f        .word   0x80ff010f
```

Note that at `625d2` there is a bl to handle error. That replaces the LR, which means that ALL calls to mbed_error will report a location of 0x625d6 or 0x625d7 (user vs. supervisor). I do not expect that this was the intention of the code. The simplest fix is to change line 99:

```C
static inline mbed_error_status_t handle_error(mbed_error_status_t error_status, unsigned int error_value, const char *filename, int line_number)
```

Since `handle_error()` will be inlined, the link register will be kept the same, so `MBED_CALLER_ADDR()` will yield the expected result. However, there is no guarantee that the compiler will respect the `inline` keyword in all circumstances.

The result is that each function that wishes to report its caller must extract its caller. This code cannot be centralised.

I have modified `mbed_error.c` to report the caller of each error reporting function, rather than the error reporting function itself.
2018-07-30 10:47:30 -05:00
ccli8 f0c4e949c5 Replace __wrap__sbrk with overriding _sbrk
With _sbrk being weak, we can override it directly rather than #if to support heap with
two-region model.
2018-07-30 10:47:22 -05:00
Veijo Pesonen 5e8fa8b394 Makes Greentea TCP test cases to timeout less in connection errors
Made to prevent timeout if a single test case fails. The goal is that
each test case might wait only half of the remaining time reserved for
running TCP test cases.
2018-07-30 10:47:19 -05:00
Senthil Ramakrishnan 101cade4e3 Improved logic in wait_us to avoid division operation in sub-millisec case 2018-07-30 10:47:19 -05:00
zzw 93340828ae realtek rtl8195am remove DEVICE_EMAC
1, remove DEVICE_EMAC for wifi feature
2018-07-30 10:47:14 -05:00
zzw ad7cb6563c realtek rtl8195am remove DEVICE_EMAC
1, remove DEVICE_EMAC for wifi feature
2018-07-30 10:46:12 -05:00
TomoYamanaka 73fedecfd8 Revise heap and stack size for Ethernet of GR-PEACH
I changed stack size because the deafult stack size may not be enough for
Ethernet of GR-PEACH(Cortex-A).
- Stack size is default size + 128 byte
In order to maximize the performance of Ethernet, I changed heap size to
below.
- Heap size is default size * 32 byte(send descriptor num is 16 and recv
descriptoer num is 16).
2018-07-30 10:41:47 -05:00
Qinghao Shi d8290667d0 enable HAL FLASH API on Fast Models MPS2 targets 2018-07-30 10:41:46 -05:00
bcostm becdc31214 STM32L496: fix RAM size in ARM scatter file 2018-07-30 10:41:45 -05:00
jeromecoutant 6064af0434 Systimer test : compilation error with MBED_TICKLESS
Issue occurs when "MBED_TICKLESS" is added in mbed_app.json,
not when "MBED_TICKLESS" is added in targets.json
2018-07-30 10:41:43 -05:00
justinkim ead552f22c fix timer Interrupt callback function bug 2018-07-30 10:41:43 -05:00
justinkim a1e2910192 add Systick configuration function in Init function 2018-07-30 10:41:43 -05:00