Skip to content

Release candidate for mbed-os-5.3.3 #3585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
Jan 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
4a4ab8b
Support RTX v4.80 for Cortex-A and a few Malloc API
TomoYamanaka Dec 20, 2016
61d08c8
Revert "[RZ/A1H]Support RTX v4.80 for Cortex-A and a few Malloc API"
TomoYamanaka Dec 21, 2016
aa43fb0
Support RTX v4.80 for Cortex-A and a few Malloc API
TomoYamanaka Dec 21, 2016
859dbb4
STM32: I2C unitary functions for IP V2
LMESTM Dec 15, 2016
21bb46f
I2C test: change slave address
LMESTM Dec 19, 2016
ad39d3f
I2C test: let slave time to get notified
LMESTM Dec 19, 2016
6f6fc02
I2C test: master should send stop
LMESTM Dec 19, 2016
2e54e53
I2C test: add L073RZ
LMESTM Dec 19, 2016
dbecf14
STM32: I2C: remove debug code
LMESTM Jan 3, 2017
76e406f
STM32: I2C: i2c_byte_read return value in case of error
LMESTM Jan 3, 2017
189747f
Fix can_read() return value for STM32 boards
Nodraak Dec 21, 2016
22c454b
Set bit without reseting the whole register
Nodraak Dec 21, 2016
7ff993b
Ensure that PWM=1 is resolved correctly
ducky64 Dec 25, 2016
9b8f5c3
Add TX, EW, EP, BO interrupts; allow reset to clear a bus-off condition
ducky64 Dec 24, 2016
5c9ea66
Fix && -> & typo
ducky64 Jan 2, 2017
318aa4d
Add platform in RTOS tests + build_travis
bcostm Jan 2, 2017
be29d60
Remove USB in build_travis test (USB is not supported right now on th…
bcostm Jan 3, 2017
d51e624
Remove Tab in USB HAL
ccli8 Jan 3, 2017
cbed260
Preventing app_config from clobbering CLI macros
bridadan Jan 3, 2017
3e66e46
lwip - Fixed lwip connected state after bringup with static ips
geky Jan 4, 2017
291c775
lwip - Fixed missing dns servers after bringup with static ipv4 address
geky Jan 4, 2017
429e227
Correctly format include paths for eclipse export
bittailor Jan 5, 2017
16eaec2
Fix review requests
bittailor Jan 5, 2017
e6d0d9d
Remove default -m and -i options for project.py
bridadan Jan 5, 2017
8ea4692
Remove deprecated clean argument
theotherjimmy Jan 5, 2017
7ba1aa5
Add support of TRNG peripheral
bcostm Jan 6, 2017
58edf54
STM: SPI: Initialize Rx in spi_master_write
LMESTM Jan 6, 2017
92813b9
K64F: Add support for SERIAL ASYNCH API
mmahadevan108 Dec 5, 2016
40eed3d
Repair the Emblocks exporer and rename to EmBitz
theotherjimmy Jan 3, 2017
957b74a
events - Fixed overflow of timeout on STM32F4
geky Jan 10, 2017
cff838d
exporters - group by directories in prj root
c1728p9 Jan 10, 2017
609d6a1
MCUXpresso: Fix ENET driver to enable interrupts after interrupt hand…
mmahadevan108 Jan 3, 2017
2cf96c8
Modify update command to directly edit the mbed-os.lib files for each…
adbridge Jan 5, 2017
d0bb026
Review comments: Use os.rename rather that system mv command. In prep…
adbridge Jan 9, 2017
15744b2
Eclipse: Symbols should also be loaded when starting a debug session
janjongboom Jan 5, 2017
bb453c6
STM32L4 deepsleep improvement
jeromecoutant Jan 9, 2017
238cc83
Add NUCLEO_F412ZG in main.cpp files used for the tests
bcostm Jan 9, 2017
9edb16f
Add CAN object structure
bcostm Jan 9, 2017
1739746
Add CAN feature and activate CAN tests for this platform
bcostm Jan 9, 2017
3430f90
Remove automated flag for MBED_29/30 tests
bcostm Jan 9, 2017
1ac5be8
Add support for ethernet-only configuration with Nanostack.
Jan 9, 2017
ec7f949
Fix I2C driver for RZ/A1H
TomoYamanaka Jan 10, 2017
7c33028
Alphabetize UVision groups
theotherjimmy Jan 10, 2017
735e336
Asciiabetize the files within a group
theotherjimmy Jan 10, 2017
25096d8
Change sorting to ignore case
theotherjimmy Jan 10, 2017
018e286
K64F UART Asynch API: Fix synchronization issue
mmahadevan108 Jan 10, 2017
c630d53
LPC4088 - Fix vector checksum
c1728p9 Jan 10, 2017
d3c5838
STM32Cube_FW_F0_V1.7.0
LMESTM Dec 22, 2016
b4a0c03
STM32: HAL update, use I2C function instead of MACRO
LMESTM Jan 3, 2017
08f1a4f
STM32: Serial: Use up to date MACROs
LMESTM Jan 3, 2017
f2a94c8
STM32: TIM: Initialize new TIM parameter
LMESTM Jan 9, 2017
c8d916e
Fixes linking errors when building with debug profile
bridadan Jan 12, 2017
27ba238
Update MBED_LIBRARY_VERSION to v134
adbridge Jan 13, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion events/equeue/equeue_mbed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ static void equeue_sema_timeout(equeue_sema_t *s) {
bool equeue_sema_wait(equeue_sema_t *s, int ms) {
int signal = 0;
Timeout timeout;
timeout.attach_us(s, equeue_sema_timeout, ms*1000);
if (ms > 0) {
timeout.attach_us(callback(equeue_sema_timeout, s), ms*1000);
}

core_util_critical_section_enter();
while (!*s) {
Expand Down
73 changes: 47 additions & 26 deletions features/FEATURE_LWIP/lwip-interface/lwip_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,37 +243,43 @@ const ip_addr_t *mbed_lwip_get_ip_addr(bool any_addr, const struct netif *netif)
return NULL;
}

#if LWIP_IPV6
void add_dns_addr(struct netif *lwip_netif)
{
// Do nothing if not brought up
const ip_addr_t *ip_addr = mbed_lwip_get_ip_addr(true, lwip_netif);
if (ip_addr) {
if (IP_IS_V6(ip_addr)) {
const ip_addr_t *dns_ip_addr;
bool dns_addr_exists = false;

for (char numdns = 0; numdns < DNS_MAX_SERVERS; numdns++) {
dns_ip_addr = dns_getserver(numdns);
if (!ip_addr_isany(dns_ip_addr)) {
dns_addr_exists = true;
break;
}
}
if (!ip_addr) {
return;
}

if (!dns_addr_exists) {
/* 2001:4860:4860::8888 google */
ip_addr_t ipv6_dns_addr = IPADDR6_INIT(
PP_HTONL(0x20014860UL),
PP_HTONL(0x48600000UL),
PP_HTONL(0x00000000UL),
PP_HTONL(0x00008888UL));
dns_setserver(0, &ipv6_dns_addr);
}
// Check for existing dns server
for (char numdns = 0; numdns < DNS_MAX_SERVERS; numdns++) {
const ip_addr_t *dns_ip_addr = dns_getserver(numdns);
if (!ip_addr_isany(dns_ip_addr)) {
return;
}
}
}

#if LWIP_IPV6
if (IP_IS_V6(ip_addr)) {
/* 2001:4860:4860::8888 google */
ip_addr_t ipv6_dns_addr = IPADDR6_INIT(
PP_HTONL(0x20014860UL),
PP_HTONL(0x48600000UL),
PP_HTONL(0x00000000UL),
PP_HTONL(0x00008888UL));
dns_setserver(0, &ipv6_dns_addr);
}
#endif

#if LWIP_IPV4
if (IP_IS_V4(ip_addr)) {
/* 8.8.8.8 google */
ip_addr_t ipv4_dns_addr = IPADDR4_INIT(0x08080808);
dns_setserver(0, &ipv4_dns_addr);
}
#endif
}

static sys_sem_t lwip_tcpip_inited;
static void mbed_lwip_tcpip_init_irq(void *eh)
{
Expand Down Expand Up @@ -495,7 +501,6 @@ nsapi_error_t mbed_lwip_bringup(bool dhcp, const char *ip, const char *netmask,
if (ret == SYS_ARCH_TIMEOUT) {
return NSAPI_ERROR_DHCP_FAILURE;
}
lwip_connected = true;
}

#if ADDR_TIMEOUT
Expand All @@ -506,10 +511,9 @@ nsapi_error_t mbed_lwip_bringup(bool dhcp, const char *ip, const char *netmask,
}
#endif

#if LWIP_IPV6
add_dns_addr(&lwip_netif);
#endif

lwip_connected = true;
return 0;
}

Expand Down Expand Up @@ -618,6 +622,22 @@ static nsapi_error_t mbed_lwip_gethostbyname(nsapi_stack_t *stack, const char *h
return 0;
}

static nsapi_error_t mbed_lwip_add_dns_server(nsapi_stack_t *stack, nsapi_addr_t addr)
{
// Shift all dns servers down to give precedence to new server
for (int i = DNS_MAX_SERVERS-1; i > 0; i--) {
dns_setserver(i, dns_getserver(i-1));
}

ip_addr_t ip_addr;
if (!convert_mbed_addr_to_lwip(&ip_addr, &addr)) {
return NSAPI_ERROR_PARAMETER;
}

dns_setserver(0, &ip_addr);
return 0;
}

static nsapi_error_t mbed_lwip_socket_open(nsapi_stack_t *stack, nsapi_socket_t *handle, nsapi_protocol_t proto)
{
// check if network is connected
Expand Down Expand Up @@ -874,6 +894,7 @@ static void mbed_lwip_socket_attach(nsapi_stack_t *stack, nsapi_socket_t handle,
/* LWIP network stack */
const nsapi_stack_api_t lwip_stack_api = {
.gethostbyname = mbed_lwip_gethostbyname,
.add_dns_server = mbed_lwip_add_dns_server,
.socket_open = mbed_lwip_socket_open,
.socket_close = mbed_lwip_socket_close,
.socket_bind = mbed_lwip_socket_bind,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
24 changes: 12 additions & 12 deletions features/unsupported/USBDevice/USBDevice/USBEndpoints_M453.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#define NU_MAX_EPX_BUFSIZE 4096
#define NU_EP2EPL(ep) ((ep) >> 1)
#define NU_EP2EPH(ep) (((ep) >> 1) + 1)
#define NU_EPL2EPH(ep) ((ep) + 1)
#define NU_EPH2EPL(ep) ((ep) - 1)
#define NU_EPL2EPH(ep) ((ep) + 1)
#define NU_EPH2EPL(ep) ((ep) - 1)
#define NU_EP_DIR_Pos 0
#define NU_EP_DIR_Msk (1 << NU_EP_DIR_Pos)
#define NU_EP_DIR_OUT 0
Expand All @@ -37,22 +37,22 @@
#define EP2IN (5)
#define EP3OUT (6)
#define EP3IN (7)
#define EP4OUT (8)
#define EP4IN (9)
#define EP4OUT (8)
#define EP4IN (9)
#define EP5OUT (10)
#define EP5IN (11)
#define EP6OUT (12)
#define EP6IN (13)

/* Maximum Packet sizes */
#define MAX_PACKET_SIZE_EP0 64
#define MAX_PACKET_SIZE_EP1 64
#define MAX_PACKET_SIZE_EP2 64
#define MAX_PACKET_SIZE_EP3 0x60
#define MAX_PACKET_SIZE_EP4 64
#define MAX_PACKET_SIZE_EP5 64
#define MAX_PACKET_SIZE_EP6 64
#define MAX_PACKET_SIZE_EP7 64
#define MAX_PACKET_SIZE_EP0 64
#define MAX_PACKET_SIZE_EP1 64
#define MAX_PACKET_SIZE_EP2 64
#define MAX_PACKET_SIZE_EP3 0x60
#define MAX_PACKET_SIZE_EP4 64
#define MAX_PACKET_SIZE_EP5 64
#define MAX_PACKET_SIZE_EP6 64
#define MAX_PACKET_SIZE_EP7 64

/* Generic endpoints - intended to be portable accross devices */
/* and be suitable for simple USB devices. */
Expand Down
42 changes: 21 additions & 21 deletions features/unsupported/USBDevice/USBDevice/USBEndpoints_NUC472.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#define NU_MAX_EPX_BUFSIZE 4096
#define NU_EP2EPL(ep) ((ep) >> 1)
#define NU_EP2EPH(ep) (((ep) >> 1) - 1)
#define NU_EPX2EP(ep) ((ep == CEP) ? EP0OUT : ((ep) - EPA + EP1OUT))
#define NU_EPL2EPH(ep) ((ep) - 1)
#define NU_EPH2EPL(ep) ((ep) + 1)
#define NU_EPX2EP(ep) ((ep == CEP) ? EP0OUT : ((ep) - EPA + EP1OUT))
#define NU_EPL2EPH(ep) ((ep) - 1)
#define NU_EPH2EPL(ep) ((ep) + 1)
#define NU_EP_DIR_Pos 0
#define NU_EP_DIR_Msk (1 << NU_EP_DIR_Pos)
#define NU_EP_DIR_OUT 0
Expand All @@ -39,26 +39,26 @@
#define EP2IN (5)
#define EP3OUT (6)
#define EP3IN (7)
#define EP4OUT (8)
#define EP4IN (9)
#define EP4OUT (8)
#define EP4IN (9)
#define EP5OUT (10)
#define EP5IN (11)
#define EP6OUT (12)
#define EP6IN (13)

/* Maximum Packet sizes */
#define MAX_PACKET_SIZE_EP0 64
#define MAX_PACKET_SIZE_EP1 64
#define MAX_PACKET_SIZE_EP2 64
#define MAX_PACKET_SIZE_EP3 0x60
#define MAX_PACKET_SIZE_EP4 64
#define MAX_PACKET_SIZE_EP5 64
#define MAX_PACKET_SIZE_EP6 64
#define MAX_PACKET_SIZE_EP7 64
#define MAX_PACKET_SIZE_EP8 64
#define MAX_PACKET_SIZE_EP9 64
#define MAX_PACKET_SIZE_EP10 64
#define MAX_PACKET_SIZE_EP11 64
#define MAX_PACKET_SIZE_EP0 64
#define MAX_PACKET_SIZE_EP1 64
#define MAX_PACKET_SIZE_EP2 64
#define MAX_PACKET_SIZE_EP3 0x60
#define MAX_PACKET_SIZE_EP4 64
#define MAX_PACKET_SIZE_EP5 64
#define MAX_PACKET_SIZE_EP6 64
#define MAX_PACKET_SIZE_EP7 64
#define MAX_PACKET_SIZE_EP8 64
#define MAX_PACKET_SIZE_EP9 64
#define MAX_PACKET_SIZE_EP10 64
#define MAX_PACKET_SIZE_EP11 64

/* Generic endpoints - intended to be portable accross devices */
/* and be suitable for simple USB devices. */
Expand All @@ -83,7 +83,7 @@
#define MAX_PACKET_SIZE_EPINT 64
#define MAX_PACKET_SIZE_EPISO 1023

#define USBD_GET_EP_MAX_PAYLOAD(ep) (*((__IO uint32_t *) ((uint32_t)&USBD->EPAMPS + (uint32_t)((ep)*0x28))))
#define USBD_GET_EP_DATA_COUNT(ep) ((*((__IO uint32_t *) ((uint32_t)&USBD->EPADATCNT + (uint32_t)((ep)*0x28)))) & 0xFFFFF)
#define USBD_SET_EP_SHORT_PACKET(ep) (*((__IO uint32_t *) ((uint32_t)&USBD->EPARSPCTL + (uint32_t)((ep)*0x28))) = (*((__IO uint32_t *) ((uint32_t)&USBD->EPARSPCTL + (uint32_t)((ep)*0x28)))) & 0x10 | 0x40)
#define USBD_GET_EP_INT_EN(ep) (*((__IO uint32_t *) ((uint32_t)&USBD->EPAINTEN + (uint32_t)((ep)*0x28))))
#define USBD_GET_EP_MAX_PAYLOAD(ep) (*((__IO uint32_t *) ((uint32_t)&USBD->EPAMPS + (uint32_t)((ep)*0x28))))
#define USBD_GET_EP_DATA_COUNT(ep) ((*((__IO uint32_t *) ((uint32_t)&USBD->EPADATCNT + (uint32_t)((ep)*0x28)))) & 0xFFFFF)
#define USBD_SET_EP_SHORT_PACKET(ep) (*((__IO uint32_t *) ((uint32_t)&USBD->EPARSPCTL + (uint32_t)((ep)*0x28))) = (*((__IO uint32_t *) ((uint32_t)&USBD->EPARSPCTL + (uint32_t)((ep)*0x28)))) & 0x10 | 0x40)
#define USBD_GET_EP_INT_EN(ep) (*((__IO uint32_t *) ((uint32_t)&USBD->EPAINTEN + (uint32_t)((ep)*0x28))))
Loading