Secure sending code was passing the remote address as the source
address, bizarrely. This records the local address last used as the
destination for incoming packets and uses that.
Other fix-ups:
* dest_addr (ie remote address) removed from internal_socket_t; this isn't
safe, as one socket talks to multiple remote peers. Use address in
secure_session_t instead.
* Some renaming: listen_socket->socket, send/receive callbacks,
remote_address+remote_port -> remote_host
When handshake fails, or DTLS session is closed, all transactions must
be removed from coap protocol retransmission queue. Otherwise coap
retransmission will start new handshake.
This change prevents the standard library from allocating a large buffer
on the heap. On GCC_ARM, this is a saving of 1K. On ARM, this is a saving
of 64 bytes.
This is a simple re-structure of the K22F folder to allow other MCU
variances to land here.
Created the MCU_K22F512 device but left the 'K22F' as a target for
the FRDM-K22F board.
Rebased to master
This was actually several bugs colluding together.
1. Confusion on the buffer-semaphore paradigm used led to misuse of the
tx semaphore and potential for odd behaviour.
2. Equality tests on tx_consume_index and tx_produce_index did not
handle overflow correctly. This would allow tx_consume_index to catch
up to tx_produce_index and trick the k64f_rx_reclaim function into
forgetting about a whole buffer of pbufs.
3. On top of all of that, the ENET_BUFFDESCRIPTOR_TX_READ_MASK was not
correctly read immediately after being set due to either a compiler
optimization or hardware delays. This caused k64f_low_level_output
to eagerly overrun existing buff-descriptors before they had been
completely sent. Adopting the counting-semaphore paradigm for 1 avoided
this concern.
As pointed out by @infinnovation, the overflow only occurs in the rare
case that the 120MHz CPU can actually generate packets faster than the
ENET hardware can transmit on a 100Mbps link.
Adding the new compile option allows the marking of a set of examples to
indicate whether they should be compiled or not. For the update process
examples that are not compiled will not be auto updated irrespective of
that setting.
Other changes to make return logic from some functions in update.py more
efficient and some typos in the lib file.
When the floating-point calculation is executed into the processing which is called from IRQ handlers, VFP register is overwritten.
Therefore, we fixed the issue. we added the process to execute the saving (Push) and the returning (Pop) of VFP register in before and after the appropriate processing.