Skip to content

Commit a164658

Browse files
author
Arto Kinnunen
committed
Merge commit 'ba782a8fafdc8fd6a3d9301bd4f64e4f11616951' into nanostack_release_14_0_0_to_5_15
* commit 'ba782a8fafdc8fd6a3d9301bd4f64e4f11616951': Squashed 'features/frameworks/mbed-trace/' changes from b98f6a9050..425669d6b1
2 parents 694ff2f + ba782a8 commit a164658

File tree

4 files changed

+41
-9
lines changed

4 files changed

+41
-9
lines changed

features/frameworks/mbed-trace/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ The purpose of the library is to provide a light, simple and general tracing sol
5858

5959
### Enabling the tracing API in mbed OS 5
6060

61+
* Add the feature COMMON_PAL into the build
6162
* Set `MBED_CONF_MBED_TRACE_ENABLE` to 1 or true
6263

6364
To do so, add the following to your mbed_app.json:
@@ -66,6 +67,7 @@ To do so, add the following to your mbed_app.json:
6667
{
6768
"target_overrides": {
6869
"*": {
70+
"target.features_add": ["COMMON_PAL"],
6971
"mbed-trace.enable": 1
7072
}
7173
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// ----------------------------------------------------------------------------
2+
// Copyright 2015-2021 Pelion.
3+
//
4+
// SPDX-License-Identifier: Apache-2.0
5+
//
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
// ----------------------------------------------------------------------------
18+
19+
/**
20+
* \file ns_trace.h
21+
* Trace interface abstraction for NanoStack library as well as application.
22+
*
23+
* This file was moved to this library for legacy compatibility
24+
* Actual used trace library is mbed-trace. For usage details check mbed_trace.h.
25+
*
26+
*/
27+
#ifndef NS_TRACE_H_
28+
#define NS_TRACE_H_
29+
30+
#if defined(HAVE_DEBUG) && !defined(FEA_TRACE_SUPPORT)
31+
#define FEA_TRACE_SUPPORT
32+
#endif
33+
34+
#include "ns_types.h"
35+
#include "mbed-trace/mbed_trace.h"
36+
37+
#endif /* NS_TRACE_H_ */

features/frameworks/mbed-trace/mbed_lib.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@
1414
"fea-ipv6": {
1515
"help": "Used to globally disable ipv6 tracing features.",
1616
"value": null
17-
},
18-
"allocator": {
19-
"value": "malloc",
20-
"macro_name": "MEM_ALLOC"
21-
},
22-
"deallocator": {
23-
"value": "free",
24-
"macro_name": "MEM_FREE"
2517
}
2618

27-
}
19+
}
2820
}

features/frameworks/mbed-trace/source/mbed_trace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ void mbed_trace_free(void)
202202
m_trace.line_length = DEFAULT_TRACE_LINE_LENGTH;
203203
m_trace.tmp_data = 0;
204204
m_trace.tmp_data_length = DEFAULT_TRACE_TMP_LINE_LEN;
205+
m_trace.tmp_data_ptr = 0;
205206
m_trace.prefix_f = 0;
206207
m_trace.suffix_f = 0;
207208
m_trace.printf = mbed_trace_default_print;

0 commit comments

Comments
 (0)