Skip to content
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

Release candidate for mbed-os-5.4.2 #4025

Merged
merged 59 commits into from
Mar 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
7f63650
AES ECB for NUCLEO_F439ZI +---------------------------+--------+-----…
adustm Feb 28, 2017
ec5a2ef
Add AES_CBC mode
adustm Feb 6, 2017
1a5bab8
Better use of MBEDTLS_AES_ALT removed from targets.json, added in mbe…
adustm Feb 17, 2017
48de782
Big commit after code review from andesag01 cleanup in include files …
adustm Feb 17, 2017
3604c3a
remove mbedtls_printf error notification
adustm Feb 28, 2017
8f0eb68
Revert mbedtls selftest to avoid impact on other targets
adustm Mar 9, 2017
bb6df59
Correct return values for `I2C::write(int, const char*, int, bool)`
betzw Feb 23, 2017
edc473a
rtos: Return an error when a Thread is re-used
c1728p9 Mar 1, 2017
1bec2f2
rtos: Add Inactive return to thread get state
c1728p9 Mar 3, 2017
fe4867e
rtos: Prevent Thread class from being copied
c1728p9 Mar 6, 2017
998f31e
A4 and A5 definitions added
radhika-raghavendran Mar 9, 2017
a9aaeca
Re-do change for changing ADC range from 0 to 3.3V
radhika-raghavendran Mar 10, 2017
dc52812
Changed tab to spaces
radhika-raghavendran Mar 10, 2017
ef48d7f
STM32Cube_FW_F7_V1.6.0 CMSIS v1.1.2 => v1.2.0 STM32F7 HAL v1.1.2 => v…
jeromecoutant Mar 6, 2017
c3d0ca3
Use PATH env variable when gcc found in PATH
theotherjimmy Mar 6, 2017
e949b85
Add unit test for gcc path specifications
theotherjimmy Mar 7, 2017
43d4a7c
Fix mistake register setting in serial_format()
TomoYamanaka Mar 10, 2017
13b2d0f
tools: Allow all flash algos to be retrieved
c1728p9 Mar 13, 2017
ff9f9ec
tools: fix package version in arm pack manager
c1728p9 Mar 7, 2017
7e77e28
tools: Rebuild index.json and aliases.json
c1728p9 Mar 13, 2017
4924f85
tools: fix usage of aliases.json
c1728p9 Mar 13, 2017
4fe568d
Add RC calibration setting and revise mbed_overrides.c
TsungtaWu Mar 11, 2017
5029cbc
bd: Added randomness to block device test and more debug friendly output
geky Feb 10, 2017
48bbb7a
bd: Remove constraints on device for block device tests
geky Mar 7, 2017
aa561f2
Fix incorrect use of peripheral name as peripheral base address
ccli8 Feb 15, 2017
9127a1a
Refine pin/peripheral/pin map definitions
ccli8 Feb 15, 2017
aefa147
Fix PDMA error on timeout
ccli8 Mar 7, 2017
a19fa06
Fix pwmout power-down condition
ccli8 Mar 8, 2017
61f3784
Add dma_modbase() to get PDMA base address
ccli8 Mar 8, 2017
da27610
Refine SPI PDMA code
ccli8 Mar 8, 2017
1317f51
Refine serial PDMA code
ccli8 Mar 8, 2017
8f6171e
Support unique locally administered MAC address
cyliangtw Mar 9, 2017
fbe31a7
Adjust locally administered MAC address
cyliangtw Mar 9, 2017
f2850b0
remove dead code in nuc472_netif.c
cyliangtw Mar 14, 2017
48baf7c
Heap size adjusted to work for both tls-client and mbed-client
Mar 10, 2017
006503d
Don't set the build_dir to anything on export
theotherjimmy Mar 10, 2017
7b2b4dc
This change is for RZ_A1H and VK_RZ_A1H target.
phyokyaw-renesas Mar 14, 2017
9524b33
OS2 tests minor updates for STM32
jeromecoutant Mar 16, 2017
414a0c1
NUCLEO_F302R8: Add missing PB_8/PB_9 CAN pins
bcostm Mar 20, 2017
2d985eb
NSAPI/lwIP: Free held netbuf on close
kjbracey Mar 21, 2017
8806ed6
mbed-coap error fixes merge to mbed OS
Mar 21, 2017
61e8ba0
Fix test code mbed-os-tests-mbed_hal-flash
ccli8 Mar 20, 2017
5673f4d
Fix C declaration of dir functions and types
Mar 16, 2017
9c043f0
Fixed/improved error parsing from API messages. Fixed results output …
adbridge Mar 10, 2017
2f80fda
Review comments: Add a child logger, close json file after reading, m…
adbridge Mar 14, 2017
3ef17da
Added running total for target being compiled.
adbridge Mar 14, 2017
f413884
Add an ignore list so that sets of test, target can be excluded from …
adbridge Mar 16, 2017
94e1ad5
First pass on TB Sense (and EFR32MG12) support
Mar 13, 2017
c7b5301
Update to Gecko SDK 5.1.2
stevew817 Mar 13, 2017
3e767b7
Update to Gecko SDK 5.1.2
stevew817 Mar 13, 2017
00e1d93
Update to Gecko SDK 5.1.2
stevew817 Mar 14, 2017
6540413
Add new target EFM32PG12
stevew817 Mar 14, 2017
37d47a6
Update clock calibration structs to match latest Gecko SDK
stevew817 Mar 14, 2017
30333f4
Bugfix for EFM32PG12 and EFR32MG12
stevew817 Mar 14, 2017
62093af
EFR32 radio driver small fixes
stevew817 Mar 16, 2017
fe0700e
Pass Travis
stevew817 Mar 16, 2017
691564a
Stop using device_has for non-mbed options
stevew817 Mar 17, 2017
378c10b
Update MBED_LIBRARY_VERSION to v139
adbridge Mar 24, 2017
0edca5a
Update mbed-trace
Mar 16, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions TESTS/mbed_hal/flash/functional_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ static void erase_range(flash_t *flash, uint32_t addr, uint32_t size)
TEST_ASSERT_NOT_EQUAL(0, sector_size);
int32_t ret = flash_erase_sector(flash, addr);
TEST_ASSERT_EQUAL_INT32(0, ret);
addr += sector_size;
size = size > sector_size ? size - sector_size : 0;
}
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/I2C.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ class I2C {
* @param repeated Repeated start, true - do not send stop at end
*
* @returns
* 0 or non-zero - written number of bytes,
* negative - I2C_ERROR_XXX status
* 0 on success (ack),
* non-0 on failure (nack)
*/
int write(int address, const char *data, int length, bool repeated = false);

Expand Down
12 changes: 12 additions & 0 deletions features/FEATURE_COMMON_PAL/mbed-coap/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log

## [v4.0.3](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.0.3)

-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v4.0.2...v4.0.3)

**New feature**

- CoAP Protocol Confirmable resend fix and minor memory optimization (IOTMAC-328)

**Closed issues:**

- IOTCLT-1439 - stuck in while loop

## [v4.0.0](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.0.2)

**New feature**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ extern int8_t sn_coap_protocol_destroy(struct coap_s *handle);
* In failure cases:\n
* -1 = Failure in CoAP header structure\n
* -2 = Failure in given pointer (= NULL)\n
* -3 = Failure in Reset message\ŋ
* -3 = Failure in Reset message\n
* -4 = Failure in Resending message store\n
* If there is not enough memory (or User given limit exceeded) for storing
* resending messages, situation is ignored.
*/
Expand Down
2 changes: 1 addition & 1 deletion features/FEATURE_COMMON_PAL/mbed-coap/module.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mbed-coap",
"version": "4.0.2",
"version": "4.0.3",
"description": "COAP library",
"keywords": [
"coap",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ typedef struct sn_nsdl_transmit_ {

uint16_t packet_len;
uint8_t *packet_ptr;
uint8_t *uri_path_ptr;
uint8_t uri_path_len;
} sn_nsdl_transmit_s;

/* * * * * * * * * * * * * * * * * * * * * * */
Expand Down
30 changes: 10 additions & 20 deletions features/FEATURE_COMMON_PAL/mbed-coap/source/sn_coap_builder.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,21 +174,16 @@ uint16_t sn_coap_builder_calc_needed_packet_data_size_2(sn_coap_hdr_s *src_coap_
returned_byte_count += src_coap_msg_ptr->token_len;
}
/* URI PATH - Repeatable option. Length of one option is 0-255 */
/* Do not add uri-path for notification message.
* Uri-path is needed for cancelling observation with RESET message */
if (!src_coap_msg_ptr->options_list_ptr ||
(src_coap_msg_ptr->options_list_ptr &&
COAP_OBSERVE_NONE == src_coap_msg_ptr->options_list_ptr->observe)) {
if (src_coap_msg_ptr->uri_path_ptr != NULL) {
repeatable_option_size = sn_coap_builder_options_calc_option_size(src_coap_msg_ptr->uri_path_len,
src_coap_msg_ptr->uri_path_ptr, COAP_OPTION_URI_PATH);
if (repeatable_option_size) {
returned_byte_count += repeatable_option_size;
} else {
return 0;
}
if (src_coap_msg_ptr->uri_path_ptr != NULL) {
repeatable_option_size = sn_coap_builder_options_calc_option_size(src_coap_msg_ptr->uri_path_len,
src_coap_msg_ptr->uri_path_ptr, COAP_OPTION_URI_PATH);
if (repeatable_option_size) {
returned_byte_count += repeatable_option_size;
} else {
return 0;
}
}

uint16_t tempInt = 0;
/* CONTENT FORMAT - An integer option, up to 2 bytes */
if (src_coap_msg_ptr->content_format != COAP_CT_NONE) {
Expand Down Expand Up @@ -574,13 +569,8 @@ static int8_t sn_coap_builder_options_build(uint8_t **dst_packet_data_pptr, sn_c
&src_coap_msg_ptr->options_list_ptr->location_path_len, COAP_OPTION_LOCATION_PATH, &previous_option_number);
}
/* * * * Build Uri-Path option * * * */
/* Do not add uri-path for notification message.
* Uri-path is needed for cancelling observation with RESET message */
if (!src_coap_msg_ptr->options_list_ptr ||
(src_coap_msg_ptr->options_list_ptr &&
COAP_OBSERVE_NONE == src_coap_msg_ptr->options_list_ptr->observe))
sn_coap_builder_options_build_add_multiple_option(dst_packet_data_pptr, &src_coap_msg_ptr->uri_path_ptr,
&src_coap_msg_ptr->uri_path_len, COAP_OPTION_URI_PATH, &previous_option_number);
sn_coap_builder_options_build_add_multiple_option(dst_packet_data_pptr, &src_coap_msg_ptr->uri_path_ptr,
&src_coap_msg_ptr->uri_path_len, COAP_OPTION_URI_PATH, &previous_option_number);

/* * * * Build Content-Type option * * * */
if (src_coap_msg_ptr->content_format != COAP_CT_NONE) {
Expand Down
26 changes: 18 additions & 8 deletions features/FEATURE_COMMON_PAL/mbed-coap/source/sn_coap_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "mbed-coap/sn_coap_protocol.h"
#include "sn_coap_header_internal.h"
#include "sn_coap_protocol_internal.h"

/* * * * * * * * * * * * * * * * * * * * */
/* * * * LOCAL FUNCTION PROTOTYPES * * * */
/* * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -315,6 +314,7 @@ static int8_t sn_coap_parser_options_parse(struct coap_s *handle, uint8_t **pack
(*packet_data_pptr) += 2;
}

message_left = packet_len - (*packet_data_pptr - packet_data_start_ptr);

/* * * Parse option itself * * */
/* Some options are handled independently in own functions */
Expand Down Expand Up @@ -655,7 +655,7 @@ static int16_t sn_coap_parser_options_count_needed_memory_multiple_option(uint8_
uint16_t i = 1;

/* Loop all Uri-Query options */
while (i < packet_left_len) {
while (i <= packet_left_len) {
if (option == COAP_OPTION_LOCATION_PATH && option_number_len > 255) {
return -1;
}
Expand All @@ -677,14 +677,13 @@ static int16_t sn_coap_parser_options_count_needed_memory_multiple_option(uint8_

i += option_number_len;
ret_value += option_number_len + 1; /* + 1 is for separator */
if(ret_value >= packet_left_len)
break;

if(ret_value >= packet_left_len)
break;

if( i == packet_left_len )
if( i == packet_left_len ) {
break;
}
else if( i > packet_left_len ) {
return -1;
}

if ((*(packet_data_ptr + i) >> COAP_OPTIONS_OPTION_NUMBER_SHIFT) != 0) {
return (ret_value - 1); /* -1 because last Part path does not include separator */
Expand All @@ -693,9 +692,19 @@ static int16_t sn_coap_parser_options_count_needed_memory_multiple_option(uint8_
option_number_len = (*(packet_data_ptr + i) & 0x0F);

if (option_number_len == 13) {

if(i + 1 >= packet_left_len) {
return -1;
}

i++;
option_number_len = *(packet_data_ptr + i) + 13;
} else if (option_number_len == 14) {

if(i + 2 >= packet_left_len) {
return -1;
}

option_number_len = *(packet_data_ptr + i + 2);
option_number_len += (*(packet_data_ptr + i + 1) << 8) + 269;
i += 2;
Expand Down Expand Up @@ -750,3 +759,4 @@ static int8_t sn_coap_parser_payload_parse(uint16_t packet_data_len, uint8_t *pa
}
return 0;
}

Loading