We are using the FUSA and keil uVison IDE for the project and wanting to test the new Android Development Studio IDE.
But import didn't go as smoothly.Getting multiple 'Error: L6218E: Undefined symbol' errors.
Partial list:
Error: L6218E: Undefined symbol _setup_stack_from_initial_sp (referred from system_stm32wbxx.o).Error: L6218E: Undefined symbol __scatterload_rt2 (referred from system_stm32wbxx.o).Error: L6218E: Undefined symbol __cpp_initialize__aeabi_ (referred from system_stm32wbxx.o).Error: L6218E: Undefined symbol main (referred from system_stm32wbxx.o).
..
Have I missed something in the import procedure?
Hi "DS1"My name is Stephen and I work at Arm.It looks like the import didn't import your main() application code ("Undefined symbol main"). Then, if there is no main(), the standard C libraries won't be linked-in either ("Undefined symbol __scatterload_rt2").I suggest you first check that all your source code folders have been imported as expected, and then examine the link step to check that armlink will link-in any necessary libraries.We would need more information about your project to be able to investigate in more detail.Hope this helpsStephen
Hi Stephan,
Thanks for the quick response.
All the standard libraries are taken from the FUSA compiler.
The code that runs them:
void __main(void) { __ASM ("BL _setup_stack_from_initial_sp"); __ASM ("BL __scatterload_rt2"); __ASM ("BL __cpp_initialize__aeabi_"); __ASM ("BL main"); while(1); }
My includes from ARM DS are seen here:
I did verifiy they match the includes in the Keil uVision.
Hi again DS1I can reproduce the linker warnings you see with the code snippet you gave above, but only if I don't provide a main() function.Where is your main() function? Is it in some source code in the project, or maybe in a library?If it is some source code, then check that all your source code folders have been imported as expected.If it is in a library, then examine the link step to check that you've specified any necessary libraries.Also, please check the "ImportReport.txt" file. Does it warn of anything that it could not import?Do let us know how you get onStephen
Hi Stephan.
Trying to fix is step by step, thanks again for the patience.
ImportReport.txt says that it reverted to default compiler.instead using the FUSA compiler. How can I set DS to use FUSA compiler?
Source Location : C:\Projects\PNG\PNG_ManifestRepo\PNG_MCU_STM32WB55RGVX\TestFW_Fusa.uvprojx Target Name : TestFW_FuSa Arm Compiler version : Arm Compiler 6.6.4
Destination DS Workspace : xxx\Development Studio Workspace Project Name : TestFW_Fusa_TestFW_FuSa Location : xx\Development Studio Workspace\TestFW_Fusa_TestFW_FuSa Toolchain : Arm Compiler for Embedded 6 WARNING : Specified source Arm Compiler version is not found, default one is selected
To add the FuSa compiler into Arm DS, use Windows > Preferences > Arm DS > Toolchains.For more info, see developer.arm.com/.../Register-a-compiler-toolchainOnce the FuSa compiler is added, delete your project from the workspace and then re-import it afresh.If you'd rather not delete your project, you can re-configure your project to use the new compiler. Right-mouse click on the project select Properties > C/C++ Build > Tool Chain Editor. However, this can result in a loss of current compiler settings, so this is not recommended.Hope this helpsStephen