Skip to content

Commit ed4febe

Browse files
authored
Merge pull request #4209 from ARMmbed/release-candidate
Release candidate for mbed-os-5.4.4
2 parents 42be5c0 + 9ce6141 commit ed4febe

File tree

96 files changed

+1480
-418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1480
-418
lines changed

drivers/CAN.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CAN::CAN(PinName rd, PinName td) : _can(), _irq() {
2727
// No lock needed in constructor
2828

2929
for (int i = 0; i < sizeof _irq / sizeof _irq[0]; i++) {
30-
_irq[i].attach(donothing);
30+
_irq[i] = callback(donothing);
3131
}
3232

3333
can_init(&_can, rd, td);
@@ -104,10 +104,10 @@ int CAN::filter(unsigned int id, unsigned int mask, CANFormat format, int handle
104104
void CAN::attach(Callback<void()> func, IrqType type) {
105105
lock();
106106
if (func) {
107-
_irq[(CanIrqType)type].attach(func);
107+
_irq[(CanIrqType)type] = func;
108108
can_irq_set(&_can, (CanIrqType)type, 1);
109109
} else {
110-
_irq[(CanIrqType)type].attach(donothing);
110+
_irq[(CanIrqType)type] = callback(donothing);
111111
can_irq_set(&_can, (CanIrqType)type, 0);
112112
}
113113
unlock();

events/equeue/equeue_mbed.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ static void equeue_tick_init() {
4242
"The equeue_timer buffer must fit the class Timer");
4343
MBED_STATIC_ASSERT(sizeof(equeue_ticker) >= sizeof(Ticker),
4444
"The equeue_ticker buffer must fit the class Ticker");
45-
new (equeue_timer) Timer;
46-
new (equeue_ticker) Ticker;
45+
Timer *timer = new (equeue_timer) Timer;
46+
Ticker *ticker = new (equeue_ticker) Ticker;
4747

4848
equeue_minutes = 0;
49-
reinterpret_cast<Timer*>(equeue_timer)->start();
50-
reinterpret_cast<Ticker*>(equeue_ticker)
51-
->attach_us(equeue_tick_update, 1000 << 16);
49+
timer->start();
50+
ticker->attach_us(equeue_tick_update, 1000 << 16);
5251

5352
equeue_tick_inited = true;
5453
}

mbed.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
#ifndef MBED_H
1717
#define MBED_H
1818

19-
#define MBED_LIBRARY_VERSION 140
19+
#define MBED_LIBRARY_VERSION 141
2020

2121
#if MBED_CONF_RTOS_PRESENT
2222
// RTOS present, this is valid only for mbed OS 5
2323
#define MBED_MAJOR_VERSION 5
2424
#define MBED_MINOR_VERSION 4
25-
#define MBED_PATCH_VERSION 3
25+
#define MBED_PATCH_VERSION 4
2626

2727
#else
2828
// mbed 2

platform/mbed_board.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,28 +75,25 @@ void mbed_error_printf(const char* format, ...) {
7575

7676
void mbed_error_vfprintf(const char * format, va_list arg) {
7777
#if DEVICE_SERIAL
78-
79-
#if MBED_CONF_PLATFORM_STDIO_CONVERT_NEWLINES
80-
char stdio_out_prev;
81-
#endif
82-
78+
#define ERROR_BUF_SIZE (128)
8379
core_util_critical_section_enter();
84-
char buffer[128];
85-
int size = vsprintf(buffer, format, arg);
80+
char buffer[ERROR_BUF_SIZE];
81+
int size = vsnprintf(buffer, ERROR_BUF_SIZE, format, arg);
8682
if (size > 0) {
8783
if (!stdio_uart_inited) {
8884
serial_init(&stdio_uart, STDIO_UART_TX, STDIO_UART_RX);
8985
}
9086
#if MBED_CONF_PLATFORM_STDIO_CONVERT_NEWLINES
91-
for (unsigned int i = 0; i < size; i++) {
87+
char stdio_out_prev = '\0';
88+
for (int i = 0; i < size; i++) {
9289
if (buffer[i] == '\n' && stdio_out_prev != '\r') {
9390
serial_putc(&stdio_uart, '\r');
9491
}
9592
serial_putc(&stdio_uart, buffer[i]);
9693
stdio_out_prev = buffer[i];
9794
}
9895
#else
99-
for (unsigned int i = 0; i < size; i++) {
96+
for (int i = 0; i < size; i++) {
10097
serial_putc(&stdio_uart, buffer[i]);
10198
}
10299
#endif

platform/mbed_retarget.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ static void init_serial() {
120120
#endif
121121
}
122122

123+
#if MBED_CONF_FILESYSTEM_PRESENT
123124
static inline int openmode_to_posix(int openmode) {
124125
int posix = openmode;
125126
#ifdef __ARMCC_VERSION
@@ -154,6 +155,7 @@ static inline int openmode_to_posix(int openmode) {
154155
#endif
155156
return posix;
156157
}
158+
#endif
157159

158160
extern "C" WEAK void mbed_sdk_init(void);
159161
extern "C" WEAK void mbed_sdk_init(void) {

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F/device/TOOLCHAIN_ARM_STD/MK66FN2M0xxx18.sct

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@
4747
*/
4848
#define __ram_vector_table__ 1
4949

50-
/* Heap 1/4 of ram and stack 1/8 */
51-
#define __stack_size__ 0x8000
52-
#define __heap_size__ 0x10000
53-
5450
#if (defined(__ram_vector_table__))
5551
#define __ram_vector_table_size__ 0x00000400
5652
#else

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K82F/device/TOOLCHAIN_ARM_STD/MK82FN256xxx15.sct

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@
4949
*/
5050

5151
#define __ram_vector_table__ 1
52-
53-
/* Heap 1/4 of ram and stack 1/8 */
54-
#define __stack_size__ 0x8000
55-
#define __heap_size__ 0x10000
5652

5753
#if (defined(__ram_vector_table__))
5854
#define __ram_vector_table_size__ 0x000003C0

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KL27Z/device/TOOLCHAIN_ARM_STD/MKL27Z64xxx4.sct

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@
5050
*/
5151
#define __ram_vector_table__ 1
5252

53-
/* Heap 1/4 of ram and stack 1/8 */
54-
#define __stack_size__ 0x800
55-
#define __heap_size__ 0x1000
56-
5753
#if (defined(__ram_vector_table__))
5854
#define __ram_vector_table_size__ 0x00000200
5955
#else

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KL43Z/device/TOOLCHAIN_ARM_STD/MKL43Z256xxx4.sct

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@
4747
*/
4848
#define __ram_vector_table__ 1
4949

50-
/* Heap 1/4 of ram and stack 1/8 */
51-
#define __stack_size__ 0x1000
52-
#define __heap_size__ 0x2800
53-
5450
#if (defined(__ram_vector_table__))
5551
#define __ram_vector_table_size__ 0x00000200
5652
#else

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KL82Z/device/TOOLCHAIN_ARM_STD/MKL82Z128xxx7.sct

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@
5050
*/
5151
#define __ram_vector_table__ 1
5252

53-
/* Heap 1/4 of ram and stack 1/8 */
54-
#define __stack_size__ 0x3000
55-
#define __heap_size__ 0x6000
56-
5753
#if (defined(__ram_vector_table__))
5854
#define __ram_vector_table_size__ 0x00000140
5955
#else

0 commit comments

Comments
 (0)