Commit Graph

394 Commits (76af152fe1851c37bb80c374918e822598350c4a)

Author SHA1 Message Date
Antti Kauppila aac3437a22 Cleaned up athandlertest.cpp 2019-12-09 14:09:42 +02:00
Antti Kauppila d6706d1a5f Unittest configuration mechanism improved
Earlier all unittests ended up having all flags in common from all unittest targets.
This is now improved by using googletest provided mechanism to set build time compile options
All cmake files have been modified to reflect changes (when needed)

Could not figure out a syntax for {0x00, 0x00, ..., 0x00} intitializer list yet,
so those needs to be setup by updating C/CXX flags.
2019-12-09 13:11:56 +02:00
Martin Kojtal 412a9317de
Merge pull request #12017 from VeijoPesonen/remove_nvstore
NVStore: already deprecated implementation removed
2019-12-05 09:10:30 +01:00
Martin Kojtal 6f18801ccc
Merge pull request #11986 from ARMmbed/feature_storage_test_improvements
Storage related test improvements and small fixes
2019-12-04 10:16:28 +01:00
Martin Kojtal 4ae8984819
Merge pull request #11878 from michalpasztamobica/api_hardening
Improve API documentation and test coverage
2019-12-04 10:15:43 +01:00
Veijo Pesonen 060a1c6df7 NVStore: deprecated implementation removed 2019-12-03 15:36:31 +02:00
Seppo Takalo d74fa93549 Add unittests for BufferedBlockDevice 2019-12-03 14:38:40 +02:00
Seppo Takalo 92a60c3d80 Extend SlicingBlockDevice test coverage 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
Michal Paszta 75472d0554 Adjust mbed_assert_stub file extension to .cpp 2019-12-02 20:48:16 +02:00
Michal Paszta caf01479ea Improve doxygen and unittest coverage for API
Mainly focusing on hardening the tests for return values.
2019-12-02 20:48:10 +02:00
Michal Paszta 546fdd2596 Move OnboardNetworkStackMock to a separate file
The mock was only used by EthernetInterface tests, but we can reuse it for other tests as well.
2019-12-02 20:47:43 +02:00
Martin Kojtal 0edce8a33e
Merge pull request #11927 from SeppoTakalo/speed_up_unittests
Speed up unittests by not limitting Make to spawn more processes
2019-12-02 14:57:47 +01:00
Kevin Bracey a995c162ac Revise MbedCRC template
* Use compile-time detection of hardware CRC capability, so unneeded
  code and tables do not go into the image.
* Add global JSON config option to allow choice between no tables,
  16-entry tables or 256-entry tables for software CRC. Default set
  to 16-entry, reducing ROM size from previous 256-entry.
* Allow manual override in template parameter to force software or
  bitwise CRC for a particular instance.
* Micro-optimisations, particularly use of `RBIT` instruction and
  optimising bitwise computation using inline assembler.

Incompatible changes:

* Remove special-case "POLY_32BIT_REV_ANSI" - users can use standard
  POLY_32BIT_ANSI, which now uses the same 16-entry tables by default,
  or can use hardware acceleration, which was disabled for
  POLY_32BIT_REV_ANSI. MbedCRC<POLY_32BIT_ANSI, 32, CrcMode::TABLE> can
  be used to force software like POLY_32BIT_REV_ANSI.
* The precomputed table for POLY_16BIT_IBM had errors - this has been
  corrected, but software CRC results will be different from the previous
  software calculation.
* < 8-bit CRC results are no longer are shifted up in the output value,
  but placed in the lowest bits, like other sizes. This means that code
  performing the SD command CRC will now need to use `(crc << 1) | 1`,
  rather than `crc | 1`.
2019-12-02 14:45:37 +02:00
Kevin Bracey fe22bc023e Update HAL CRC API
* Change "is supported" check to be a macro, so it can be done at
  compile-time.
* Eliminate weird shift on 7-bit CRCs.
* Add support for 32-bit CRCs and reversals to TMPM3HQ.
2019-12-02 14:45:37 +02:00
Martin Kojtal aa168594a7
Merge pull request #11892 from mprse/feature-hal-spec-explicit-pinmap
Bring static pinmap extension to master
2019-11-28 15:46:38 +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
Antti Kauppila 367bae654d
Fixed crashing nsapi_dns unittest
Added missing "return" for NetworkStackMock's get_stack() method
2019-11-28 11:23:35 +02:00
Przemyslaw Stekiel 3d03d3553e Add pwmout_init_direct() stub (fix for unittests) 2019-11-28 08:32:12 +01: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
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
Martin Kojtal 5f7ecea00b
Revert "MbedCRC and CRC HAL revisions" 2019-11-26 13:45:37 +00:00
Martin Kojtal 7fbe0c6b41
Merge pull request #11928 from SeppoTakalo/assert_throw
Allow MBED_ASSERT to throw errors in unittests, so we can verify it.
2019-11-25 13:11:41 +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 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
Seppo Takalo 7c579f2da2 Speed up unittests by not limitting Make to spawn more processes 2019-11-22 13:14:15 +02:00
Seppo Takalo c54d76eddf Allow MBED_ASSERT to throw errors in unittests, so we can verify it.
GoogleTest allows you to check whether certain function throws errors.
For example:
ASSERT_ANY_THROW(mbed::HeapBlockDevice one(3050, 100));
or
ASSERT_NO_THROW(bd.init());

As MBED_ERROR is now only function that can throw errors, there is
no need to check the type of thrown object.
2019-11-22 13:10:46 +02: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
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 2bde6581a6
Merge pull request #11720 from mtomczykmobica/ONME-4405
ATCmdParser: merge scanf and recv functions
2019-11-21 15:29:29 +01:00
Marcin Tomczyk 1d3a1b7c6c ATCmdParser: unittests implementation 2019-11-20 22:37:01 -08:00
amq 3eaa3e0325
Add fat_chan defines in storage unit tests cmake 2019-11-17 12:10:57 +01:00
Kevin Bracey 3939c992d4 Revise MbedCRC template
* Use compile-time detection of hardware CRC capability, so unneeded
  code and tables do not go into the image.
* Add global JSON config option to allow choice between no tables,
  16-entry tables or 256-entry tables for software CRC. Default set
  to 16-entry, reducing ROM size from previous 256-entry.
* Allow manual override in template parameter to force software or
  bitwise CRC for a particular instance.
* Micro-optimisations, particularly use of `RBIT` instruction and
  optimising bitwise computation using inline assembler.

Incompatible changes:

* Remove special-case "POLY_32BIT_REV_ANSI" - users can use standard
  POLY_32BIT_ANSI, which now uses the same 16-entry tables by default,
  or can use hardware acceleration, which was disabled for
  POLY_32BIT_REV_ANSI. MbedCRC<POLY_32BIT_ANSI, 32, CrcMode::TABLE> can
  be used to force software like POLY_32BIT_REV_ANSI.
* The precomputed table for POLY_16BIT_IBM had errors - this has been
  corrected, but software CRC results will be different from the previous
  software calculation.
* < 8-bit CRC results are no longer are shifted up in the output value,
  but placed in the lowest bits, like other sizes. This means that code
  performing the SD command CRC will now need to use `(crc << 1) | 1`,
  rather than `crc | 1`.
2019-11-13 14:31:49 +02:00
Kevin Bracey 1f94428a56 Update HAL CRC API
* Change "is supported" check to be a macro, so it can be done at
  compile-time.
* Eliminate weird shift on 7-bit CRCs.
* Add support for 32-bit CRCs and reversals to TMPM3HQ.
2019-11-13 14:31:49 +02:00
Michal Paszta 4e5ea38d14 nsapi_dns: use delete[] for array alloc'd with new[] 2019-11-05 22:39:58 +02:00
Michal Paszta a26d2d9672 Unittests for nsapi_dns 2019-11-05 11:29:36 +02:00
Martin Kojtal 355336ce43
Merge pull request #11797 from ARMmbed/IOTSTOR-941
IOTSTOR-953: Fix address calculations from SlicingBlockDevice
2019-11-05 09:09:14 +01:00
Martin Kojtal fe940924cc
Merge pull request #11683 from AnttiKauppila/baremetal_support
Baremetal profile fixes
2019-11-04 15:53:57 +01:00
Martin Kojtal f27aec3377
Merge pull request #11279 from cy-jayasankar/pr/added-ipv6-link-local-address-api
Add API to get ipv6 link local address
2019-11-04 15:28:41 +01:00
Martin Kojtal c908404d94
Merge pull request #11783 from mirelachirica/set_baud_rate
Adding set baud rate routine
2019-11-04 15:27:02 +01:00
Seppo Takalo 333b281000 Add moduletest for SlicingBlockDevice
This uses HeapBlockDevice for providing the underlying storage block.
Check boundaries that slicingblockdevice do not overlow over to unassigned
blocks.
2019-11-04 16:13:32 +02:00
Seppo Takalo a6d8f74b09 Add unittest for HeapBlockDevice and change some MBED_ASSERTS to errors. 2019-11-04 16:12:36 +02:00
Seppo Takalo 31fbed9066 Add some functionality to atomic stubs 2019-11-04 16:12:36 +02:00
Seppo Takalo 168b51c415 Add storage related files to baseline unittest.
* Refactor some headers to use relative path from Mbed OS root.
* Refactor some data types to compile on 64bit machines.
* Refactor some debug traces to use mbed_trace.
2019-11-04 16:12:36 +02:00
Seppo Takalo 7f089ac074 Add empty unittest to generate zero baseline for untested files. 2019-11-04 16:12:36 +02:00
Seppo Takalo 376bbfc853 Add enough stubs to allow drivers/* to compile. 2019-11-04 16:12:36 +02:00
Seppo Takalo 82045b040d Remove extra GCC arquements.
"--coverage" is synonym to "-fprofile-arcs -ftest-coverage"
https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html

This was causing extra compilation warnings on CLANG.
2019-11-04 16:09:43 +02:00
Martin Kojtal f560e7960a
Merge pull request #11641 from hugueskamba/hk-fix-deepsleep-pwmout
PmwOut: Add method to enable/disable PWM
2019-11-04 14:28:50 +01:00
Mirela Chirica c484fc88f9 Cellular: Added set routine for baud rate 2019-11-01 17:21:31 +02:00