Skip to content

Commit

Permalink
Wrap us_ticker_init and ticker_util_wait
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepmistry committed Mar 16, 2022
1 parent 3a4a9dd commit d18f3a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions cores/arm/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,15 @@ extern "C" {

while (1);
}

void __wrap_us_ticker_init(void)
{
printf("__wrap_us_ticker_init\n");
}

void __wrap_us_ticker_util_wait(uint32_t us)
{
printf("__wrap_us_ticker_util_wait: %u\n", us);
vTaskDelay(us / 1000);
}
}
2 changes: 1 addition & 1 deletion platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ archive_file_path={build.path}/{archive_file}
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"

## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -mthumb -fdata-sections -fno-exceptions -ffunction-sections -funsigned-char -fomit-frame-pointer -g3 -mfpu=fpv5-sp-d16 -mfloat-abi=softfp -march=armv8-m.main -D__CORTEX_M55 -D__FPU_PRESENT=1U -D__SAUREGION_PRESENT=1U -D__MPU_PRESENT=1U -D__VTOR_PRESENT=1U -D__Vendor_SysTickConfig=0U -D__FPU_DP=1U -D__MVE_PRESENT=1U -D__MVE_FP=1U -D__NVIC_PRIO_BITS=3U -D__DSP_PRESENT=1U -specs=nosys.specs -Wl,--gc-sections -Wl,--wrap,main -Wl,--wrap,exit -Wl,--wrap,atexit -Wl,-n -T "{build.system.path}/build/_deps/mcu-driver-reference-platforms-for-arm-build/TARGET_AN547_MPS3/mdh-arm-an547-mps3-startup.link_script.ld" -o "{build.path}/{build.project_name}.elf" {object_files} "-L{build.system.path}/build" "-L{build.system.path}/build/lib/lwip" -Wl,--start-group -lm "{build.path}/{archive_file}" -larduino_corstone_system -llwip -Wl,--end-group
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -mthumb -fdata-sections -fno-exceptions -ffunction-sections -funsigned-char -fomit-frame-pointer -g3 -mfpu=fpv5-sp-d16 -mfloat-abi=softfp -march=armv8-m.main -D__CORTEX_M55 -D__FPU_PRESENT=1U -D__SAUREGION_PRESENT=1U -D__MPU_PRESENT=1U -D__VTOR_PRESENT=1U -D__Vendor_SysTickConfig=0U -D__FPU_DP=1U -D__MVE_PRESENT=1U -D__MVE_FP=1U -D__NVIC_PRIO_BITS=3U -D__DSP_PRESENT=1U -specs=nosys.specs -Wl,--gc-sections -Wl,--wrap,main -Wl,--wrap,exit -Wl,--wrap,atexit -Wl,-n -T "{build.system.path}/build/_deps/mcu-driver-reference-platforms-for-arm-build/TARGET_AN547_MPS3/mdh-arm-an547-mps3-startup.link_script.ld" -o "{build.path}/{build.project_name}.elf" {object_files} "-L{build.system.path}/build" "-L{build.system.path}/build/lib/lwip" -Wl,-wrap,us_ticker_util_wait -Wl,-wrap,us_ticker_init -Wl,--start-group -lm "{build.path}/{archive_file}" -larduino_corstone_system -llwip -Wl,--end-group

## Create output (bin file)
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
Expand Down

0 comments on commit d18f3a8

Please sign in to comment.