Commit Graph

8669 Commits (d55e739c663b200f0aed2eb04a32af61d189db40)

Author SHA1 Message Date
Toyomasa Watarai 687132125f Add cmsis.h inclusion 2016-10-19 17:24:16 -05:00
Jimmy Brisson 5c35230657 Remove unneeded relpath calculations 2016-10-19 17:24:15 -05:00
Jimmy Brisson 6d05f1db7c Exporters - Name the eclipse exporters 2016-10-19 17:24:14 -05:00
Mika Leppänen 2794b48c38 Corrected lwip TCP socket accept ipv6 address conversion 2016-10-19 17:24:13 -05:00
Andres AG 97265afc5e Update feature/mbedtls to version 2.4.0 2016-10-19 17:24:12 -05:00
Russ Butler 87e1b379ea CFSTORE - Fix test failures due to fragmentation
In the config store create test in test case #5 the amount of available
memory is determined by fully allocating the heap. This is done
multiple times to determine if there is a memory leak. This causes
problems when even slight fragmentation occurs in the heap, since
the size that can be allocated is decreased slightly, which the test
flags as a memory leak.

This patch makes memory leak detection more robust by using metrics
provided by mbed_stats_heap_get. These metrics are an exact
measurement of memory allocated is not changed by fragmentation.
This allows the memory leak test to report correct values regardless of
fragmentation.
2016-10-19 17:24:11 -05:00
Russ Butler a37ccd1133 CFSTORE - Delete handle even if key ref non zero
When closing a file handle remove the handle from the handle list
regardless of what the reference count of the key it is pointing to is.
This prevents config store from keeping a handle to file handles that
have gone out of scope.
2016-10-19 17:24:10 -05:00
Russ Butler 5a5dbc2b31 CFSTORE - fix handling of realloc fail on delete
The function cfstore_delete_ex is written under the assumption that
CFSTORE_REALLOC will never fail if the size is decreasing. Regardless
of the status of CFSTORE_REALLOC the entry is removed from the config
store and zeroed. This works correctly if CFSTORE_REALLOC correctly
updates area_0_tail, but can lead to crashes in the case area_0_tail is
left unchanged. The crash is because when iterating over the config
store data, cfstore_get_next_hkvt is unable to determine the end of
valid data.

This patch fixes this problem by handling the realloc failure case by
updating area_0_tail even if CFSTORE_REALLOC returns NULL. This
patch also adds an assert to check for out of bound entries in when
calling cfstore_get_next_hkvt. This allows an assert to be triggered
if this bug is re-introduced, rather than a crash.
2016-10-19 17:24:09 -05:00
Russ Butler 9368766cb0 CFSTORE - Fix crashed due to uninit data
When the config store is powered down area_0_head is freed, but
area_0_len is not set to 0. This causes when cfstore_realloc_ex is
called, since on the first allocation it appears that the config store
size is decreasing, and therefore the data is not initialized.

Since the data is uninitiated various fields such as the reference
can have invalid values. On GCC_ARM built with heap stats enabled
this manifests as a crash due to an invalid reference count.

This patch fixes this problem by setting area_0_len to 0 when the data
is freed.
2016-10-19 17:24:08 -05:00
maclobdell 3ab3236328 add macros for NCS36510 IAR IDE building 2016-10-19 17:24:07 -05:00
maclobdell e0e1803e90 add ncs36510 exporter support 2016-10-19 17:24:06 -05:00
Brian Daniels 12db6befc2 Waiting before call to deepsleep to allow buffers to flush 2016-10-19 17:24:05 -05:00
jeromecoutant 5c610e27b7 Increase serial init timeout value 2016-10-19 17:24:04 -05:00
Sarah Marsh d078e94780 Removed k64f defines from templates 2016-10-19 17:24:03 -05:00
andreas.larsson 7f7467861c Fixed the emac_interface_t struct so that the struct constructor is not used. We can not rely on the struct constructor to be run since wifi_emac_get_interface can be run from the OdinWiFiInterface constructor before that. 2016-10-19 17:24:02 -05:00
Anna Bridge 873686ce79 Merge pull request #3033 from ARMmbed/release-candidate
Release candidate for mbed-os-5.2-rc3
2016-10-16 13:03:31 +01:00
Russ Butler c0994409e7 Merge pull request #3032 from ARMmbed/squash_pr2865
Manually bring PR 2865 into the release
2016-10-15 00:12:27 -04:00
Russ Butler a3def803be squash TARGET_NRF5: corrections
Squash all the changes in the PR 2865 -
"TARGET_NRF5: A few corrections in HAL implementation."

This PR causes problems with the release script so a squashed version
without merges is needed.
2016-10-14 16:29:29 -05:00
Bartek Szatkowski 9c52ac2fa9 Odin: Disable WiFi by default
Currently only one network interface can be compiled in at a given time,
to avoid failing automated test on this target WiFi will be disabled by default.
2016-10-14 16:15:50 -05:00
andreas.larsson 22a40da74d Added guard for DEVICE_EMAC in wifi_emac_api.cpp 2016-10-14 16:15:48 -05:00
andreas.larsson c869d01574 Added u-blox ODIN-W2 drivers for all toolchains 2016-10-14 16:15:47 -05:00
Andres AG dbafb03dd2 Update to mbed TLS release candidate 2016-10-14 16:15:45 -05:00
adustm 899acb1627 ADD NEW TARGET : NUCLEO_F756ZG, based on existing NUCLEO_F746ZG 2016-10-14 16:15:44 -05:00
adustm 025a041462 ADD NEW TARGET : NUCLEO_L486RG, based on existing NUCLEO_L476RG 2016-10-14 16:15:43 -05:00
adustm 283a82f23e ADD NEW TARGET : NUCLEO_F439ZI, based on existing NUCLEO_F429ZI 2016-10-14 16:15:41 -05:00
Brian Daniels 1b61b2cc0c Remove shared spi_s struct from XDOT_L151CC 2016-10-14 16:15:39 -05:00
Christopher Haster d111b09eb2 callback - Fixed missing workaround for IAR issue with type information
Related to commit abba0c2
2016-10-14 16:15:38 -05:00
jeromecoutant a5cbb71b98 NUCLEO_F303ZE: Enable all I2C instances 2016-10-14 16:15:37 -05:00
Martin Kojtal 3a33de6577 lwip-interface: fix issue #2993
DEVICE_ are passed as command line -D, thus no inclusion is required.
``platform.h`` is C++ header file, should not be pulled in C files
2016-10-14 16:15:36 -05:00
Russ Butler 0e292ed57b Properly set flags for default_lib = small
Use newlib nano for targets which have the key "default_lib" set to
"small". Also support the legacy key of "default_build".
2016-10-14 16:15:35 -05:00
Sarah Marsh fa4df0998c NRF52_DK support for IAR exporter 2016-10-14 16:15:34 -05:00
Bartek Szatkowski ac0caaba9a DNS: Rework DNS query
Don't ask multiple DNS servers in case of successful connection, even if
the response is negative. Make sure the return value is correct.
2016-10-14 16:15:33 -05:00
Laurent MEUNIER 1807983a73 Update objects definition
STM32F303ZE was introduced in parallel to the changes which consist in
having family wide definitions like device.h file and a common objects
definition.

This target is updated accordingly now to benefit of SPI definitions.
2016-10-14 16:15:32 -05:00
Laurent MEUNIER 37f84ca840 Clean-up style issues
Fix indentation issues, remove useless comments, correct if/else format
2016-10-14 16:15:31 -05:00
Laurent MEUNIER 6b3d9b2427 SPI Peripheral pin - allow SPI3 to be used
Let's swap default PA_4 pin mapping to SPI_3 otherwise SPI3 cannot be used
2016-10-14 16:15:30 -05:00
Laurent MEUNIER 5376654581 Enable SPI_ASYNCH on STM32 boards
Now that SPI_ASYNCH is supported on all STM32 based boards,
let's activate the feature.

Using a default SPI QUEUE of size 2 - this can be later modified if this
prives to be to low. (or too high)
2016-10-14 16:15:29 -05:00
Laurent MEUNIER 0dcd5083f3 spi_master_write - rely on HAL
ASYNCH SPI transfer support has been added based on STM HAL services.
To have both ASYNCH and SYNCH work together, we're also moving the
write API to STM HAL instead of direct registers access.
2016-10-14 16:15:28 -05:00
Laurent MEUNIER 0e5d0bda91 Deploy SPI_ASYNCH to all family
the SPI_ASYNCH feature has been already activated for STM32F4.
This patchset makes it supported on all STM32 families by:
- moving spi_s structure at family level instead of board level
- using the F4 spi_api.c reference implementation and making it a common
stm_spi_api.c file which makes maintenance a lot easier.
- the only part that needs to be implemented for each family is the computation
of the clock frequency input to the spi peripheral which is not the same
accross families. So this is what remains in the spi_api.c of each family.

Because of the introduction of the common file, all the above modifications
needs to be done at once.
2016-10-14 16:15:27 -05:00
Mahadevan Mahesh 504b2ac6b6 Update tests to add support for FRDM KL43Z and FRDM KL82Z
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-10-14 16:15:26 -05:00
Mahadevan Mahesh eac9244eab Add support for KL82Z FRDM board
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-10-14 16:15:25 -05:00
Russ Butler 150caecf30 Revert "Allow max-depth specification in memap"
This reverts commit 8f9f4eefed since
it broke memory map info for IAR, ARMCC and on windows, GCC_ARM.
2016-10-14 16:15:23 -05:00
jeromecoutant ac93f9e41f Add Arduino form factor for DISCO_F746NG and NUCLEO_F767ZI 2016-10-14 16:15:22 -05:00
Bartek Szatkowski b2671a367c Accept profile name as well as file path for tools/make.py --profile
--profile can be used with just a profile name eg. default, debug as
long as <name>.json file is in default profile directory.
2016-10-14 16:15:21 -05:00
Wolfgang Betz 857786e303 I2C bugfix 'i2c_stop()' timeout
- Remove waiting for 'BTF' flag in 'i2c_stop()':
  When 'i2c_stop()' is called from 'i2c_read()' or 'i2c_write()' flag 'BTF'
  has already been cleared (indirectly) by the calling functions and therefore
  'i2c_stop()' would mistakenly always run into a timeout.
- Delay clock enabling until pins are configured:
  Enabling the I2C bus clock before configuring its pins might in rare
  cases lead to HW faults on the bus.
- Move initialization of 'handle->Instance' to function 'i2c_reset()':
  As 'i2c_reset()' uses '__HAL_I2C_GET_FLAG(handle, I2C_FLAG_BUSY)' field
  'handle->Instance' must have been initialized before doing so. Therefore,
  this operation has been anticipated by moving it from function
  'i2c_frequency()' to function 'i2c_reset()'.
2016-10-14 16:15:20 -05:00
andreas.larsson e965c34e66 Fixed wrong stack pointer 2016-10-14 16:15:19 -05:00
andreas.larsson eb2b7f05f2 Enabled TRNG functionality for UBLOX_EVK_ODIN_W2 target. 2016-10-14 16:15:18 -05:00
Alessandro Angelino d190ec0b7d EFM32: Add support for uVisor 2016-10-14 16:15:16 -05:00
Alessandro Angelino ab1ed711ae EFM32: Use SECURE_ACCESS to access the ROM table
To allow enabling of uVisor on EFM32, the ROM table must be accessed
through the CMSIS-provided SECURE_ACCESS macro.
2016-10-14 16:15:15 -05:00
Alessandro Angelino 7711f0a362 EFM32: Make NVIC functions virtualizable
With CMSIS 5, the NVIC functions are virtualizable. Rename the EFM32
NVIC functions to support being virtualized.
2016-10-14 16:15:14 -05:00
pradeep-gr acd91ec098 Low power timer fine tuned for smaller duration 2016-10-14 16:15:13 -05:00