diff --git a/core/configuration-store.lib b/core/configuration-store.lib index 8976289f1d..b06396c24f 100644 --- a/core/configuration-store.lib +++ b/core/configuration-store.lib @@ -1 +1 @@ -https://github.com/ARMmbed/configuration-store/#f0a4c07cce8c84513f528e5939c5a1469385d2a8 \ No newline at end of file +https://github.com/ARMmbed/configuration-store/#479cd1f033828d1577669d1f01eb56ce6f559cfd diff --git a/frameworks/utest/utest/shim.h b/frameworks/utest/utest/shim.h index 78a6f6048a..f9505d5f73 100644 --- a/frameworks/utest/utest/shim.h +++ b/frameworks/utest/utest/shim.h @@ -30,6 +30,8 @@ # ifndef __deprecated_message # if defined(__CC_ARM) # define __deprecated_message(msg) __attribute__((deprecated)) +# elif defined (__ICCARM__) +# define __deprecated_message(msg) # else # define __deprecated_message(msg) __attribute__((deprecated(msg))) # endif diff --git a/net/ESP8266Interface/ESP8266/ATParser/BufferedSerial/BufferedPrint.c b/net/ESP8266Interface/ESP8266/ATParser/BufferedSerial/BufferedPrint.c new file mode 100644 index 0000000000..8542c211a5 --- /dev/null +++ b/net/ESP8266Interface/ESP8266/ATParser/BufferedSerial/BufferedPrint.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2014-2015 ARM Limited. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +#include "mbed_error.h" + +size_t BufferedSerialThunk(void *buf_serial, const void *s, size_t length); + +int BufferedPrintfC(void *stream, int size, const char* format, va_list arg) +{ + int r; + char buffer[size]; + memset(buffer, 0, size); + r = vsprintf(buffer, format, arg); + // this may not hit the heap but should alert the user anyways + if(r > (int32_t) size) { + error("%s %d buffer overwrite (max_buf_size: %d exceeded: %d)!\r\n", __FILE__, __LINE__, size, r); + return 0; + } + if ( r > 0 ) { + BufferedSerialThunk(stream, buffer, r); + } + return r; +} diff --git a/net/ESP8266Interface/ESP8266/ATParser/BufferedSerial/BufferedSerial.cpp b/net/ESP8266Interface/ESP8266/ATParser/BufferedSerial/BufferedSerial.cpp index da3cbfa168..9010cd3907 100644 --- a/net/ESP8266Interface/ESP8266/ATParser/BufferedSerial/BufferedSerial.cpp +++ b/net/ESP8266Interface/ESP8266/ATParser/BufferedSerial/BufferedSerial.cpp @@ -23,6 +23,8 @@ #include "BufferedSerial.h" #include +extern "C" int BufferedPrintfC(void *stream, int size, const char* format, va_list arg); + BufferedSerial::BufferedSerial(PinName tx, PinName rx, uint32_t buf_size, uint32_t tx_multiple, const char* name) : RawSerial(tx, rx) , _rxbuf(buf_size), _txbuf((uint32_t)(tx_multiple*buf_size)) { @@ -79,26 +81,18 @@ int BufferedSerial::puts(const char *s) return 0; } +extern "C" size_t BufferedSerialThunk(void *buf_serial, const void *s, size_t length) +{ + BufferedSerial *buffered_serial = (BufferedSerial *)buf_serial; + return buffered_serial->write(s, length); +} + int BufferedSerial::printf(const char* format, ...) { - char buffer[this->_buf_size]; - memset(buffer,0,this->_buf_size); - int r = 0; - va_list arg; va_start(arg, format); - r = vsprintf(buffer, format, arg); - // this may not hit the heap but should alert the user anyways - if(r > (int32_t) this->_buf_size) { - error("%s %d buffer overwrite (max_buf_size: %d exceeded: %d)!\r\n", __FILE__, __LINE__,this->_buf_size,r); - va_end(arg); - return 0; - } + int r = BufferedPrintfC((void*)this, this->_buf_size, format, arg); va_end(arg); - if ( r > 0 ) { - r = BufferedSerial::write(buffer, r); - } - return r; } diff --git a/net/atmel-rf-driver.lib b/net/atmel-rf-driver.lib index 409b903ec1..bcd9d0c13c 100644 --- a/net/atmel-rf-driver.lib +++ b/net/atmel-rf-driver.lib @@ -1 +1 @@ -https://github.com/ARMmbed/atmel-rf-driver-mirror/#473759f1a37c1863cb2adfcb2a87ac3f1da144ed +https://github.com/ARMmbed/atmel-rf-driver-mirror/#1583e99e11640986f5c0de272a21bc9143b4a1a8 diff --git a/net/mbed-client.lib b/net/mbed-client.lib index aab5a6d72a..5cc200cae0 100644 --- a/net/mbed-client.lib +++ b/net/mbed-client.lib @@ -1 +1 @@ -https://github.com/ARMmbed/mbed-client-mirror/#6bfb6655b47f0ede4cc278c6c5f933ecefaf136d +https://github.com/ARMmbed/mbed-client-mirror/#0b66c1a11638949391c67775ec0b8a42e88a9dfe diff --git a/net/mbed-mesh-api.lib b/net/mbed-mesh-api.lib index 15ba5f511d..07c7e26a3b 100644 --- a/net/mbed-mesh-api.lib +++ b/net/mbed-mesh-api.lib @@ -1 +1 @@ -https://github.com/ARMmbed/mbed-mesh-api-mirror/#7312d7621c5c6b89f7c0476a2b103a9f1ea71c3c +https://github.com/ARMmbed/mbed-mesh-api-mirror/#8ceb56d87cd20d26d4db71aa42a2860cfaccaf9c diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index a27f1bb52e..bef166cbde 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -149,7 +149,7 @@ class IAR(mbedToolchain): cmd = [self.ld, "-o", output, "--skip_dynamic_initialization", "--map=%s" % map_file] + objects + libraries if mem_map: - args.extend(["--config", mem_map]) + cmd.extend(["--config", mem_map]) # Call cmdline hook cmd = self.hook.get_cmdline_linker(cmd)