Skip to content

Enabling small C library option and deprecating uARM toolchain #12068

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 4 commits into from
Jan 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 18 additions & 0 deletions TESTS/configs/baremetal.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@
"target_overrides": {
"*": {
"mbed-trace.fea-ipv6": false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is that and why does it need to be set?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let rajkumar answer. But mbed-trace.fea-ipv6 should have been overridden for all targets.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"mbed-trace.fea-ipv6": false added to disable IPV6 tracing code in mbed_trace and we need mbed_trace due to dependency with the device key. More information on PR #11875

},
"K64F": {
"target.default_lib": "small"
},
"K66F": {
"target.default_lib": "small"
},
"NUCLEO_F303RE": {
"target.default_lib": "small"
},
"NUCLEO_F411RE": {
"target.default_lib": "small"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why target.default_lib is not set to small for all targets,
instead of adding a line for each 1...?

Copy link
Contributor Author

@rajkan01 rajkan01 Dec 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has only been set for targets that have been tested so far.

},
"NUCLEO_F429ZI": {
"target.default_lib": "small"
},
"DISCO_L475VG_IOT01A": {
"target.default_lib": "small"
}
}
}
6 changes: 6 additions & 0 deletions TESTS/mbed_drivers/c_strings/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ void test_case_c_string_x_X()
TEST_ASSERT_EQUAL_STRING("8000 C8E 3e7 64 1 0 1 1087 3e7 101B 7ff8 1869F", buffer);
}

#if !defined(__NEWLIB_NANO)
void test_case_c_string_f_f()
{
CLEAN_BUFFER;
Expand All @@ -74,6 +75,7 @@ void test_case_c_string_e_E()
sprintf(buffer, "%e %E %e %E %e %E %e %E %e %E %e", FLOATS);
TEST_ASSERT_EQUAL_STRING("2.000000e-03 9.243000E-01 1.591320e+01 7.917737E+02 6.208200e+03 2.571950E+04 4.268160e+05 6.429271E+06 4.246802e+07 2.120065E+08 6.579048e+03", buffer);
}
#endif

void test_case_c_string_strtok()
{
Expand Down Expand Up @@ -113,11 +115,15 @@ Case cases[] = {
Case("C strings: %i %d integer formatting", test_case_c_string_i_d, greentea_failure_handler),
Case("C strings: %u %d integer formatting", test_case_c_string_u_d, greentea_failure_handler),
Case("C strings: %x %E integer formatting", test_case_c_string_x_X, greentea_failure_handler),
#if !defined(__NEWLIB_NANO)
//In build tools, GCC with Newlib-nano linker option "-u _printf_float" is not configured
//to enable printf floating format. So disabling floating format test case.
Case("C strings: %f %f float formatting", test_case_c_string_f_f, greentea_failure_handler),
#ifndef MBED_MINIMAL_PRINTF
Case("C strings: %e %E float formatting", test_case_c_string_e_E, greentea_failure_handler),
Case("C strings: %g %g float formatting", test_case_c_string_g_g, greentea_failure_handler),
#endif
#endif
};

utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
Expand Down
Loading