mirror of https://github.com/ARMmbed/mbed-os.git
Add support for calling a function before main()
Also added a test for this feature (MBED_A22). Fixes PRMBED-906.pull/23/head
parent
ad5516f898
commit
7b9081b59c
|
@ -203,6 +203,12 @@ TESTS = [
|
|||
"dependencies": [MBED_LIBRARIES, TEST_MBED_LIB],
|
||||
"peripherals": ["digital_loop"]
|
||||
},
|
||||
{
|
||||
"id": "MBED_A22", "description": "Call function before main (mbed_main)",
|
||||
"source_dir": join(TEST_DIR, "mbed", "call_before_main"),
|
||||
"dependencies": [MBED_LIBRARIES, TEST_MBED_LIB],
|
||||
"automated": True,
|
||||
},
|
||||
|
||||
# Size benchmarks
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ class GCC(mbedToolchain):
|
|||
self.cc = [join(tool_path, "arm-none-eabi-gcc"), "-std=gnu99"] + common_flags
|
||||
self.cppc =[join(tool_path, "arm-none-eabi-g++"), "-std=gnu++98"] + common_flags
|
||||
|
||||
self.ld = [join(tool_path, "arm-none-eabi-gcc"), "-Wl,--gc-sections"] + self.cpu
|
||||
self.ld = [join(tool_path, "arm-none-eabi-gcc"), "-Wl,--gc-sections", "-Wl,--wrap,main"] + self.cpu
|
||||
self.sys_libs = ["stdc++", "supc++", "m", "c", "gcc"]
|
||||
|
||||
self.ar = join(tool_path, "arm-none-eabi-ar")
|
||||
|
|
Loading…
Reference in New Issue