Commit Graph

980 Commits (1b7a15501c8cd5d08ccd01b408c6dedb46e5ab1c)

Author SHA1 Message Date
Christopher Haster 747fdec04e bd: Add asserts on initialization in HeapBlockDevice 2017-07-03 11:47:00 +01:00
Christopher Haster 556f4161a5 bd: Fix missing init in MBRBlockDevice 2017-07-03 11:46:59 +01:00
adustm 451eb33ec7 Check that the HASH is not busy before save and restore iHW registers 2017-07-03 11:46:56 +01:00
adustm 7e864de0cc handle context swap + change macro name 2017-07-03 11:46:55 +01:00
adustm 9a8f5a7ef3 replace 64 by define 2017-07-03 11:46:55 +01:00
adustm 1bea47d976 Remove tabs, fix doxygen comments 2017-07-03 11:46:54 +01:00
adustm 95beb43bda Rework SHA1 update for buffer <4 bytes management 2017-07-03 11:46:54 +01:00
adustm f4287fd7db Handle 64 bytes buffers 2017-07-03 11:46:54 +01:00
adustm 3d3affadd2 Move MBEDTLS_SHA1_C from mbedtls_device.h to targets.json 2017-07-03 11:46:53 +01:00
adustm 284b230cc6 Improve memory management 2017-07-03 11:46:53 +01:00
adustm 726c313d56 Remove unneeded function declarations + include file Move include platform from sha1_alt.h to sha1_alt.c 2017-07-03 11:46:53 +01:00
adustm 57996887da Better explanation of the use of mbedtls_sha1_context fields 2017-07-03 11:46:53 +01:00
adustm bc3bf9f3f4 use mbedtls_zeroize instead of memset(xxx,0,xxx) 2017-07-03 11:46:52 +01:00
adustm fbab24db6b NUCLEO_F429ZI/mbedtls: add SHA1 hw_acceleration 2017-07-03 11:46:52 +01:00
bcostm 74361df787 DISCO_L072CZ_LRWAN1: Remove unused code 2017-07-03 11:46:52 +01:00
bcostm 196b975f93 DISCO_L072CZ_LRWAN1: Add USB device configuration files 2017-07-03 11:46:51 +01:00
bcostm 5ec1268438 DISCO_F413ZH: Add this board in mbedOS2 CAN tests 2017-07-03 11:46:40 +01:00
arostm 720e20b5fa DISCO_F413ZH: Modification needed to build 2017-07-03 11:46:38 +01:00
bcostm 05c682e83e DISCO_L475VG_IOT01A: Move USB device config files 2017-06-20 17:13:46 +01:00
bcostm 1aba27a2cf DISCO_L475VG_IOT01A: add this target in i2c master/slave tests 2017-06-20 17:13:45 +01:00
bcostm 15f20cb7ab Add "01A" suffix in target name 2017-06-20 17:13:42 +01:00
bcostm bba148ba2f Add target in unsupported main.cpp test files 2017-06-20 17:13:42 +01:00
Hasnain Virk 253ceee0f2 Check Ethernet before including lwipopts_conf.h
lwipopts_conf.h is used by target dependent Ethernet drivers for
configuring various parameters.
By default, Ethernet is enabled and in this case lwipopts_conf.h
will be included.
In case of PPP  being enabled, it is desirable to not pull in any Ethernet
related code.
2017-06-20 17:13:40 +01:00
Yuguo Zou 334c0aafc6 A better approach to flip "netif_inited" 2017-06-20 17:13:40 +01:00
Yuguo Zou a9b1b1c9d4 replace tab with space 2017-06-20 17:13:40 +01:00
Yuguo Zou 8d21488b42 resolve lwip init twice issue
resolve wifi example test fail before lwip is init
2017-06-20 17:13:39 +01:00
Azim Khan 101cf5e6a3 Remove multiple definition of GREENTEA_SETUP added due to rebase 2017-06-20 17:13:38 +01:00
Azim Khan 0ffbf756d5 Merge greentea-client/test_env_c.h into greentea-client/test_env.h 2017-06-20 17:13:38 +01:00
Azim Khan 9c11240b48 Revert greentea_getc() to return 'int' 2017-06-20 17:13:38 +01:00
Azim Khan c682fb5b74 Use existing functions for Greentea client C API 2017-06-20 17:13:37 +01:00
Azim Khan b0329aea59 Add getc in C API 2017-06-20 17:13:37 +01:00
Mohammad Azim Khan 739d5ecdff C API for greentea client 2017-06-20 17:13:37 +01:00
Christopher Haster 28d2b202c8 Added reporting of reserved heap
Note: Reporting of reserved stack is already performed by the thread
layer
2017-06-20 17:13:35 +01:00
Christopher Haster 8206b4282e fatfs: Fixed initialization of block device in mount/unmount functions
At some point the "mount" parameter for "f_mount" was name "force". This
led to a bit of confusion that ended with the default mount function
never calling block device init.

This is fine, since the block device can be manually initialized, but
a better user experience is where the filesystem initializes the block
device for the user.

This is backwards compatible due to the repeatability of the block
device init functions.
2017-06-20 17:13:35 +01:00
gabker01 9b890198dd Implement low-level Ethernet interface for lwIP
Based on lwip_ethernetif.c skeleton file,
use init, receive and transfer
functionality of SMSC9220 Ethernet driver
for the lightweight IP stack.

Receive mechanism is interrupt driven.

HW buffer sizes:
Tx = 4608 bytes (MTU)
Rx = 10560 bytes

lwIP fine tuning:
mbed-os/features/FEATURE_LWIP/lwip-interface/lwip/src/include/lwip/opt.h

Change-Id: I0ea95650c65fb32cafb5c2d3dde11420c61dba66
Signed-off-by: Gabor Kertesz <gabor.kertesz@arm.com>
2017-06-20 17:13:31 +01:00
Russ Butler be54981ab4 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-13 09:42:14 +01:00
Martin Kojtal e544ee4e28 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-11 09:48:45 +01:00
Brian Daniels 3a98bde1cc Fix bad print message in test 2017-06-11 09:48:44 +01:00
Brian Daniels dad8e4e61a Fixing typos in docs 2017-06-11 09:48:44 +01:00
Brian Daniels 291dc66b3e Fixing bad asserts 2017-06-11 09:48:44 +01:00
Brian Daniels 0168802b6b Adding comments for added Greentea function 2017-06-11 09:48:44 +01:00
Brian Daniels 12658f9285 Cleaning up udp tests 2017-06-11 09:48:43 +01:00
Brian Daniels 20240c043e Adding comments describing buffer prep functions 2017-06-11 09:48:43 +01:00
Brian Daniels fdeef22f14 Simplifying assert statements 2017-06-11 09:48:43 +01:00
Brian Daniels b44e7e9921 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-11 09:48:42 +01:00
Christopher Haster dfae18ab4a 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-11 09:48:42 +01:00
Christopher Haster bb2d327095 lwip: Migrated to utest framework
per @bridadan
2017-06-11 09:48:42 +01:00
Christopher Haster be97cef9ed lwip: Fixed count of udp iterations to reflect attempts 2017-06-11 09:48:41 +01:00
Christopher Haster 5ad880c327 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-11 09:48:41 +01:00
Christopher Haster 5312219452 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-11 09:48:41 +01:00