Skip to content

Commit

Permalink
full variants rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
pennam committed Oct 30, 2024
1 parent 2c40ba8 commit 26ff735
Show file tree
Hide file tree
Showing 37 changed files with 116 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ class WhdSTAInterface : public WiFiInterface, public EMACInterface {
return 0;
}

nsapi_error_t set_timeout(uint32_t timeout)
{
_timeout = timeout;
}

/** Set blocking status of interface.
* Nonblocking mode unsupported.
*
Expand Down Expand Up @@ -257,6 +262,7 @@ class WhdSTAInterface : public WiFiInterface, public EMACInterface {
nsapi_security_t _security;
WHD_EMAC &_whd_emac;
OlmInterface *_olm;
uint32_t _timeout;
whd_interface_shared_info_t &_iface_shared;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ extern uint32_t whd_wifi_stop_scan(whd_interface_t ifp);
* Error code if an error occurred
*/
extern uint32_t whd_wifi_join(whd_interface_t ifp, const whd_ssid_t *ssid, whd_security_t auth_type,
const uint8_t *security_key, uint8_t key_length);
const uint8_t *security_key, uint8_t key_length, uint32_t timeout);

/** Joins a specific Wi-Fi network
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ class EMACInterface : public virtual NetworkInterface {
/** @copydoc NetworkInterface::disconnect */
nsapi_error_t disconnect() override;

/** @copydoc NetworkInterface::get_hostname */
const char *get_hostname() override;

/** @copydoc NetworkInterface::set_hostname */
nsapi_error_t set_hostname(const char *hostname) override;

/** @copydoc NetworkInterface::get_mac_address */
const char *get_mac_address() override;

Expand Down Expand Up @@ -146,6 +152,8 @@ class EMACInterface : public virtual NetworkInterface {
OnboardNetworkStack::Interface *_interface = nullptr;
bool _dhcp = true;
bool _blocking = true;
bool _hostname_set = false;
char _hostname[NSAPI_HOSTNAME_SIZE];
bool _hw_mac_addr_set = false;
char _mac_address[NSAPI_MAC_SIZE];
char _ip_address[NSAPI_IPv6_SIZE] {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,24 @@ class NetworkInterface: public DNS {
*/
virtual void set_as_default();

/** Get hostname.
*
* @return Hostname if configured, null otherwise
*/
virtual const char *get_hostname();

/** Set hostname.
*
* @param hostname Hostname string
* @retval NSAPI_ERROR_OK on success
* @retval NSAPI_ERROR_UNSUPPORTED if this feature is not supported
* @retval NSAPI_ERROR_PARAMETER if hostname is not valid
* @retval NSAPI_ERROR_BUSY if hostname couldn't be set (e.g. for
* LwIP stack, hostname can only be set before calling
* \c EthernetInterface::connect method)
*/
virtual nsapi_error_t set_hostname(const char *hostname);

/** Get the local MAC address.
*
* Provided MAC address is intended for info or debug purposes and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ class TLSSocketWrapper : public Socket {
Socket *_transport;
int _timeout = -1;

// Event flags
static const int READ_FLAG = 0x1u;
static const int WRITE_FLAG = 0x2u;

#ifdef MBEDTLS_X509_CRT_PARSE_C
mbedtls_x509_crt *_cacert = nullptr;
mbedtls_x509_crt *_clicert = nullptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ class WiFiInterface: public virtual NetworkInterface {
*/
virtual nsapi_error_t set_channel(uint8_t channel) = 0;

/** Set the Wi-Fi network join timeout.
*
* @param timeout joint timeout in milliseconds (Default: 7000).
* @return NSAPI_ERROR_OK on success, or error code on failure.
*/
virtual nsapi_error_t set_timeout(uint32_t timeout) = 0;

/** Get the current radio signal strength for active connection.
*
* @return Connection strength in dBm (negative value),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,16 @@ typedef enum nsapi_security {
*/
#define NSAPI_IP_BYTES NSAPI_IPv6_BYTES

/** Maximum size of hostname
*
* According to RFC 1034 [1], Section 3.1 "Name space specifications and
* terminology", 63 is the maximum size of a hostname. +1 for the string
* terminator.
*
* [1] https://www.rfc-editor.org/rfc/rfc1034
*/
#define NSAPI_HOSTNAME_SIZE 64

/** Maximum size of MAC address representation
*/
#define NSAPI_MAC_SIZE 18
Expand Down
8 changes: 4 additions & 4 deletions variants/ARDUINO_NANO33BLE/defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
-DFEATURE_STORAGE=1
-D__FPU_PRESENT=1
-D__MBED__=1
-DMBED_BUILD_TIMESTAMP=1720438723.6150708
-DMBED_BUILD_TIMESTAMP=1730202709.4767566
-D__MBED_CMSIS_RTOS_CM
-DMBED_MPU_CUSTOM
-DMBED_TICKLESS
Expand Down Expand Up @@ -65,7 +65,7 @@
-DTOOLCHAIN_GCC_ARM
-DWSF_MAX_HANDLERS=10
-DMBED_NO_GLOBAL_USING_DIRECTIVE=1
-DCORE_MAJOR=4
-DCORE_MINOR=1
-DCORE_PATCH=5
-DCORE_MAJOR=
-DCORE_MINOR=
-DCORE_PATCH=
-DUSE_ARDUINO_PINOUT
Binary file modified variants/ARDUINO_NANO33BLE/libs/libmbed.a
Binary file not shown.
8 changes: 4 additions & 4 deletions variants/EDGE_CONTROL/defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
-DFEATURE_STORAGE=1
-D__FPU_PRESENT=1
-D__MBED__=1
-DMBED_BUILD_TIMESTAMP=1720438575.8324268
-DMBED_BUILD_TIMESTAMP=1730202880.502858
-D__MBED_CMSIS_RTOS_CM
-DMBED_MPU_CUSTOM
-DMBED_TICKLESS
Expand Down Expand Up @@ -69,7 +69,7 @@
-DTOOLCHAIN_GCC_ARM
-DWSF_MAX_HANDLERS=10
-DMBED_NO_GLOBAL_USING_DIRECTIVE=1
-DCORE_MAJOR=4
-DCORE_MINOR=1
-DCORE_PATCH=5
-DCORE_MAJOR=
-DCORE_MINOR=
-DCORE_PATCH=
-DUSE_ARDUINO_PINOUT
Binary file modified variants/EDGE_CONTROL/libs/libmbed.a
Binary file not shown.
8 changes: 4 additions & 4 deletions variants/GENERIC_STM32H747_M4/defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
-DFEATURE_BLE=1
-D__FPU_PRESENT=1
-D__MBED__=1
-DMBED_BUILD_TIMESTAMP=1720439009.4096816
-DMBED_BUILD_TIMESTAMP=1730202826.649384
-D__MBED_CMSIS_RTOS_CM
-DMBED_MPU_CUSTOM
-DMBED_TICKLESS
Expand Down Expand Up @@ -79,7 +79,7 @@
-DUSE_HAL_DRIVER
-DVIRTIO_DEVICE_ONLY
-DMBED_NO_GLOBAL_USING_DIRECTIVE=1
-DCORE_MAJOR=4
-DCORE_MINOR=1
-DCORE_PATCH=5
-DCORE_MAJOR=
-DCORE_MINOR=
-DCORE_PATCH=
-DUSE_ARDUINO_PINOUT
Binary file modified variants/GENERIC_STM32H747_M4/libs/libmbed.a
Binary file not shown.
6 changes: 2 additions & 4 deletions variants/GENERIC_STM32H747_M4/linker_script.ld
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,9 @@ SECTIONS
__bss_end__ = .;
_ebss = .;
} > RAM

.pdm_section 0x3800FC00 (NOLOAD): {
*(.pdm_buffer)
} > RAM_D3
*(.pdm_buffer)
} > RAM_D3

.heap (NOLOAD):
{
Expand All @@ -104,7 +103,6 @@ SECTIONS
. = ORIGIN(RAM) + LENGTH(RAM) - 0x400;
__HeapLimit = .;
} > RAM

.stack_dummy (NOLOAD):
{
*(.stack*)
Expand Down
8 changes: 4 additions & 4 deletions variants/GIGA/defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
-DFEATURE_BLE=1
-D__FPU_PRESENT=1
-D__MBED__=1
-DMBED_BUILD_TIMESTAMP=1720438617.7533863
-DMBED_BUILD_TIMESTAMP=1730203074.8719478
-D__MBED_CMSIS_RTOS_CM
-DMBED_TICKLESS
-DMBEDTLS_FS_IO
Expand Down Expand Up @@ -80,7 +80,7 @@
-DUSE_HAL_DRIVER
-DVIRTIO_DRIVER_ONLY
-DMBED_NO_GLOBAL_USING_DIRECTIVE=1
-DCORE_MAJOR=4
-DCORE_MINOR=1
-DCORE_PATCH=5
-DCORE_MAJOR=
-DCORE_MINOR=
-DCORE_PATCH=
-DUSE_ARDUINO_PINOUT
Binary file modified variants/GIGA/libs/libmbed.a
Binary file not shown.
7 changes: 1 addition & 6 deletions variants/GIGA/linker_script.ld
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,7 @@ SECTIONS
__bss_end__ = .;
_ebss = .;
} > RAM
.openamp_section (NOLOAD) : {
. = ABSOLUTE(0x38000000);
*(.resource_table)
} >RAM_D3 AT > FLASH
.pdm_section (NOLOAD) : {
. = ABSOLUTE(0x3800FC00);
.pdm_section 0x3800FC00 (NOLOAD): {
*(.pdm_buffer)
} > RAM_D3
_dtcm_lma = __etext + SIZEOF(.data);
Expand Down
9 changes: 5 additions & 4 deletions variants/NANO_RP2040_CONNECT/defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-DDEVICE_USTICKER=1
-DDEVICE_WATCHDOG=1
-D__MBED__=1
-DMBED_BUILD_TIMESTAMP=1720438706.2363644
-DMBED_BUILD_TIMESTAMP=1730202686.158914
-D__MBED_CMSIS_RTOS_CM
-DMBED_MPU_CUSTOM
-DMBEDTLS_ENTROPY_NV_SEED
Expand All @@ -44,8 +44,9 @@
-DTARGET_RP2040
-DTOOLCHAIN_GCC
-DTOOLCHAIN_GCC_ARM
-DUNINITIALIZED_DATA_SECTION=1
-DMBED_NO_GLOBAL_USING_DIRECTIVE=1
-DCORE_MAJOR=4
-DCORE_MINOR=1
-DCORE_PATCH=5
-DCORE_MAJOR=
-DCORE_MINOR=
-DCORE_PATCH=
-DUSE_ARDUINO_PINOUT
Binary file modified variants/NANO_RP2040_CONNECT/libs/libmbed.a
Binary file not shown.
8 changes: 5 additions & 3 deletions variants/NANO_RP2040_CONNECT/linker_script.ld
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ MEMORY
ENTRY(_entry_point)
SECTIONS
{
.second_stage_ota : {
KEEP (*(.second_stage_ota))
} > FLASH
.flash_begin : {
__flash_binary_start = .;
} > FLASH
.second_stage_ota : {
KEEP (*(.second_stage_ota))
} > FLASH
.boot2 : {
__boot2_start__ = .;
KEEP (*(.boot2))
Expand Down Expand Up @@ -104,7 +104,9 @@ SECTIONS
} > RAM AT> FLASH
.uninitialized_data (COPY): {
. = ALIGN(4);
__uninitialized_data_start__ = .;
*(.uninitialized_data*)
__uninitialized_data_end__ = .;
} > RAM
.scratch_x : {
__scratch_x_start__ = .;
Expand Down
8 changes: 4 additions & 4 deletions variants/NICLA/defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
-DFEATURE_BLE=1
-D__FPU_PRESENT=1
-D__MBED__=1
-DMBED_BUILD_TIMESTAMP=1720438759.8894477
-DMBED_BUILD_TIMESTAMP=1730202924.3808827
-D__MBED_CMSIS_RTOS_CM
-DMBED_MPU_CUSTOM
-DMBED_TICKLESS
Expand Down Expand Up @@ -75,7 +75,7 @@
-DTOOLCHAIN_GCC
-DTOOLCHAIN_GCC_ARM
-DMBED_NO_GLOBAL_USING_DIRECTIVE=1
-DCORE_MAJOR=4
-DCORE_MINOR=1
-DCORE_PATCH=5
-DCORE_MAJOR=
-DCORE_MINOR=
-DCORE_PATCH=
-DUSE_ARDUINO_PINOUT
Binary file modified variants/NICLA/libs/libmbed.a
Binary file not shown.
8 changes: 4 additions & 4 deletions variants/NICLA_VISION/defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
-DFLOW_SILENT
-D__FPU_PRESENT=1
-D__MBED__=1
-DMBED_BUILD_TIMESTAMP=1720438783.4796686
-DMBED_BUILD_TIMESTAMP=1730202959.8104806
-D__MBED_CMSIS_RTOS_CM
-DMBED_TICKLESS
-DMBEDTLS_FS_IO
Expand Down Expand Up @@ -83,7 +83,7 @@
-DUSE_HAL_DRIVER
-DVIRTIO_DRIVER_ONLY
-DMBED_NO_GLOBAL_USING_DIRECTIVE=1
-DCORE_MAJOR=4
-DCORE_MINOR=1
-DCORE_PATCH=5
-DCORE_MAJOR=
-DCORE_MINOR=
-DCORE_PATCH=
-DUSE_ARDUINO_PINOUT
Binary file modified variants/NICLA_VISION/libs/libmbed.a
Binary file not shown.
7 changes: 1 addition & 6 deletions variants/NICLA_VISION/linker_script.ld
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,7 @@ SECTIONS
__bss_end__ = .;
_ebss = .;
} > RAM
.openamp_section (NOLOAD) : {
. = ABSOLUTE(0x38000000);
*(.resource_table)
} >RAM_D3 AT > FLASH
.pdm_section (NOLOAD) : {
. = ABSOLUTE(0x3800FC00);
.pdm_section 0x3800FC00 (NOLOAD): {
*(.pdm_buffer)
} > RAM_D3

Expand Down
8 changes: 4 additions & 4 deletions variants/OPTA/defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
-DFEATURE_BLE=1
-D__FPU_PRESENT=1
-D__MBED__=1
-DMBED_BUILD_TIMESTAMP=1720438877.8913524
-DMBED_BUILD_TIMESTAMP=1730203018.6299732
-D__MBED_CMSIS_RTOS_CM
-DMBED_TICKLESS
-DMBEDTLS_FS_IO
Expand Down Expand Up @@ -80,7 +80,7 @@
-DUSE_HAL_DRIVER
-DVIRTIO_DRIVER_ONLY
-DMBED_NO_GLOBAL_USING_DIRECTIVE=1
-DCORE_MAJOR=4
-DCORE_MINOR=1
-DCORE_PATCH=5
-DCORE_MAJOR=
-DCORE_MINOR=
-DCORE_PATCH=
-DUSE_ARDUINO_PINOUT
Binary file modified variants/OPTA/libs/libmbed.a
Binary file not shown.
7 changes: 1 addition & 6 deletions variants/OPTA/linker_script.ld
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,7 @@ SECTIONS
__bss_end__ = .;
_ebss = .;
} > RAM
.openamp_section (NOLOAD) : {
. = ABSOLUTE(0x38000000);
*(.resource_table)
} >RAM_D3 AT > FLASH
.pdm_section (NOLOAD) : {
. = ABSOLUTE(0x3800FC00);
.pdm_section 0x3800FC00 (NOLOAD): {
*(.pdm_buffer)
} > RAM_D3
_dtcm_lma = __etext + SIZEOF(.data);
Expand Down
8 changes: 4 additions & 4 deletions variants/PORTENTA_H7_M7/defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
-D__FPU_PRESENT=1
-DLSE_STARTUP_TIMEOUT=200
-D__MBED__=1
-DMBED_BUILD_TIMESTAMP=1720438970.1228094
-DMBED_BUILD_TIMESTAMP=1730202770.5918262
-D__MBED_CMSIS_RTOS_CM
-DMBED_TICKLESS
-DMBEDTLS_FS_IO
Expand Down Expand Up @@ -83,7 +83,7 @@
-DUSE_HAL_DRIVER
-DVIRTIO_DRIVER_ONLY
-DMBED_NO_GLOBAL_USING_DIRECTIVE=1
-DCORE_MAJOR=4
-DCORE_MINOR=1
-DCORE_PATCH=5
-DCORE_MAJOR=
-DCORE_MINOR=
-DCORE_PATCH=
-DUSE_ARDUINO_PINOUT
Binary file modified variants/PORTENTA_H7_M7/libs/libmbed.a
Binary file not shown.
Loading

0 comments on commit 26ff735

Please sign in to comment.