-
Notifications
You must be signed in to change notification settings - Fork 3k
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
USTICKER still can not be removed from compilation #10139
Comments
I suggest you make the definition of The ARM linker forces programs to obey the C++ "One Definition Rule", so that default constructor referring to
An alternative workaround would be to eliminate the default constructor and instead declare the other constructor with |
Do you mean that in #if DEVICE_USTICKER
Timer::Timer(const ticker_data_t *data) : _running(), _start(), _time(), _ticker_data(data), _lock_deepsleep(true)
{
reset();
#if DEVICE_LPTICKER
_lock_deepsleep = (data != get_lp_ticker_data());
#endif
}
#endif // DEVICE_USTICKER and in #if DEVICE_USTICKER
TimerEvent::TimerEvent(const ticker_data_t *data) : event(), _ticker_data(data)
{
ticker_set_handler(_ticker_data, (&TimerEvent::irq));
}
#endif // DEVICE_USTICKER |
Nearly - it's the default constructors |
Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-1020 |
Yeah, I meant the default constructors |
@kjbracey-arm Timer default constructor is being called in the code, for example in mbed_poll.cpp, should we explicitely change all usages to the normal constructor? |
Well, you'd then be passing This seems like it's starting to unravel. Code like that Anyway, I think for now you should instead provide a dummy alternative That will work as long as no-one is using Alternatively you could provide a dummy |
OK, Adding an |
Opened #10155 to fix this issue |
@kjbracey-arm When building PR #10155, I encounter link failures in target ARCH_PRO which doesn't define USTICKER and gets undefined symbols for us_ticker_irq_handler: [DEBUG] Errors: BUILD/tests/ARCH_PRO/GCC_ARM/TESTS/mbed_hal/sleep/TESTS/mbed_hal/sleep/main.o: In function `sleep_usticker_test':
[DEBUG] Errors: /home/micsch01/miki_dev/mbed-os-example-blinky/mbed-os/./TESTS/mbed_hal/sleep/main.cpp:61: undefined reference to `set_us_ticker_irq_handler'
[DEBUG] Errors: /home/micsch01/miki_dev/mbed-os-example-blinky/mbed-os/./TESTS/mbed_hal/sleep/main.cpp:92: undefined reference to `set_us_ticker_irq_handler'
[DEBUG] Errors: BUILD/tests/ARCH_PRO/GCC_ARM/targets/TARGET_NXP/TARGET_LPC176X/us_ticker.o: In function `us_ticker_init':
[DEBUG] Errors: /home/micsch01/miki_dev/mbed-os-example-blinky/mbed-os/./targets/TARGET_NXP/TARGET_LPC176X/us_ticker.c:66: undefined reference to `us_ticker_irq_handler'
[DEBUG] Errors: collect2: error: ld returned 1 exit status |
Why does this target builds |
Seems like a possible error to me. Seems likely that target should have |
@ARMmbed/team-nxp Is it possible that target |
Arch Pro is a Seeed Studio platform, not managed by NXP. |
@ARMmbed/team-seeed . Can you help take a look at this question related to the ARCH_PRO |
Description
This is a follow-up issue for #9853 which was opened due to 9221 (comment).
After rebasing #9221 I get the following compilation error after moving
us_ticker_api.c
to the non-secure target and putting an#if DEVICE_USTICKER
inmbed_us_ticker_api.c
:@ARMmbed/mbed-os-psa @kjbracey-arm @jeromecoutant
Issue request type
The text was updated successfully, but these errors were encountered: