Commit Graph

15484 Commits (98d4e1fd690f0ffad8a594744ce837552c03f201)

Author SHA1 Message Date
Christopher Haster 9e03b24120 littlefs: Fixed lookahead overflow and removed unbounded lookahead pointers
As pointed out by davidefer, the lookahead pointer modular arithmetic
does not work around integer overflow when the pointer size is not a
multiple of the block count.

To avoid overflow problems, the easy solution is to stop trying to
work around integer overflows and keep the lookahead offset inside the
block device. To make this work, the ack was modified into a resetable
counter that is decremented every block allocation.

As a plus, quite a bit of the allocation logic ended up simplified.
2018-04-11 22:34:40 -05:00
Keyur Hariya 534f570b0c Rework us_ticker and rtc_api/lp_ticker
Simplify tickers to stop emulating 1us ticks by using native timer resolutions.
Implement ticker get info functions.
Separate rtc and lp ticker init status by implementing separate functions.
2018-04-11 16:16:09 -05:00
Keyur Hariya e802b255be Remove automatic I2C stop after each read
Automatic stop prevents sending repeated start.
2018-04-11 15:07:52 -05:00
Keyur Hariya 840246a4d5 Rework us_ticker and rtc_api/lp_ticker | Fix compiler warnings for spi_api
Simplify tickers to stop emulating 1us ticks by using native timer resolutions.
Implement ticker get info functions.
Separate rtc and lp ticker init status by implementing separate functions.
Add mbed_critical include file to disable compiler warning messages.
2018-04-11 15:02:11 -05:00
Christopher Haster 47bee2343c littlefs: Fixed issue with lookahead trusting old lookahead blocks
One of the big simplifications in littlefs's implementation is the
complete lack of tracking free blocks, allowing operations to simply
drop blocks that are no longer in use.

However, this means the lookahead buffer can easily contain outdated
blocks that were previously deleted. This is usually fine, as littlefs
will rescan the storage if it can't find a free block in the lookahead
buffer, but after changes that caused littlefs to more conservatively
respect the alloc acks (e611cf5), any scanned blocks after an ack would
be incorrectly trusted.

The fix is to eagerly scan ahead in the lookahead when we allocate so
that alloc acks are better able to discredit old lookahead blocks. Since
usually alloc acks are tightly coupled to allocations of one or two blocks,
this allows littlefs to properly rescan every set of allocations.

This may still be a concern if there is a long series of worn out
blocks, but in the worst case littlefs will conservatively avoid using
blocks it's not sure about.

Found by davidefer
2018-04-11 14:41:01 -05:00
deepikabhavnani 40e2737414 Add SHA:d0a43b8a Conditional compilation 2018-04-11 11:47:46 -05:00
Deepika d0a43b8af0 CMSIS/RTX: Patch to conditionally compile
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure
2018-04-11 11:41:26 -05:00
Kari Haapalehto f2b37b7d42 Add new target MTB_ADV_WISE_1530.
MTB_ADV_WISE_1530 and MTB_USI_WM_BN_BM_22 includes same usi chip,
so common USI_WM_BN_BM_22 target has been created.
MTB_ADV_WISE_1530 and MTB_USI_WM_BN_BM_22 are inheting the common usi target
2018-04-11 15:50:28 +03:00
Hasnain Virk ec34796fd5 [IOTCELL] Setting up channels for AU915
Bug was reported by @tpet93 and it was correctly diagnosed that channels
were not being set in the phy_params structure. This commit fixes the bug
and sets up channels correctly.
2018-04-11 15:41:22 +03:00
Andreas Rebert 01d06a9f51 LPC4088: Fix hardfault occuring after power-cycle
Since revision 5499db1 (mbed-os-5.6.0) a hardfault occurs after a power-cycle.
It doesn't occur after a reset when the application has been downloaded using
drag-and-drop or via debugger. This is probably the reason why this problem
isn't detected when testing new mbed releases.

The hardfault occured in hal_sleep(). Adding a __NOP after __WFI solves the
problem although I don't fully understand why.

- Revision ca661f9 is the last revision where the problem doesn't occur.
- The problem doesn't occur when compiling with GCC instead of ARM compiler
- This issue describes a similar, but not identical problem and led me to test adding a __NOP: https://github.com/ARMmbed/mbed-os/issues/5065
2018-04-11 11:13:43 +02:00
jeromecoutant b6a8a50a28 STM32F1 : correct compilation warnings 2018-04-11 11:06:44 +02:00
jeromecoutant c2ee8f34b6 STM32F0 : correct compilation warnings 2018-04-11 09:57:54 +02:00
Paul Thompson f41cf081c9 STM32 : correct compilation warnings 2018-04-11 09:53:15 +02:00
Teppo Järvelin 9c185d9b63 Cellular: Fixing to skip greentea test if sim pin is not configured. 2018-04-11 09:38:13 +03:00
Teppo Järvelin b3226acbbf Cellular: Fixed rebase error. 2018-04-11 09:38:13 +03:00
Teppo Järvelin f7f21dc377 Cellular: review fixes and fixed unit tests. 2018-04-11 09:38:13 +03:00
Teppo Järvelin 12e1f07150 modified at timeout while doing attach and connect as it might take up to one minute and at timeout was 10s. 2018-04-11 09:38:13 +03:00
Teppo Järvelin 31428533ba Fixed missing doxygen param. 2018-04-11 09:38:13 +03:00
Mirela Chirica 9531bbeaf5 BC95 fixes 2018-04-11 09:38:13 +03:00
Teppo Järvelin c036b6698d Doxygen fixes for copy-paste errors. 2018-04-11 09:38:13 +03:00
Ari Parkkila d828959b87 Cellular: Greentea test timeouts increased 2018-04-11 09:38:13 +03:00
Teppo Järvelin dcdb7a5da2 Fixed state machine to accept roaming as valid registration. 2018-04-11 09:38:13 +03:00
Teppo Järvelin c82fd31735 Removed double attach from EasyCellularConnection. 2018-04-11 09:38:13 +03:00
Ari Parkkila 8c019e6c83 Cellular: Remove excessive destructor declaration to fix compile error 2018-04-11 09:38:13 +03:00
Ari Parkkila d7cabe2183 Cellular Greentea tests fixed 2018-04-11 09:38:13 +03:00
ccli8 d52b502fea Fix typo with NVStore 2018-04-11 14:34:54 +08:00
Teppo Järvelin ac9b882049 Fixed bug in state machine registaring phase. 2018-04-11 09:31:44 +03:00
Teppo Järvelin 6f3eebcd36 Fixed possible crash and removed trace from greentea. 2018-04-11 09:31:44 +03:00
Ari Parkkila ea9869e330 Cellular: Greentea tests for UDP socket 2018-04-11 09:31:44 +03:00
Teppo Järvelin f6a0403c82 Fixed build by removing unnecessary include. 2018-04-11 09:31:44 +03:00
Teppo Järvelin af2890da03 Improved registration phase in state machine. 2018-04-11 09:31:44 +03:00
Ari Parkkila 6072407ec9 Cellular: async FSM updates 2018-04-11 09:31:44 +03:00
Teppo Järvelin 84b445f51c Fixed coverity warnings for class ATHandler and removed unnecessary assert from state machine. 2018-04-11 09:31:44 +03:00
Teppo Järvelin 54ab974846 Fixed coverity warnings for targets folder. Also fixed one bug while copying sim. 2018-04-11 09:31:44 +03:00
Teppo Järvelin fa61f094db Fixed coverity warning for class CellularUtil. 2018-04-11 09:31:44 +03:00
Teppo Järvelin 12b0bc4a36 Fixed coverity warnings for AT_CellularStack. 2018-04-11 09:31:44 +03:00
Teppo Järvelin af0de8ece0 Fixed coverity warnings for class AT_CellularDevice. 2018-04-11 09:31:44 +03:00
Teppo Järvelin 0ebfa35d7b Fixed coverity warnings for class CellularConnectionFSM 2018-04-11 09:31:44 +03:00
Teppo Järvelin f6be35c0f2 Fixed coverity warnings for AT_CellularSMS.cpp 2018-04-11 09:31:44 +03:00
Teppo Järvelin 89843246ac Separated context activation from connect, increased stack size to 2048 to avoid stack underflows and changed connection callback call. 2018-04-11 09:31:44 +03:00
Teppo Järvelin f0026e4c48 review fixed and some minor improvements. 2018-04-11 09:31:44 +03:00
Teppo Järvelin b400d18a0c Wait for modem ready signal in startup sequence. 2018-04-11 09:31:44 +03:00
Teppo Järvelin 231458dc36 Picked Ari's changed to reduce stack size. Removed device info printing from state machine. 2018-04-11 09:31:44 +03:00
Teppo Järvelin d1f2e91e93 Working version of async registration. 2018-04-11 09:31:44 +03:00
Teppo Järvelin 2b14a9ee5f temp 2018-04-11 09:31:44 +03:00
Teppo Järvelin 702efc1de5 Temp commit, not compiling... 2018-04-11 09:31:44 +03:00
Teppo Järvelin c26311b071 async works. Retry logic needs refining. 2018-04-11 09:31:44 +03:00
Teppo Järvelin 83ea9be5f5 temp commit while changing work... 2018-04-11 09:31:44 +03:00
Teppo Järvelin 1661fc2744 Modified state machine, added cellular state and callback. 2018-04-11 09:31:44 +03:00
Cruz Monrreal 3bc2d2e1db
Merge pull request #6564 from ARMmbed/g-fix-rate-limit
Travis: Fix rate-limit issue with Github requests
2018-04-10 18:09:25 -05:00