[SOLVED] Ozone v3.26g - Error : Invalid startup completion point "main": symbol address could not be determined

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Ozone v3.26g - Error : Invalid startup completion point "main": symbol address could not be determined

    Hello,

    I got an error when I opened the.axf file in a new project:"Invalid startup completion point "main": symbol address could not be determined". May I ask what causes it?

    My current test environment:
    MCU:NXP RT1020(Cortex-M7)
    IDE:MDK-Arm v5.29
    C Compiler:Armcc
    Assembler:Armasm
    Linker:ArmLink
    Hex Converter:FormElf

    The console log is as follows:
    ..
    Help.About();
    File.NewProjectWizard();
    Project.SetDevice ("Cortex-M7");
    Project.SetHostIF ("USB", "");
    Project.SetTargetIF ("SWD");
    Project.SetTIFSpeed ("4 MHz");
    Project.AddSvdFile ("$(InstallDir)/Config/CPU/Cortex-M7.svd");
    File path resolved: "$(InstallDir)/Config/CPU/Cortex-M7.svd" was found at "D:/Program Files/Ozone/Config/CPU/Cortex-M7.svd"
    File.Open ("E:/Svn/FW_LIB_PLATFORM/FW_LIB_TEMPLATE/branches/BR-8-RT1020/Project/Objects/BR-8-RT1020.axf");
    File.Open: completed in 66 ms
    Program segments:
    Address Size Code RO Data RW Data ZI Data Flg
    --------- --------- --------- --------- --------- --------- ---
    60010000 2 200 1 160 1 024 16 0 RWE
    --------- --------- --------- --------- --------- --------- ---
    Total: 2 200 1 160 1 024 16 0
    --------- --------- --------- --------- --------- --------- ---
    For further information on ELF file data sections, execute command Elf.PrintSectionInfo(0).
    Invalid startup completion point "main": symbol address could not be determined.
    Debug.ReadIntoInstCache: updated instruction information within 1 code ranges (0x60010400-0x60010888)
    ..
  • Hello,

    Thank you for your inquiry.
    Well does your application have a main function?

    If yes, do you have any code optimization active that might remove debug data?
    Try to disable any code optimization and see if it works then.

    Should you still see this message could you provide your axf file for reproduction?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Nino,

    Your help is greatly appreciated!Your advice was helpful,but it didn't solve my problem completely.

    First of all,I'm sure I have function "main()".

    second,I'm not have code optimization active that might remove debug data.

    I try to describe what happens when I debug.

    Keil has a function that allows you to set load section and execution section by using scatter file(.sct).MCU RT1020 has a TCM memory .The TCM system memory is from address 0x0000_0000 to 0x0003_FFFF.And the FlexSPI(Connect to nor-flash) system memory is from address 0x6000_0000 to 0x7F7F_FFFF.

    So,my program load section is in FlexSPI(nor-flash),and the program(.ANY (+RO)) execution section is in TCM memory(The address starts at 0x0000_0000).Main.c is included in .ANY (+RO).Then,I got an error when I opened the.axf file in a new project:"Invalid startup completion point "main": symbol address could not be determined".

    But if I set program execution section in FlexSPI(The address starts at 0x6000_0000 ),I don't get this error.

    So I guess if Ozone has a bug:if program load section and execution section address are not the same,and the execution section(.ANY (+RO)) address is in 0x00000000 to 0x0FFFFFFF,then this error will occur.

    If program load section and execution section address are the same,then that error will not occur.For example, MCU STM32F103 program load section and execution section are both 0x0800000,this error will not occur.

    Attachments are operation flow and the .axf file.

    Best regards,
    Ryan
    Images
    • Snipaste_2022-07-19_18-44-29.png

      92.62 kB, 1,011×551, viewed 250 times
    • Snipaste_2022-07-19_16-49-46.png

      134.27 kB, 1,017×833, viewed 252 times
    • Snipaste_2022-07-19_18-26-22.png

      20.79 kB, 455×549, viewed 243 times
    • Snipaste_2022-07-19_18-27-19.png

      18.58 kB, 683×387, viewed 240 times
    • Snipaste_2022-07-19_18-37-35.png

      40.71 kB, 1,274×386, viewed 249 times
    • Snipaste_2022-07-19_18-42-26.png

      44.48 kB, 1,267×383, viewed 246 times
    Files

    The post was edited 5 times, last by Ryan ().

  • Hello,

    Thank you for providing more information about your setup.
    In this case Ozone behaves correctly.
    After Reset there is no Code in the TCM, per default Ozone will try to set a breakpoint at the startup completion point, which is usually main.
    But in your specific setup main is copied later to TCM after startup so there is no code after reset where Ozone could set a breakpoint. That is why you get the accurate error message.

    To avoid this you can try to change the startup completion point to be the end of your startup in Flash.
    You can change the setting under Tools->System Variables->Program execution point where memory init is complete
    There replace main with some other symbol that is in Flash and after the memory is initialized.

    Can you confirm that this is working?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Nino,

    I'm truly grateful for your help!

    I solved this error according to your suggestion,but it didn't completely solve my problem.I will try to describe what happens when I debug.

    I resolved this error by setting the function SystemInit() to "Program Execution Point where memory init is complete".The program SystemInit() runs in Flash.So,I can debug my program by Ozone.

    But I can't view my C source file in the code box while the program is executing in main(), and I can't break points in the C source file.I can view assembly code and break points in Disassembly box.

    main() runs in TCM memory.However,in Keil debug I can debug normally,such as break points in the C source file.

    My problem is somewhat similar to the problem in this post. Here is the path of the post:[SOLVED] Debugging IAR built code execution in RAM - stepping on C code impossible

    May I ask what causes it?

    Best regards,
    Ryan
    Images
    • Snipaste_2022-07-21_14-22-06.png

      119.73 kB, 1,919×1,001, viewed 250 times
    • Snipaste_2022-07-21_15-11-41.png

      166.34 kB, 1,920×1,001, viewed 250 times
  • Hello,

    The solution in the linked thread was to use Debug.ReadIntoInstCache on the RAM section after the RAM code is loaded.
    In that case there was information missing from the elf file that the section will be copied into RAM so Ozone has no way to know that there will be a copy to RAM later on.

    So it is possible that this is the same issue with your setup.
    We recommend to check the documentation of the linker you are using and see if you can add that debug information to your elf file so Ozone is able to match the source code to the application binary.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.