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.

TMS320F2812: Generating .bin file from .out file

Part Number: TMS320F2812
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE

Hello, Tarun Garg this side.

I am working on SCI-A Boot loader for TMS320F2812 DSP. I am following the steps mentioned in spraaq2 guide. But not able to generate .bin file using FileIOShell.exe application that comes along with Folder of SPRAAQ2. But I successfully generated .bin file using hex2bin utility in intel format for CKFA code.

I have Following queries in this matter:

1.For application code binary file generation : Can we not use hex2bin utility ? (just like we used for CKFA)

2. if we can use hex2bin utility then what should be format motorola or intel ?

3. Is there any shortcut or CCS feature by which we can generate .bin file from out file (without using .bat file method)

4. After setting up the serial terminal and sending .bin file of CKFA code, how to send appcode binary file ? or attach appcode binary file in the CKFA code ? please clear my understanding on - How CKFA .bin file will take .bin file of appcode via serial terminal?

 

  • Tarun,

    Did the hex2000.exe generate SCIB_Test.hex successfully?

    The app note seems to indicate that it should be "-I" following FileIOShell.exe, not "-i". I am not sure if it is case sensitive. Worth a try.

    To answer your questions:

    1. Not sure. 3.1.2 seems to indicate Motorola format for the app file. Appendix D seems to indicate so - that Intel formatted hex is used for the CKFA file conversion, and Motorola formatted hex for the App code file conversion.

    2. Intel , since hex2bin is Intel hex to bin converter. This is what the CFKA uses.

    3. Not sure, this seems to be the shortcut - it occurs post build. It can be included as a post-build step so it happens automatically. Not sure if that's what you're doing, or if you're doing it manually.

    4. This seems to be described in 3.4.4 of the app report spraaq2.

    Thanks,

    Sira

  • Hello Sira,

    1. Did the hex2000.exe generate SCIB_Test.hex successfully?

    Yes.

    2. The app note seems to indicate that it should be "-I" following FileIOShell.exe, not "-i". I am not sure if it is case sensitive. Worth a try.

    Results are same, no output. Binary file doesn't generate.

    Not sure, this seems to be the shortcut - it occurs post build. It can be included as a post-build step so it happens automatically. Not sure if that's what you're doing, or if you're doing it manually.

    I am doing by adding .bat file in post build steps.

    Apart from aforementioned queries, I need clarification on the following points such as

    1. C2000 is le - Little endian but motorola format convert .out file into hex with big endianness.

    2. When I power on the board to boot from SCI-A then I send 'a' to lock baud rate and receives '"a'' on terminal, then starts sending .bin CKFA file for F2812 using terminal - teraterm (local echo mode is OFF). But when files starts transmitting then I see all the bytes on the terminal as well as messages given inside the code, but Code doesn't stop or wait for my input as per report in following screnario:

    1. Type a to relock the baud rate

    2. y/n for Erase option 

    3. In addition to that it print both statements belonging to same if else condition, why ?

    Refer the below terminal screen shot: (Don't get confused with O-6, O-7, O-8 and so on..., I intentionally added in print statement (SCISend_Status() - function))

     

     

     

     

     

  • Tarun,

    First of all, this app note is extremely old and this software has not been touched for a long time, so please bear with us while we try to help you.

    So let me try to understand where you are at right now:

    - you are still not able to generate the Appcode.bin, correct?

    - But you are proceeding and trying to download the CKFA.bin to the target's RAM - and you are seeing some strange issues here as well (relating to how the command prompt behaves versus how it is documented)?

    - Are you able to successfully download the CKFA.bin to the the target's RAM?

    - After that, are you able to download Appcode.bin (maybe not generated by you, but a prebuilt .bin provided by TI) to the target's Flash?

    Thanks,

    Sira

  • Hello Sira,

    First of all, this app note is extremely old and this software has not been touched for a long time, so please bear with us while we try to help you

    Thanks for your Positive response. 

     you are still not able to generate the Appcode.bin, correct?

    I could not generate appcode.bin as per suggestion, but I tried to generate the .bin file using Hex2bin utility with intel format and making one small change in ROMS Directive statement rom width changed from 16  to 8. and also tried to send this same bin file over terminal but no result.

    But you are proceeding and trying to download the CKFA.bin to the target's RAM - and you are seeing some strange issues here as well (relating to how the command prompt behaves versus how it is documented)?

    Yes.

     

    - Are you able to successfully download the CKFA.bin to the the target's RAM?

    Probably yes, because terminal is echoing the characters which we are sending but can not say successfully as code doesn't wait for our input as I stated earlier such asking baud lock and erase options.

     After that, are you able to download Appcode.bin (maybe not generated by you, but a prebuilt .bin provided by TI) to the target's Flash?

    Yes, I also tried to do send  a prebuilt .bin provided by TI, but nothing changed.

     

     

  • Tarun, I'll review and reply later today.

  • Hello Sira,

    I thought, I should also share with you how I  prepared CKFA .bin file for my target processor - TMS320F2812.

    Here are the snippets from the CCSv7 for "CKFA_Duplicate" project so as to understand issue in more details.

     

     

     Can I not attach my project folder here so that you can open it up in your CCS and also check on the settings and configuration of CCS tool that may come into play as required or opposite to what is required?

    How and when does CKFA - Kernel starts its execution? I mean, at what point of time, CKFA starts executing itself ? 

    It's ROM loader code that echoes back the character on the terminal that it receives.So how to understand, when RAM loader code/CKFA gets the hold of CPU?

    As you can see in the above snippets : I received warnings regarding compatibility issue- will it affect the .bin file?

    Console displayed one message in the last "The system can find the path specified" then how did it generate .bin file?

    Is .bin file generated in this process not correct ? if it is correct one then the to whom the above message indicates?

    After sending .bin file of CKFA on terminal, do we need to press 'a' again to re-lock the baud-rate, just as we do in the very beginning before sending kernel?

    I tried that too, by sending a and terminal echoed back the same character.

    When I double click on FileIOShell.exe , I receive below message:

     

     Is there anything on hardware side that could be possibly not correct or suspicious? 

     

     

     

     

     

     

     

  • Tarun,

    Can I not attach my project folder here so that you can open it up in your CCS and also check on the settings and configuration of CCS tool that may come into play as required or opposite to what is required?

    You should be able to attach a zip file here.

    How and when does CKFA - Kernel starts its execution? I mean, at what point of time, CKFA starts executing itself ? 

    Once the CKFA is streamed into RAM by the SCI ROM bootloader, execution is transferred to the CKFA.

    It's ROM loader code that echoes back the character on the terminal that it receives.So how to understand, when RAM loader code/CKFA gets the hold of CPU?

    Maybe you can have a print statement. I have not seen the code, but I presume there is an entry point in the codestartbranch.asm, after which perhaps a C initialization routine is run, which then calls main() of the CKFA.

    As you can see in the above snippets : I received warnings regarding compatibility issue- will it affect the .bin file?

    I don't believe you need to worry about those. See here. 

    software-dl.ti.com/.../c2000_c28x-compiler-error-and-warning-messages.html

    Console displayed one message in the last "The system can find the path specified" then how did it generate .bin file?

    We would need to check at what point in the build process that message is generated. It is certainly something not to be ignored. Can you check the detailed build log.

    Is .bin file generated in this process not correct ? if it is correct one then the to whom the above message indicates?

    Same comment as above, we need to check. Let's also make sure we are using the same exact settings specified in the app note.

    After sending .bin file of CKFA on terminal, do we need to press 'a' again to re-lock the baud-rate, just as we do in the very beginning before sending kernel?

    Yes, this is what is indicated in Fig 18 and Fig 20 of the app note.

    Have you tried reducing the baud rate to check if the junk characters on the screen go away, and the behavior is consistent with what the app note describes (i.e. it waits for user input)?

    Also, do you absolutely need to use the F2812, or do you have flexibility to move to a more recent device? Our software and documentation for the newer tools is much more mature, robust, and up to date.

    Thanks,

    Sira

  • Hello Sira,

    Any update on how to generate .bin file for application code from motorola hex to binary ? other than FileIOShell ?

  • You should be able to attach a zip file here.

    Ok, I will but It will take time as I need permission from IT to do so.

    We would need to check at what point in the build process that message is generated. It is certainly something not to be ignored. Can you check the detailed build log.

    I don't know how to figure this out, as it is coming after generating .bin file. Can you check in the snippet attached earlier.

    Have you tried reducing the baud rate to check if the junk characters on the screen go away, and the behavior is consistent with what the app note describes (i.e. it waits for user input)?

    Change of baud rate doesn't make difference. It doesn't wait for input. May be we have not sent the correct app code binary. That's why I think mot2bin FileIOShell utility should work, which is at present not working. Don't know why?

     

    Also, do you absolutely need to use the F2812, or do you have flexibility to move to a more recent device? Our software and documentation for the newer tools is much more mature, robust, and up to date.

    Yes, we have to use F2812,  as it is in the field and hence can't migrate to new series as of now.

  • Tarun,

    I have asked a Subject Matter Expert for help on this issue.

    Meanwhile, I think we need to generate the CKFA file in the correct way (as described in the app note) to systematically track down the issues. If the build is generating warnings etc. we should start with a pre-built CKFA file and see if the behavior is consistent with what is described in the App note?

    Can you let me know about this i.e.

    1) Is there a pre-built CKFA file? (is this from ControlSUITE?)

    2) Have you tried it, and is the behavior the same i.e. it does not wait for user-input?

    Thanks,

    Sira

  • Tarun,

    What CCS version and Compiler version are you using?

    Is there a Compiler version mentioned in the app note?

    Maybe there is a difference in the Compiler's hex2bin between the one used by the App note and what you are using. This leads back to my suggestion above - trying to use a prebuild CKFA.bin from TI that works, assuming there is one.

    Thanks,

    Sira

  • Hello Sira,

     

    What CCS version and Compiler version are you using?

    Code Composer Studio Version: 7.0.0.00042

    Compiler Version: TI v16.9.1 LTS

     

    Is there a Compiler version mentioned in the app note?

    Yes, as per below snippet, it seems 3.1 Legacy project

    Maybe there is a difference in the Compiler's hex2bin between the one used by the App note and what you are using. This leads back to my suggestion above - trying to use a prebuild CKFA.bin from TI that works, assuming there is one.

    Does it mean, hex2bin utility will work correctly for 3.1 version compiler based project. If yes, then from where I can latest hex2bin utility for my CCS version and compiler version.

    When I import the CKFA project directly in CCS and then it doesn’t show build option for this project, hence I created new project from fresh and does the necessary changes as per CKFA application note and created cmd, out, hex and bin file. So, How can I create CKFA project with my CCS version and Compiler?

    Is hex2bin not an independent utility? as in how can compiler version have an effect on this utility?

  • Is there a pre-built CKFA file? (is this from ControlSUITE?)

    No. I downloaded all the stuff from this link:

    Project collateral and source code discussed in this application report can be downloaded from the following URL: http://www.ti.com/lit/zip/SPRAAQ2.

    In my system when CCS installed then it created following folder:

    2) Have you tried it, and is the behaviour the same i.e. it does not wait for user-input?

    I will try and get back to you on this, but I have one concern in doing so: For which processor CKFA prebuilt bin file made for F2812 or F2810, as per code, it seems F2810 and there is difference in memory map.

    Can we discuss all these issue on Anydesk application remotely?

                   

    “I tried sending pre-build CKFA.bin file. Yes, it waits for user input. But All print statement don’t come properly (not English readable). Then I send the appcode.bin (F2812 processor specific) but after Power on and changing the boot mode to “boot to Flash”, processor doesn’t reciprocate the behaviour as described. (i.e., GPIOs don’t toggle)”

  • Tarun,

    My apologies for the delayed reply. e2e email notification was down and I didn't have internet service all of yesterday. Please give me sometime to look over your latest updates and get back to you.

    Thanks,

    Sira

  • Tarun, sorry for the delay on this. Please give me a few days to look into this. I may need to get others' help as well.

  • Hello Sira,

    No issue, you take your time, but please come up with positive solution, otherwise it will put our project on risk. I hope you will understand. 

  • Tarun, I understand. Thanks for your patience.

  • Any Lead ? Did you find solution. Its been a week. I need to answer my boss for the same. I can't hold it longer. 

  • Tarun,

    A few questions and suggestions:

    1. The pre-built files in the zip file. Did you try with the pre-built F2812 AppCode.bin?

    –\spraaq2\Released Version\code\AppCode\128kW Hex file – AppCode_hex.map file reveals it is for F2812

    –\spraaq2\Released Version\code\AppCode\64kW Hex file – AppCode_hex.map file reveals it is for F2810

    –CKFA file – couldn’t tell which device it is for (you indicated it might be for F2810 based on the project file)

    2. I found this issue that may be related to the issue you are facing. Please take a look and see if it helps you.

    https://e2e.ti.com/support/microcontrollers/c2000/f/c2000-microcontrollers-forum/102500/spraaq2-flash-programming-through-sci-a

    3. What Hardware are you using for your tests? Is it custom hardware? Have you tried using a different board?

    4. Has this issue occurred before? Is this the first time you are encountering this issue? Have there been no previous firmware upgrades using this TI provided method?

    My resources to resolve this issue are very limited, given how old this software is. It pre-dates even ControlSUITE, which was then replaced by C2000Ware (this is what we currently support).

    Thanks,

    Sira

  • 1. Yes, I tried with Pre-built F2812 appcode.bin and pre-built CKFA binary file. but nothing happened as mentioned in the document, which says after programming - GPIO will toggle. but no GPIOs were toggling in my baord.

    2. This thread talks about - CPU failure, but this is not the case with me. Yes, it talks about FileIOshell that it doesn't work with MS DLLS. but doesn't talk how did he resolve this issue and made FileIOShell to work.

    3. It is custom hardware. No, I didn't tried using different board.

    4. No, this is first time, we are moving to boot-loader activity in our project.

  • Hello Sira,

    I just now checked with Pre-built F2810 appcode.bin and pre-built CKFA binary file. Flash programmed successfully and it is working (toggling GPIOs) as per document. But I have one doubt that my processor is F2812 and.bin is for F2810 then how did it run successfully ?

    Will this clue help us in further investigation of Root Cause ?

    What reasons or conditions are not meeting with Hex2bin and FileIOShell utility for converting my own CKFA code and my application code.

     

  • Tarun,

    Glad there has been some progress. I will check on how the prebuilt files for F2810 might work on F2812. I am guessing there is no conflict.

    As for the TI bootloader itself, this is software we are no longer supporting. My advise to you would be to use serial flash programming solutions available from our 3rd parties such as Codeskin and Elpotronic. https://www.elprotronic.com/collections/c2000 and https://www.codeskin.com/c2prog-faq

    Thanks,

    Sira