.\BUILD\LPC1114TEST.axf: Error: L6218E: Undefined symbol mbed::Ticker::attach_us(mbed::Callback<void()>, unsigned long long) (referred from .\build\main.o).
何か対応方法をご存知でしたらお教えください。
コードはこんな感じです。
DigitalOut IINT(P2_4);
Ticker flipper;
void flip() {
IINT = !IINT;
}
int main() {
flipper.attach(&flip, 0.001);
while(true)
Z:\lpc1114\mbed_Time_Test>mbed deploy
[mbed] Working path “Z:\lpc1114\mbed_Time_Test” (program)
[mbed] WARNING: Program “mbed_Time_Test” in “z:\lpc1114\mbed_Time_Test” does not use source control management.
To fix this you should use “mbed new .” in the root of your program.
[mbed] Updating library “mbed” to rev #65be27845400
[mbed] Updating the mbed 2.0 SDK tools…
z:\lpc1114\mbed_Time_Test>mbed export -m lpc1114 -i uvision5
[mbed] Working path “z:\lpc1114\mbed_Time_Test” (program)
Scan: mbed_Time_Test
Traceback (most recent call last):
File “z:\lpc1114\mbed_Time_Test.temp\tools\project.py”, line 424, in
main()
File “z:\lpc1114\mbed_Time_Test.temp\tools\project.py”, line 416, in main
ignore=options.ignore
File “Z:\lpc1114\mbed_Time_Test.temp\tools\project.py”, line 192, in export
ignore=ignore
File “Z:\lpc1114\mbed_Time_Test.temp\tools\export_init_.py”, line 285, in export_project
macros=macros)
File “z:\lpc1114\mbed_Time_Test.temp\tools\export_init_.py”, line 161, in generate_project_files
exporter.generate()
File “z:\lpc1114\mbed_Time_Test.temp\tools\export\uvision_init_.py”, line 248, in generate
FileType.LD_SCRIPT)[0]
IndexError: list index out of range
[mbed] ERROR: “c:\python27\python.exe” returned error.
Code: 1
Path: “z:\lpc1114\mbed_Time_Test”
Command: “c:\python27\python.exe -u z:\lpc1114\mbed_Time_Test.temp\tools\project.py -i uvision5 -m lpc1114 --profile debug --source .”
Tip: You could retry the last command with “-v” flag for verbose output
projectの作成方法のご教授ありがとうございます。
projectファイルはできましたが、
mbed\platform/mbed_power_mgmt.h(268): warning: #1461-D: function declared with “noreturn” does return
main.cpp: 1 warning, 0 errors
linking…
.\BUILD\mbed_Time_Test.axf: Error: L6218E: Undefined symbol mbed::Ticker::attach_us(mbed::Callback<void()>, unsigned long long) (referred from .\build\main.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 1 error messages.
“.\BUILD\mbed_Time_Test.axf” - 1 Error(s), 1 Warning(s).
Target not created.
とtimerでリンクエラーとなってしまいます。
#if 0
void attach_us(Callback<void()> func, us_timestamp_t t);
#else
void attach_us(Callback<void()> func, us_timestamp_t t)
{
core_util_critical_section_enter();
// lock only for the initial callback setup and this is not low power ticker
if (!_function && _lock_deepsleep) {
sleep_manager_lock_deep_sleep();
}
_function = func;
setup(t);
core_util_critical_section_exit();
}
#endif