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.

how to generate .bin file for CCS v5.3

Other Parts Discussed in Thread: CCSTUDIO

hello sir,

i have try this part  "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd.exe" "${CG_TOOL_ROOT}/bin/armhex.exe" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe" in  post build steps ...
but i m not getting actual bin file that i really want for my application. i am getting output when i run it in the debug mode.. but when i load that bin file in the LM4F120H5QR controller . i cant get any output.

thanks in advance

-raghu

  • Generating the bin file is straightforward: For CCS V5.1 -- 5.3

    See here:

    http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/473/t/212263.aspx

    I had the info in a demo program I posted. It is alsdo in the course for the launchpad and other boards which talk about the compiler.

    // Build line for 5.x and greater compiler

    //"${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd" "${CG_TOOL_ROOT}/bin/armhex" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

    // Build command for < V5 compiler
    // "${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd470" "${CG_TOOL_ROOT}/bin/hex470" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

    Look at the project properties -- find the page where you enter the post build commands. (Third section down? Third tab in?)

    My development machine is in maintenance mode -- so can't recall exactly...

  • Yes I have loaded the BIN files through LMFlash -- and yes they do work.

    You are using LMFlash for this right?

  • Thanks for your quick response.

    Actually I've already used that command line which you've mentioned in your answer.

    In addition to that command line I've used some more command lines also which are as follow: (I've take them from some docs & forums of TI)

    ${CG_TOOL_ROOT}/bin/hex470  -i  -memwidth=32  -romwidth=32 ${BuildArtifactFileBaseName} & "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" .....


     "${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd470.exe" "${CG_TOOL_ROOT}/bin/hex470.exe" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"



    "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd470.exe" "${CG_TOOL_ROOT}/bin/hex470.exe" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"



    "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd470.exe" "${CG_TOOL_ROOT}/bin/hex470.exe" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"



    "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd470.exe" "${CG_TOOL_ROOT}/bin/hex470.exe" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"


    "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd.exe" "${CG_TOOL_ROOT}/bin/armhex.exe" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"


    "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd" "${CG_TOOL_ROOT}/bin/armhex" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

    out of these command lines last two command lines are working ! (other command lines didn't generate any .bin file :(  )

    I mean they both can generate the .bin file, but while I've load them on board they don't work.
    but the same program can be run successfully while debugging. (but not working using bin file)

    So can you tell me what actually the logic behind the text of these all command lines?

    If I get the meaning of that then I can evaluate what actually the problem is in my bin file or in my ccs v5.3

    Thanks in advance for your time.

  • The commands I gave work for me.

    Are you using LMFlash to load the BIN file? You have not answered that question.

    If you are using LMFlash -- attempt to use it with a binary that came with the demo files. For example try to reload the demo file that came with the board -- do not recompile the app. Does that work?

    Do you have the latest version of LMFlash?

  • yes sir i am using LMflash to load the BIN file..

    and i have already reload the demo file onto the stellaris launchpad and it work perfect..

    and i also hve the latest version of LMFlash 

  • Rahul:

    Possibly confirmed.

    Issue 1: Are you doing a release version vs a debug version? If so you will have to set the options again -- stack size etc.

    I created a release version of one of my projects -- and used LMFlash to load it -- it dd not work other than run through the "Setup" -- clearly visible on the UART output.

    I then (ahem) corrected all the stack sizes and other settings "appropriately" for a release version. ...still no go -- did not work.

    Issue 2: I then added some optimization -- it now worked -- but, now it overran the UART (Even as buffered) -- expand the buffer size -- still overruns after a slightly longer run time. (Yes I remembered to include the interrupt routines in Startup....ccs  -- but thank you for reminding me...)

    So a bit more fiddling and I had settings that worked in both debug and release -- except I still have buffer overrun... on the UART O/P -- using the VCP -- through the USB port. Expanding the buffer to 12K on Transmit does not fix it.

    In some cases I could create situations where the program would not even run through setup completely. There are many parameters in properties so I will not detail them all.

    So it appears that a program that runs in DEBUG mode may well not run in release mode -- even if all settings in "Properties" seem sensible.

    One of the issues may be that a release version "runs faster" -- that would seem plausible. So allowances must be made for this issue.

    Maybe somebody at TI can comment on things that might "go bump in the night" when switching from DEBUG to RELEASE.

  • Do any of the "Old Hands" have some thoughts on this one?

    What are we missing...???

  • Suggest you try the older compilers. Install them if you do not have them... Help -- Add Software.

    I will try the same today.

  • Hello Sir,

    Sorry for the long pause.

    I've tried all your suggestions. I've tried in Release as well in Debug mode- but have got no result.

    I've tried with 5.2 as well with 5.3, also tried by making variables for each file, like : "${tiobj2bin}" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}" "${armofd}" "${armhex}" "${mkhex4bin}"

    but still no result.

    Please help me by suggesting any other option.

    I have MDK-ARM also, but don't know how to set up all settings for getting bin file there.

    Any solution to create a file which, I can load on my board; will be great help to me.

    Thanks for your time.

  • This is what I am getting as error.

    I am getting  ".out" file. But not able to get ".bin" file !

    ".out" is generating/updating every time when I press Debug button but ".bin" is not generating !

    what should be the problem?

    The location of gmake.exe is "H:\Jigar\Library\Projects & Softwares\Softwares\Code Composer Studio V5.30\ccsv5\utils\bin\gmake.exe"

    I've tried by making a variable of GMAKE (for the file gmake.exe) and have used it ( ${GMAKE} ) in Builder as Build command. but getting zero result :(

  • Folders in which I've stored project files/workspace/installed ccs has a space in it's name like : "Projects & Software" & "Code Composer Studio V5.30" does it make any problem???

    Just get a doubt by observing my error and so I am asking.

  • Rahul:

    By Jove I think you have got it!

    Spaces and Ampersands? I think not...

    Change the names and you can move on to the next problem.

    You should always post the errors you are getting -- you can cut and paste -- you do not even need a screen capture.

    Then like I pointed out in a nearby thread you can look for "Volatile" tutorials if you need it to avoid other issues with optimized code for the release version.

  • Thank you for your reply sir.

    I've got it.

    The problem was   " "  !!!!   I mean I've not putted the location of make file in double quotation mark and so the problem was occurring while building the project.

    after that some other errors was also there but I've cleared them all one by one.

    Thank you once again, you've provide me your time which is really appreciable help from your side. 

    :)

  • Dave Robinson said:

    [...]Look at the project properties -- find the page where you enter the post build commands.

    Hi Dave,

    where to find these post build section in the projects properties?

    I didn't find it and therefore I've included the following part into the .cproject file (perhaps this is not the intended way to do this):

    postbuildStep="&quot;${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin&quot; &quot;${BuildArtifactFileName}&quot; &quot;${BuildArtifactFileBaseName}.bin&quot; &quot;${CG_TOOL_ROOT}/bin/armofd&quot; &quot;${CG_TOOL_ROOT}/bin/armhex&quot; &quot;${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin&quot;"

    This has to be done two times, one after

    parent="com.ti.ccstudio.buildDefinitions.TMS470.Debug"

    and a second one after

    parent="com.ti.ccstudio.buildDefinitions.TMS470.Release"

    This generates finally a .bin file that can be downloaded with LM Flash Programmer.

    The .bin file under Release is maybe corrupt. Up to now I could not find out why. (The samples in StellarisWare have also their .bin files only under Debug, perhaps for the same reason. Maybe it's an alignment or endianess problem that occures on higher optimization levels. I don't know.)

  • Assuming the latest compiler... 5.0x

    (Right Click on High lighted Project)

    Project Properties --> CCCS Build --> Steps (TAB) --> Post Build Steps

    Cut and paste the following in...

    "${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ARMofd" "${CG_TOOL_ROOT}/bin/ARMhex" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

    That should do it.

    If you need the older version (ofd470 etc) look for my ADC with interrupts post in the New Forum.

  • Dave,

    I am interested in using the LM Flash Programmer, but I am unable to create binary files for it to use.  I am working my way through the Stellaris Launchpad Workbook, and at the end of Lab2 there are similar instructions to yours on how to create binary files for the Flash Programmer.  I have followed your instructions exactly and also tried the instructions in the workbook, but no binary file shows up in either case.  I have looked in the CCS 5.3 Edit window under Debug, and also in the Lab2 folder (in css/debug).  I can see that CCS is working, as the rest of the files in the css/debug folder have a correct creation time.  For reference, I have also confirmed the LM Flash Programmer works correctly, but I'm pretty sure that's not the problem anyway, as I never get a binary file created.

    Can you help?

    Thanks,

    Jim

  • Hello guys,

    After weeks of tryings, oh well, I finally got the right .bin file to use with lm-flash programmer, that is I did to get it:

    Firstly i tried to use the post-step build command for <5.1 version of CSS in the code samples on the launchpad examples folder, the .bin file was generated. After to program it on my lanchpad, Heureka! it works! Then if the utilities is workin g the problem should be in project files (or miss of files).

    After modify various parameters and copy files between samples and my applications, i finally get a answer...I realized which the sample projects (all of them) come with the startup_css.c file in it folder...removing that, generating a .bin file and programming in launchpad, it stopped work...and when I rebuild with this file in the project folder it wors...well this could not be the right form but it worked with my all workbench applications...(about 12 applications where 1 is a software defined radio signal processing).


    Then, guys, try to just copy the file startup_ccs.c contained in any sample code project folder, then paste in your application project folder then rebuild you project. Dont forgot to put this command line on post-build-step (in properties ->build->step)

    "${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd" "${CG_TOOL_ROOT}/bin/armhex" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

    I hope to help all you.


    Regards.


    Felipe Neves