Calling close() with negative numbers causes out-of-bounds indexing of the filehandles array. For example, this can happen if open() returns an error and the value is later passed to close().
In Mbed Studio, debugging, based on pyOCD, requires Mbed OS application code starting on the sector boundary.
Modification list:
1. Update TF-M import assets with MCUboot header padding to sector aligned
2. Following above, change header size argument (-H) in wrapper.py command line
3. Following below, fix min-write-size (--align) to 4 (per flash_area_align()) in wrapper.py command line
https://docs.mcuboot.com/design.html#image-trailer
Related issue:
https://github.com/ARMmbed/mbed-os/issues/15417
When IPv6 is prefered it will choose a link local address on a network
that lacks IPv6 over a working IPv4 network, breaking networking.
Change this behaviour to prefer a link local address only as a last
resort.
This also changes LWIP::get_ipv6_addr to not return link local
addresses. Use get_ipv6_link_local_addr instead for this.
The compiler complained:
In file included from .../mbed-os/drivers/usb/source/USBCDC_ECM.cpp:19:
.../mbed-os/drivers/usb/include/usb/USBCDC_ECM.h:27:10: fatal error: events/EventQueue.h: No such file or directory
27 | #include "events/EventQueue.h"
| ^~~~~~~~~~~~~~~~~~~~~
Add null check for return values of functions that are mostly (but not
always) checked for null.
E.g., since 98% of calls to protocol_stack_interface_info_get_by_id
check for null, it is likely that the function can return null values in
some cases, and omitting the check could crash the program.
Storing the address of a local variable (`secret_buf`)
in non-local memory (`prf_ptr->secret`) can cause a
dangling pointer bug if the address is used after the function returns.
The member function bringup() of class ThreadInterface redefines
parameter stack's default value to IPV6_STACK from the inherited default value
DEFAULT_STACK (in Interface).
The default value will be resolved statically, not by dispatch, so this
can cause confusion.
Similar arguments apply to LoWPANNDInterface and WisunInterface.
The array _scratch_buf is allocated using new[] in line 761 of
mbed-os/storage/kvstore/securestore/source/SecureStore.cpp.
But it was freed using delete.
Virtual functions are resolved statically (not dynamically) in
constructors and destructors for the same class. The call should be made
explicitly static by qualifying it using the scope resolution operator.
1. Update BSP CANFD driver
2. Notes for implementation
(1) Each CANFD instance supports two IRQ lines. Use only line 0. Line 1 is not used.
(2) For Rx disabling multiple filter handles,
1) Map all filter handles to filter handle 0
2) Use Rx FIFO 0 for filter handle 0
(3) For Rx enabling multiple filter handles,
1) Use Rx FIFO 0 for filter handle 0
2) Use Rx FIFO 1 for filter handle through first invoking can_filter()
3) Use dedicated Rx Buffer for other filter handles
NOTE: H/W supports mask on Rx FIFO 0/1 but not on dedicated Rx Buffer.
(4) For Tx, use only dedicated Tx Buffer. BSP CANFD driver doesn't support Tx FIFO/Queue.
(5) Support no CAN FD.