This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Short assembly code shows no errors but CCS says, "Can't find 1stAssemblyProgram.out"

Other Parts Discussed in Thread: MSP430G2553

Trying to get my first Assembly program to run on my MSP430G2xx Launch Pad.  The short program builds and debugs showing no errors. But when I try to run it, it says, "There are errors in 1stAssemblyProgram.  Do you want to cancel or proceed?"  Since I have no guidance on what errors exist, I hit "proceed".  Then I get the error message, "Cannot find 1stAssemblyProgram.out."  What's up?

  • Joseph Mitchener said:
    The short program builds and debugs showing no errors.

    Did you check the CCS build console (not Problems view) to ensure that there are no errors there?

    Which version of CCS are you using?

  •  AartiG - Thanks for the response. When I click "console" under the view tab, it says, "No consoles to display."  I will try to attach a screenshot from Cloud.  My version of CCS should be the latest.  I just downloaded it about a month ago. 

  • Can you go to the CCS Edit perspective (click on it at the top right part of CCS workbench), then keep the console view open and rebuild your project?
    The build output should appear in the console and you should be able to copy it off to a text file using the "Copy Build Log" icon shown below.

  • AartiG - Thanks for your reply. When I did check the build console it said, "Error in source. Stopped build."
    The only error it listed was that it felt " #11h" was undefined. Don't see why it has a problem with that.
    It had no problem with "#00AAh". What's up?
  • AartiG - Forgot to include the Build Error text you asked for. It is below.

    **** Build of configuration Debug for project 1stAssemblyProgram ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../main.asm'
    'Invoking: MSP430 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_15.12.1.LTS/bin/cl430" -vmsp --code_model=small --data_model=small --use_hw_mpy=none --include_path="C:/ti/ccsv6/ccs_base/msp430/include" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_15.12.1.LTS/include" --advice:power=all -g --define=__MSP430G2553__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal --preproc_with_compile --preproc_dependency="main.d" "../main.asm"
    1 Assembly Error, No Assembly Warnings

    >> Compilation failure
    subdir_rules.mk:7: recipe for target 'main.obj' failed
    "../main.asm", ERROR! at EOF: [E0300] The following symbols are undefined:
    llh

    Errors in Source - Assembler Aborted
    gmake: *** [main.obj] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****
  • AartiG - I noticed that in a different font the "#11h" looks like "#llh" . So I retyped the ll with 11. That got rid of that error. But it still would not build, this time because it not could not understand "RESET". The build console text is below.

    **** Build of configuration Debug for project 1stAssemblyProgram ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../main.asm'
    'Invoking: MSP430 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_15.12.1.LTS/bin/cl430" -vmsp --code_model=small --data_model=small --use_hw_mpy=none --include_path="C:/ti/ccsv6/ccs_base/msp430/include" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_15.12.1.LTS/include" --advice:power=all -g --define=__MSP430G2553__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal --preproc_with_compile --preproc_dependency="main.d" "../main.asm"
    'Finished building: ../main.asm'
    ' '
    'Building target: 1stAssemblyProgram.out'
    'Invoking: MSP430 Linker'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_15.12.1.LTS/bin/cl430" -vmsp --code_model=small --data_model=small --use_hw_mpy=none --advice:power=all -g --define=__MSP430G2553__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal -z -m"1stAssemblyProgram.map" --heap_size=0 --stack_size=0 -i"C:/ti/ccsv6/ccs_base/msp430/include" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_15.12.1.LTS/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_15.12.1.LTS/include" --reread_libs --display_error_number --warn_sections --diag_wrap=off --xml_link_info="1stAssemblyProgram_linkInfo.xml" --use_hw_mpy=none --entry_point=RESET -o "1stAssemblyProgram.out" "./main.obj" "../lnk_msp430g2553.cmd" -llibc.a
    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    RESET

    error #10234-D: unresolved symbols remain

    warning #10062-D: entry-point symbol "RESET" undefined
    >> Compilation failure
    makefile:140: recipe for target '1stAssemblyProgram.out' failed
    warning #10202-D: no suitable entry-point found; setting to 0
    error #10010: errors encountered during linking; "1stAssemblyProgram.out" not built
    gmake: *** [1stAssemblyProgram.out] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****
  • Joseph Mitchener said:
    But it still would not build, this time because it not could not understand "RESET"

    This error is coming from the linker (not compiler) and is saying that the symbol "RESET" is undefined. The link command is setting the entry point to be RESET (with the option --entry_point=RESET), however the linker is unable to find a definition for it. Is this symbol defined in your assembly file with a .global directive?

  • It is defined, but not with a global directive. I've copied the book's program below. I did my best to copy it precisely.

    ; Stack Pointer definition
    ;-------------------------------------------------------------------------------
    .global __STACK_END
    .sect .stack

    ;-------------------------------------------------------------------------------
    ; Interrupt Vectors
    ;-------------------------------------------------------------------------------
    .sect RESET_VECTOR
    .short RESET
    .end

    ************************************************************************

    Below is the Console View of the build. Again, when I try to "run anyway", it says "Could not open .out file".

    **** Build of configuration Debug for project 1stAssemblyProgram ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building target: 1stAssemblyProgram.out'
    'Invoking: MSP430 Linker'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_15.12.1.LTS/bin/cl430" -vmsp --code_model=small --data_model=small --use_hw_mpy=none --advice:power=all -g --define=__MSP430G2553__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal -z -m"1stAssemblyProgram.map" --heap_size=0 --stack_size=0 -i"C:/ti/ccsv6/ccs_base/msp430/include" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_15.12.1.LTS/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_15.12.1.LTS/include" --reread_libs --display_error_number --warn_sections --diag_wrap=off --xml_link_info="1stAssemblyProgram_linkInfo.xml" --use_hw_mpy=none --entry_point=RESET -o "1stAssemblyProgram.out" "./main.obj" "../lnk_msp430g2553.cmd" -llibc.a
    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    RESET

    error #10234-D: unresolved symbols remain

    warning #10062-D: entry-point symbol "RESET" undefined
    >> Compilation failure
    makefile:140: recipe for target '1stAssemblyProgram.out' failed
    warning #10202-D: no suitable entry-point found; setting to 0
    error #10010: errors encountered during linking; "1stAssemblyProgram.out" not built
    gmake: *** [1stAssemblyProgram.out] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****
  • Change the ".short RESET" to ".def RESET" or ".global RESET" (to make it known to the linker) and it should build. 

    Alternately, you could start with a assembly file template that already has RESET defined. When creating a new project in CCS, select the "Empty Assembly-only Project" template and that should add in a skeleton assembly file to start with.

    Hope this helps!

  • AartiG - Thanks for the tip. The reset problem seems to have disappeared when I put in a ".global RESET".
    However, it still has problems. After the build it says, "Nothing to be done for all." A key problem seems to be that, "No source available for Oxfff." Since I never used Oxfff . . . I don't see where I've fouled up. The last of the listing is shown below.
    ;---------------------------------------------------------------
    ; Main loop here
    ;---------------------------------------------------------------



    ;---------------------------------------------------------------
    ; Stack Pointer definition
    ;---------------------------------------------------------------
    .global __STACK_END
    .sect .stack

    ;---------------------------------------------------------------
    ; Interrupt Vectors
    ;---------------------------------------------------------------
    .sect RESET_VECTOR ; MSP430 RESET Vector
    .global RESET
    .end

    ****************************************************************

    **** Build of configuration Debug for project 1stAssemblyProgram

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    gmake: Nothing to be done for 'all'.

    **** Build Finished ****
  • Joseph Mitchener said:
    After the build it says, "Nothing to be done for all."

    If the project was already built successfully and no changes were since made to the code, then when you select "Build project" it will report that there is Nothing to be done. If you select "Rebuild project" it will rebuild it each time even if there were no changes since previous build.

    Joseph Mitchener said:
    A key problem seems to be that, "No source available for Oxfff."

    I'm not sure why you see this. If you have the linker entry point set to RESET then the program should be halted at RESET when the debugger is launched. 

    Taking a step back, I'm curious if there is a specific reason for you to be working with assembly only project.  The C development environment is very well supported and in fact, all code examples currently provided by TI are written in C, so it will be a lot easier and more straightforward to get started with those examples.  The CCS Training page has a fundamentals workshop for Getting started with CCS for MSP430 which you might find helpful:
    http://processors.wiki.ti.com/index.php/CCS_Fundamentals_Workshop#CCSv6

  • AartiG - I'm thinking you're right. Will abandon assembly effort and stick with C examples. Thanks for the Fundamentals link. Do not see the "Verify Answer" button. But you may say that you have solved my problem. Thanks for your time.