Commit Graph

6192 Commits (191d3444bbda1a58a9b830dae3269754750b6dc8)

Author SHA1 Message Date
Seppo Takalo 191d3444bb HeapBlockDevice: Don't assert on const functions 2019-12-03 14:38:40 +02:00
Seppo Takalo 6105634bb0 Remove unceressary NULL check from BufferedBlockDevice::size() 2019-12-03 14:38:40 +02:00
Seppo Takalo bcaf37dcfa SlicingBlockDevice should assert, if size does not look valid 2019-12-03 14:38:40 +02:00
Seppo Takalo 92a60c3d80 Extend SlicingBlockDevice test coverage 2019-12-03 14:38:40 +02:00
Seppo Takalo 12dea71f40 Greenteatests: Validate KVStore content when WRITE_ONCE flag is set. 2019-12-03 14:38:40 +02:00
Seppo Takalo 2ddd4069b6 Remove flaky error_inject_test 2019-12-03 14:38:40 +02:00
Seppo Takalo b9eaac4da0 Fix Greentea handler typecasting. 2019-12-03 14:38:40 +02:00
Martin Kojtal ad3647c191
Merge pull request #11957 from kjbracey-arm/crc-redo
MbedCRC and CRC HAL revisions (6.0 redo)
2019-12-03 13:21:36 +01:00
Martin Kojtal da5a8b2b65
Merge pull request #11952 from pferland-multitech/master
Fix for Dragonfly nano and registration for LTE-M plans
2019-12-02 16:55:14 +01:00
Kevin Bracey cf13cd48bc LittleFS test: silence sign mismatch warning 2019-12-02 14:45:37 +02:00
Kevin Bracey 7a219260c1 LittleFS: correct CRC calculation
When using MbedCRC, init value must be non-reversed, regardless of
`reflect_data` or `reflect_out` settings. This means we need to reflect
the intermediate output before passing using it as the next init value.

(In GCC this ends up putting in two `RBIT` instructions back-to-back,
because it's implemented as assembler, so it doesn't know how to
optimise. In ARMC6, `__RBIT` is implemented as an intrinsic, so adding
this reflection cancels the existing reflection and makes the code
smaller).
2019-12-02 14:45:37 +02:00
Kevin Bracey c67816b5ff Adjust code for MbedCRC changes
* Make mbed_error use bitwise MbedCRC call rather than local
  implementation.
* Remove use of POLY_32BIT_REV_ANSI from LittleFS.
* Move some MbedCRC instances closer to use - construction cost is
  trivial, and visibility aids compiler optimisation.
2019-12-02 14:45:37 +02:00
Martin Kojtal 24c6c4cab5
Merge pull request #11935 from AriParkkila/cell-depr-device
Cellular: Mark to be deprecated in CellularDevice
2019-11-29 15:45:35 +01:00
Ari Parkkila 088140e04b Cellular: Mark CellularDevice::stop deprecated 2019-11-29 04:24:56 -08:00
Martin Kojtal 7177d8fefe
Merge pull request #11950 from ABOSTM/DISCO_H747I_TICKLESS
DISCO_H747I: add support of MBED_TICKLESS
2019-11-29 09:48:09 +01:00
Martin Kojtal 9f34b255be
Merge pull request #11958 from mikaleppanen/ws_rf_ch_conf
Add support for Wi-SUN RF channel configuration
2019-11-29 09:47:05 +01:00
Martin Kojtal 733f5e25c8
Merge pull request #11971 from ARMmbed/IOTSTOR-951
TDBStore: Unlock the master mutex even after garbage_collect()
2019-11-29 09:45:22 +01:00
Martin Kojtal ffdd54315f
Merge pull request #11941 from michalpasztamobica/remove_internal_string_apis
Remove string-based API usage within mbed-os
2019-11-28 14:26:03 +01:00
Seppo Takalo 7f7b191077 IOTSTOR-951: Unlock the master mutex even after garbage_collect() 2019-11-28 14:33:07 +02:00
Seppo Takalo b82e106a43 Astyle fixes 2019-11-28 10:59:48 +02:00
Seppo Takalo abbb2485d2 Greentea: Fix storage sizes for SecureStore tests.
Previously Greentea tests was not initialising its storage
before asking for bd->get_program_size(), causing FlashBlockDevice to
return zero. This caused both TDBStorage's to use zero for both
parameter to SlicingBlockDevice(bd, 0, 0), effetivaly both then
used same addresses for slice. This caused SecureStore tests
to fail, because writes to internal RBP storage overwrote keys
from external storage.

Fine-tune TDBStore sizes, so that all tests can fit into storage.
2019-11-28 10:47:47 +02:00
Veijo Pesonen 065ff2645e Fixes features-storage-tests-kvstore-static_tests test case bugs
At least with LPC55S69's default TDBStore configuration it's
impossible to run storage Greentea tests without exhausting the
memory reserved for storing keys.

Fixes an issue where number of keys were removed based on number of
threads which didn't have anything to do with the test case.

Fixes an issue where number of keys were assumed to be constant
but variable number was used for configuration.
2019-11-28 10:37:11 +02:00
Seppo Takalo 8f77de6453 TDBStore safety check: Erase if there is valid keys on the free space.
In case our are contains data from previous reset() or reset_area(),
we might  end up in the situation  where  free space contains valid
key headers,  but we have not erased that area  yet. This can cause
failures if the deinit() and init()  because  new scan of that area
would continue  as long as keys  are found. This causes keys on the
not-yet-erased  area to be included in the new instance of TDBStore.

To prevent this failure,  check  after each key-write that our free
space does not contain valid  key headers.  Also make sure  that we
erase one program unit sector over the master record.  If we erased
just the master record,first key might is still there, causing next
init() to find it.  Extend erase area by  one program unit, so that
build_ram_table() won't find any keys.
2019-11-28 10:37:07 +02:00
Michal Paszta ea04c4f85e Remove internal usage of deprecated APIs in IPCore
Updated:
* netsocket classes,
* unittests, stubs and mocks,
* greentea tests
2019-11-27 20:02:20 +02:00
Alexandre Bourdiol affe7113ef TARGET_STM: Remove timeout on HSEM.
With tickless mechanism hsem can be used for quite a long time
(time to set up PLL clock).
Also, if hsem is held to long, then this is not the current core which is faulty,
but probably the other (the one which hold the HSEM)
2019-11-27 14:25:43 +01:00
Martin Kojtal 9974d831fe
Merge pull request #11949 from ARMmbed/acabarbaye-patch-1
Fix for ARMC5 compilation errors for some targets
2019-11-27 13:12:14 +01:00
Mika Leppänen 2a908b51ff Added support for Wi-SUN RF channel configuration
Added support to Wi-SUN tasklet for following mbed-mesh-api .json configuration options:

       wisun-uc-channel-function
       wisun-bc-channel-function
       wisun-uc-fixed-channel
       wisun-bc-fixed-channel
       wisun-bc-interval
       wisun-bc-dwell-interval
       wisun-uc-dwell-interval

This allows e.g. enabling single channel configuration for testing.

This pull request does not change existing functionality since when
defaults from mbed-mesh-api .json are used, no new or changed
ws_management_* interface calls are made.
2019-11-27 14:04:25 +02:00
Martin Kojtal b0751bf507
Merge pull request #11946 from ARMmbed/revert-11559-crc
Revert "MbedCRC and CRC HAL revisions"
2019-11-27 11:07:13 +01:00
Martin Kojtal 58d6f5f39f
Merge pull request #11873 from AnttiKauppila/disable_sms
Make SMS configurable in Cellular stack
2019-11-27 09:03:55 +01:00
Peter Ferland 35e4904b23 Enabled CGREG for Dragonfly Nano allowing 2G fallback registrations 2019-11-26 17:20:27 -06:00
Peter Ferland 2301036b80 Changed registration AT commands used by Multitech Dragonfly Nano 2019-11-26 16:53:46 -06:00
Adrien CABARBAYE 877523dab4
Update QUECTEL_BG96_CellularStack.cpp
Similar issue for a different target
`./mbed-os/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp", line 431: Error:  #20: identifier "sprintf" is undefined`
> armcc -c --gnu -Ospace --split_sections --apcs=interwork --brief_diagnostics --restrict --multibyte_chars -O3 -DMBED_TRAP_ERRORS_ENABLED=1 --cpu=Cortex-M4.fp.sp --md --no_depend_system_headers --c99 -D__ASSERT_MSG --cpp11 --no_rtti --no_vla -DMBED_ROM_START=0x0 -DMBED_ROM_SIZE=0x80000 -DMBED_RAM_START=0x20000000 -DMBED_RAM_SIZE=0x10000 -DTARGET_SOFTDEVICE_NONE -DTARGET_NORDIC -DCMSIS_VECTAB_VIRTUAL_HEADER_FILE="cmsis_nvic.h" -DTARGET_NRF52 -DCMSIS_VECTAB_VIRTUAL -DTARGET_MCU_NRF52832 -DDEVICE_SPI_ASYNCH=1 -DMBED_TICKLESS -DDEVICE_SLEEP=1 -DFEATURE_BLE=1 -DNRF52_PAN_12 -D__CMSIS_RTOS -DTARGET_SDK_15_0 -DNRF52_PAN_64 -DDEVICE_SPI=1 -DDEVICE_I2C=1 -DNRF52_PAN_15 -DDEVICE_SERIAL=1 -DTARGET_LIKE_MBED -DDEVICE_PORTOUT=1 -DDEVICE_SERIAL_ASYNCH=1 -DTARGET_M4 -DNRF52_PAN_31 -D__FPU_PRESENT=1 -D__CORTEX_M4 -DTARGET_RTOS_M4_M7 -DDEVICE_PORTIN=1 -DTARGET_CORDIO_LL -DTARGET_NRF5x -DCONFIG_GPIO_AS_PINRESET -DDEVICE_SERIAL_FC=1 -DDEVICE_USTICKER=1 -DTARGET_RELEASE -D__MBED__=1 -DTARGET_CORDIO -DMBED_MPU_CUSTOM -DNRF52_PAN_54 -DSWI_DISABLE0 -DDEVICE_INTERRUPTIN=1 -DNRF52_PAN_63 -DNRF52_PAN_51 -DDEVICE_ANALOGIN=1 -DCOMPONENT_PSA_SRV_EMUL=1 -DTARGET_NORDIC_CORDIO -DNRF52_PAN_62 -DNRF52_PAN_55 -DTARGET_CORTEX -DNRF52_PAN_53 -DDEVICE_PWMOUT=1 -DDEVICE_PORTINOUT=1 -DTOOLCHAIN_ARMC5 -DTARGET_CORTEX_M -DDEVICE_ITM=1 -DMBED_BUILD_TIMESTAMP=1574735595.5081437 -DNRF52_PAN_20 -DDEVICE_I2C_ASYNCH=1 -DDEVICE_LPTICKER=1 -DNRF52_PAN_30 -DTARGET_LIKE_CORTEX_M4 -DTARGET_NAME=MTB_UBLOX_NINA_B1 -DCOMPONENT_NSPE=1 -DDEVICE_TRNG=1 -DNRF52_PAN_58 -DTOOLCHAIN_ARM -DARM_MATH_CM4 -D__MBED_CMSIS_RTOS_CM -DNRF52 -DBOARD_PCA10040 -DDEVICE_FLASH=1 -DCOMPONENT_PSA_SRV_IMPL=1 -DTARGET_MTB_UBLOX_NINA_B1 -DDEVICE_SYSTICK_CLK_OFF_DURING_SLEEP=1 -DTARGET_NRF52832 -DTOOLCHAIN_ARM_STD -DNRF52_PAN_36 --preinclude=./BUILD/MTB_UBLOX_NINA_B1/ARMC5/mbed_config.h --via ./BUILD/MTB_UBLOX_NINA_B1/ARMC5/.includes_3003a516b3c5c98831c114756251051b.txt --depend BUILD/MTB_UBLOX_NINA_B1/ARMC5/mbed-os/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.d -o BUILD/MTB_UBLOX_NINA_B1/ARMC5/mbed-os/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.o ./mbed-os/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp
2019-11-26 15:27:15 +00:00
Adrien CABARBAYE de57ba8b50
Fix for ARMC5 compilation errors for some targets
the following compilation error is seen for a number of targets when compiling using ARMC5
`tools.utils.ToolException: "./mbed-os/features/cellular/framework/AT/AT_CellularContext.cpp", line 247: Error:  #20: identifier "sprintf" is undefined`

Failing command:
> 5.06u6/bin/armcc -c --gnu -Ospace --split_sections --apcs=interwork --brief_diagnostics --restrict --multibyte_chars -O3 -DMBED_TRAP_ERRORS_ENABLED=1 --cpu=Cortex-M4.fp.sp --md --no_depend_system_headers --c99 -D__ASSERT_MSG --cpp11 --no_rtti --no_vla -DDEVICE_SERIAL_ASYNCH=1 -D__MBED__=1 -D__CORTEX_M4 -DTOOLCHAIN_ARM -DMBED_BUILD_TIMESTAMP=1574735332.2275832 -DTARGET_RELEASE -DTARGET_GigaDevice -DDEVICE_SERIAL_FC=1 -DARM_MATH_CM4 -DTARGET_LIKE_MBED -DTARGET_GD32E10X -D__FPU_PRESENT=1 -DTARGET_GD32_Target -DTARGET_M4 -DDEVICE_RTC=1 -DDEVICE_INTERRUPTIN=1 -DCOMPONENT_PSA_SRV_EMUL=1 -D__CMSIS_RTOS -DTOOLCHAIN_ARMC5 -DDEVICE_SPISLAVE=1 -DTARGET_GD32_E103VB -DTARGET_CORTEX -DDEVICE_PORTIN=1 -DDEVICE_ANALOGOUT=1 -DDEVICE_I2C=1 -DDEVICE_ANALOGIN=1 -DDEVICE_FLASH=1 -DDEVICE_SLEEP=1 -DCOMPONENT_NSPE=1 -DDEVICE_SERIAL=1 -DDEVICE_PORTOUT=1 -DTARGET_GD32E103VB -DDEVICE_CAN=1 -DTARGET_NAME=GD32_E103VB -DTARGET_CORTEX_M -D__MBED_CMSIS_RTOS_CM -DDEVICE_PWMOUT=1 -DTARGET_FF_ARDUINO -DGD32E10X -DDEVICE_USTICKER=1 -DTARGET_RTOS_M4_M7 -DDEVICE_PORTINOUT=1 -DTOOLCHAIN_ARM_STD -DCOMPONENT_PSA_SRV_IMPL=1 -DDEVICE_SPI=1 -DTARGET_LIKE_CORTEX_M4 -DDEVICE_I2CSLAVE=1 --preinclude=./BUILD/GD32_E103VB/ARMC5/mbed_config.h --via ./BUILD/GD32_E103VB/ARMC5/.includes_022feb5c2e44b9896df9a82c69438bc9.txt --depend BUILD/GD32_E103VB/ARMC5/mbed-os/features/cellular/framework/AT/AT_CellularContext.d -o BUILD/GD32_E103VB/ARMC5/mbed-os/features/cellular/framework/AT/AT_CellularContext.o ./mbed-os/features/cellular/framework/AT/AT_CellularContext.cpp
[Error] AT_CellularContext.cpp@247,0:  #20: identifier "sprintf" is undefined
2019-11-26 15:05:52 +00:00
Antti Kauppila cb806befcf Enabled SMS by default to not break anything 2019-11-26 16:32:53 +02:00
Martin Kojtal 5f7ecea00b
Revert "MbedCRC and CRC HAL revisions" 2019-11-26 13:45:37 +00:00
Martin Kojtal 0df07e6a90
Merge pull request #11937 from AriParkkila/cell-remove-rx-avail
Cellular: Replace CellularSocket.rx_avail with pending_bytes
2019-11-26 12:28:49 +01:00
Ari Parkkila adba109de6 Cellular: Replace CellularSocket.rx_avail with pending_bytes
CellularSocket::rx_avail can be refactored away as
it is a duplicate to CellularSocket::pending_bytes.
2019-11-25 21:49:17 -08:00
Martin Kojtal a169edfdec
Merge pull request #11887 from kyle-cypress/pr/target-p62s1-43438
Add target for CYW9P62S1_43438EVB_01
2019-11-25 18:32:48 +01:00
Antti Kauppila 353782bf63 Disable SMS by default from Cellular stack
Put SMS behind configuration flag to save some memory (4,5kB) for Cellular users not needing SMS features.
UBlox N2XX target is also updated
2019-11-25 11:38:06 +02:00
Martin Kojtal 1a2ecebc62
Merge pull request #11881 from hugueskamba/hk-UBLOX_EVK_ODIN_W2-enable-baremetal
UBLOX_EVK_ODIN_W2: Fix baremetal build and greentea tests
2019-11-25 08:40:33 +01:00
Martin Kojtal eb60e67d92
Merge pull request #11913 from VeijoPesonen/tdbstore_min_size
LPC55S69_NS default TDBStore size increased to 32kB
2019-11-22 14:47:56 +01:00
Martin Kojtal b6edc5b0cc
Merge pull request #11923 from AriParkkila/cell-ppp-wait-connect
Cellular: Fix PPP to wait until connected event from (LWIP) PPP
2019-11-22 14:12:03 +01:00
Martin Kojtal 04ed9c5c8c
Merge pull request #11851 from amq/patch-2
Enable FAT ChaN lib configuration with mbed_lib.json
2019-11-22 13:38:56 +01:00
Martin Kojtal 38a8c0e28f
Merge pull request #11914 from michalpasztamobica/refactor_string_based_apis
Deprecate string-based APIs in IPCore
2019-11-22 12:00:56 +01:00
Hugues Kamba 157d126769 UBLOX_EVK_ODIN_W2: Fix baremetal build and greentea tests
Remove lwIP reliant networking and BLE tests for baremetal

Mbed OS 5 ported lwIP in its OS mode and uses threads. Networking
that rely on lwIP needs to be removed so it can be compiled with the
baremetal profile.

The BLE cordio Greentea tests are also disabled given that the feature
is not supported without an RTOS.
2019-11-22 10:55:39 +00:00
Michal Paszta fd5b4b9119 Deprecate string-based APIs in IPCore
MBED_DEPRECATE macros is added to string-based APIs.
New, non-string-based APIs are added in their place.
Wiced binaries rebuilt
Any existing stubs or mocks are adjusted to compile and run with the newly added non-string based functions.
2019-11-22 11:31:12 +02:00
Martin Kojtal 869df2d280
Merge pull request #11889 from JarkkoPaso/nanostack_release_for_mbedos_5_15
Nanostack release for mbedos 5 15
2019-11-22 09:05:45 +01:00
Ari Parkkila 90d7748514 Cellular: Fix PPP to wait until connected event from (LWIP) PPP 2019-11-21 23:14:18 -08:00
Martin Kojtal 784b03b8b4
Merge pull request #11877 from cy-arsm/cy-arsm/topic/dualstack-ipv6-linklocal-fix
Fix for sending IPv6 UDP packet over link local interface
2019-11-21 14:27:43 +01:00
Martin Kojtal 9588fad72b
Merge pull request #11911 from anttiylitokola/mbed-coap-5.1.2
Update mbed-coap to version 5.1.2
2019-11-21 10:57:32 +01:00