Commit Graph

11195 Commits (35999be01802742f0c4cf302c3890da7a9fbc33d)

Author SHA1 Message Date
Martin Kojtal 35999be018 Merge pull request #4536 from c1728p9/fix_st_socket_problem
STM32 - fix bug where sockets stop receiving data
2017-06-13 09:09:35 +01:00
Russ Butler 9620b0fc7f STM32 - fix bug were sockets stop receiving data
The function _eth_arch_low_level_input() is meant to pass data into
LWIP and to prepare the ethernet buffers to receive more data.
If the LWIP heap is empty and the call to pbuf_alloc() in
_eth_arch_low_level_input returns null, the ethernet receive buffers
are not updated to receive data. Because of this the ethernet RX
interrupt will not fire. Since the RX interrupt is the only thing that
triggers a call to _eth_arch_low_level_input(), the receive buffers
will never get cleared, and the device stops receiving data.

To prevent this from happening, this patch ensures that the function
_eth_arch_low_level_input() clears the receive buffers even if a new
pbuf for the data couldn't be allocated.

This issue can be reproduce by running the test
"features-feature_lwip-tests-mbedmicro-net-udp_echo_parallel"
and on the same machine running the below python script to flood the
device with UDP broadcast packets:

MY_IP = #ADD your local IP here
from socket import *
s = socket(AF_INET, SOCK_DGRAM)
s.bind((MY_IP, 1234))
s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
for _ in range(1000):
    s.sendto("test data", ('255.255.255.255', 1234))
print("Message sent")
2017-06-12 22:18:04 -05:00
Sam Grove f31ea01237 Merge pull request #4487 from Archcady/Realtek_TCM
Resolve Realtek device small code space issue
2017-06-11 01:09:51 -05:00
Sam Grove 22e82659d1 Merge pull request #4483 from c1728p9/workshop_rebase_4061
Improve error messages for bootloader build errors
2017-06-11 01:09:35 -05:00
Sam Grove cfc4159c3f Merge pull request #4490 from pan-/reintroduce_ticker_test
tests: Reintroduce ticker test.
2017-06-11 01:09:24 -05:00
Sam Grove 91bececab9 Merge pull request #4470 from c1728p9/workshop_rebase_4064
Flash API support using the MCUXpresso drivers
2017-06-11 01:09:11 -05:00
Sam Grove f56d64f0f5 Merge pull request #4369 from bridadan/networking_test_update
Increase DHCP timeout, and rework networking tests logic
2017-06-10 15:31:16 -05:00
Yuguo Zou f4522134ed Resolve Realtek device small code space issue
switch on TCM section usage, this should give user code more codespace.
2017-06-10 09:46:01 -05:00
Martin Kojtal d0d7c6f4f6 lwip: fix stm32f4 eth conf file
This file is moved to targets that support eth. It can't be common for any F4, as
not all targets from this family support eth.
2017-06-10 15:20:30 +01:00
Brian Daniels 4f5a199336 Fix bad print message in test 2017-06-10 15:14:28 +01:00
Brian Daniels 00a41add12 Fixing typos in docs 2017-06-10 15:14:28 +01:00
Brian Daniels 94b4160347 Fixing bad asserts 2017-06-10 15:14:28 +01:00
Brian Daniels f616bf28f6 Adding comments for added Greentea function 2017-06-10 15:14:28 +01:00
Brian Daniels c38b709685 Cleaning up udp tests 2017-06-10 15:14:28 +01:00
Brian Daniels ccad027fa7 Adding comments describing buffer prep functions 2017-06-10 15:14:28 +01:00
Brian Daniels 388968f76b Simplifying assert statements 2017-06-10 15:14:28 +01:00
Brian Daniels 6e76fce4fc Specifying default length of UUID for Greentea
This creates a macro for the UUID length used by Greentea. This cuts
down on the use of "magic numbers" in test cases that use
the GREENTEA_SETUP_UUID function.
2017-06-10 15:14:28 +01:00
Christopher Haster d451d1795e Moved network test buffers into heap
This is a workaround for IAR's lack of flexibility with memory regions.
Otherwise these tests would use very little heap and be mostly global
allocations.
2017-06-10 15:14:28 +01:00
Christopher Haster 467eb342f0 lwip: Migrated to utest framework
per @bridadan
2017-06-10 15:14:28 +01:00
Christopher Haster 0887683a13 lwip: Fixed count of udp iterations to reflect attempts 2017-06-10 15:14:28 +01:00
Christopher Haster 036f1cdfd4 lwip: Added udp buffer flushing after dropped packets
Avoids getting stuck in loop where the device always picks
up the previous test's packets
2017-06-10 15:14:28 +01:00
Christopher Haster f11f2b35e0 lwip: Increased DHCP timeout to 60 seconds
This matches the timeout used in linux:
https://linux.die.net/man/5/dhclient.conf

This resolves several issues noticed during testing when we
have a very large number of devices that try to get an IP address
around the same time.
2017-06-10 15:14:28 +01:00
Brian Daniels 70dd7cc273 Fixing some issues in the tcp/udp tests 2017-06-10 15:14:28 +01:00
Brian Daniels f313bc2988 Arranging logic in test to prevent left-over behavior 2017-06-10 15:14:28 +01:00
Brian Daniels dc87aaad1c Making udp_echo_parallel test more robust against network issues.
Making the test more forgiven for minor networking issues. Also adding
more debug prints to make it easier to see which packets are coming from
where.
2017-06-10 15:14:28 +01:00
Brian Daniels acaf435d64 Making UDP test less strict on dropped/mismatched packets.
Before, the UDP test was very strict on the number of packets it would
try to match before failing. Now it will keep trying for the whole test
to get enough passing packets. It also includes the test's UUID so you
can validate which packets are being received.
2017-06-10 15:14:28 +01:00
Brian Daniels 551ff03dc0 Adding ability to preserve Greentea UUID in test.
The Greentea UUID can be used as a source of entropy/randomness during
the test. This is useful for uniquely identifying a test run.
2017-06-10 15:14:28 +01:00
Brian Daniels 98a5262361 Adding failure logs to TCP echo test.
This adds some extra logs to the test for debugging purposes. Also
allows the test to fail immediately if it fails to obtain an IP address.
2017-06-10 15:14:28 +01:00
Brian Daniels 26eafd9958 Allowing dtls test to retry correctly.
The dtls test already has the ability to retry upon a UDP failure.
However the sockets are currently configured to be blocking and to wait
forever. I added a timeout of 1.5 seconds in order the test to correctly
timeout.
2017-06-10 15:14:28 +01:00
Martin Kojtal 13334105e4 Merge pull request #4448 from sg-/add-cell-example
Add mbed-os-example-cellular to release data
2017-06-10 08:29:18 +01:00
Martin Kojtal 6d5f4db6cb Merge pull request #4519 from c1728p9/fix_mktime_test
Fix mktime test
2017-06-10 08:28:11 +01:00
Russ Butler adcd2928fe Fix mktime test DST error
Initialize all values of timeinfo in make_time_info. This prevents
the field 'tm_isdst' from getting inadvertently set to 1 causing
time to be off by 1 hour.
2017-06-09 16:29:24 -05:00
Russ Butler d6af53c3ab Limit mktime test range for IAR
Do not test mktime or localtime past the year 1935 for IAR since this
is out of their supported range.
2017-06-09 16:26:17 -05:00
Jimmy Brisson 113ee13505 Merge pull request #4472 from c1728p9/workshop_rebase_4037
Silicon Labs: Add flash API support
2017-06-09 16:18:41 -05:00
Jimmy Brisson 5c49dba05b Merge pull request #4513 from mikaleppanen/mult_filter_disable
Disabled lwip ethernet ipv6 multicast filter for STM boards
2017-06-09 16:17:34 -05:00
Jimmy Brisson 761151359e Merge pull request #4506 from c1728p9/disable_2_error_trapping
Disable error trapping for mbed 2 builds
2017-06-09 14:22:30 -05:00
Jimmy Brisson f55a8c3088 Merge pull request #4503 from 0xc0170/fix_issue_sdk_vectors
mbed sdk boot: copy vectors addition
2017-06-09 14:22:12 -05:00
Mahadevan Mahesh b3b0d21c8b Flash API support using the MCUXpresso drivers
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2017-06-09 11:20:23 -05:00
Sam Grove 0013b4afa5 Add mbed-os-eample-cellular to release data 2017-06-09 15:18:04 +01:00
Martin Kojtal e850355a16 Merge pull request #4509 from kegilbert/17q2-spi_sdcard-rebase2
NRF52840: enabled SdBlockDevice capability
2017-06-09 15:07:03 +01:00
Martin Kojtal a59a319483 Merge pull request #4466 from geky/cleanup
Clean up dead classes in retarget layer
2017-06-09 15:06:18 +01:00
Martin Kojtal ecc737e14f Merge pull request #4484 from c1728p9/workshop_rebase_4058
STM32L4 Flash support
2017-06-09 15:05:46 +01:00
Martin Kojtal 89b66983b8 Merge pull request #4477 from c1728p9/workshop_rebase_4054
Silicon Labs: Fix bug with SPI MISO and CS handling
2017-06-09 15:05:33 +01:00
Martin Kojtal 8998a55bc7 Merge pull request #4475 from c1728p9/workshop_rebase_4043
Silicon Labs: Add bootloader support
2017-06-09 15:04:55 +01:00
Martin Kojtal d3cf5fb999 Merge pull request #4445 from theotherjimmy/fix-exporters
Fixes for exporter issues
2017-06-09 15:04:01 +01:00
Martin Kojtal 9d9ef18552 Merge pull request #4511 from c1728p9/fix_m0_devices
Fix Cortex-M0 devices
2017-06-09 15:03:30 +01:00
Aksel Skauge Mellbye 0d1bd37746 [Silicon Labs] Add flash API support 2017-06-09 11:51:28 +01:00
Mika Leppänen ee30df993a Disabled lwip ethernet ipv6 multicast filter for STM boards 2017-06-09 11:57:24 +03:00
Jimmy Brisson 603ef3d75e Correct FPU setting for Cortex-M7FD
They had floating point turned off before
2017-06-09 00:03:23 -05:00
Jimmy Brisson 64baee8ac7 Correct profile handling in GNUARMEclipse exporter 2017-06-09 00:03:23 -05:00