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.

CCS/TMS320F280041: Flashing via Uniflash and JTAG gives a "memory map prevents reading @ 0x88000" error

Part Number: TMS320F280041
Other Parts Discussed in Thread: UNIFLASH, C2000WARE

Tool/software: Code Composer Studio

Hi guys,

I have a product using a F280041 now that we got some (first prototype was using a F280049 as a starter to be able to evaluate the new 28004x devices).

Using CCS 7.4 I can download and run my program successfully.

Using Uniflash (4.4.0 with --mode flash -e -f -v) I always get an error during verify-process with a msg like "memory map prevents reading @ 0x88000".

Having looked inside the gel-file used I think the memory specified there is not corresponding to the "real" mem-map (specified in the datasheet).

The gel-file assumes 2 Flash-Banks (0x00080000 size of 0x8000 + 0x00090000 size of 0x8000) where the device has 1 bank (0x00080000 size of 0x10000).

The gel-file used with ccs seems to be the same.

I adapted the gel-file so that programming via uniflash succeeds now without any error. But I get an ECC-error for the application code now running it after flashing. I'm wondering if this is because of my gel-file being not completely correct.

Would you kindly check for the correctness of the gel-file f280041.gel in matter of memor-map, especially for the flash-mem.

Thanks in advance,

Marco

  • Marco,

    I have assigned your post to Uniflash expert. They should get back with you within 2 business days.

    Regards,
    Manoj
  • Marco,

    Thank you for notifying us about the gel bug.  I checked and what you mentioned is correct.  I will notify it to the corresponding team and file a ticket to get it corrected.

    Regarding the ECC error: When you program the flash using UniFlash, did you disable AutoEccGeneration option (it is enabled by default)?  Please check.

    Thanks and regards,
    Vamsi

  • Vamsi,

    thanks for forwarding the issue with the gel-file.

    Regarding the ECC error I made some progress now with doing explicit ECC-generation within the linker and flashing the file with AutoEccGeneration turned off. I'm checking if this is a way for our application to handle the ECC-generation and if it works successfully.

    But:

    Uniflash does write the Ecc values automatically if not disabled via option (or maybe it is the controller itself that does the Ecc calculation and writing?) but to me it seems only for the mem regions really written to the controller. Our Bootloader does ECC-check for the complete flash region of the application and fails I think at a mem address not written via Uniflsah.

    If I flash the application a second time utilizing our own protocol and writing Ecc manually (as part of the bootloader flashing functions) I get Ecc-values for the "missing" mem region parts as well as doing explicit ECC-generation via Linker and utilizing the vfill-option.

    Is there a way to use Uniflash in a "vfill-like" way?

    Thanks and regards,

    Marco

  • Marco,

    When you use linker generated ECC, you should disable AutoEccGeneration.
    Linker generated ECC method is useful when you want to insert errors in ECC or main array (intentionally) OR when you want to include the ECC data as well in the executable image.

    If you don't need above mentioned features, you can simply use AutoEccGeneration option instead of linker generated ECC.

    When AutoEccGeneration option is used, ECC will be programmed only for the locations that have some content mapped in main array or OTP (ECC gets calculated and programmed for every 64-bit aligned memory, even if a single bit is programmed in a given 64-bits). ECC evaluation gets bypassed when all data and corresponding bits are in erased state - Hence, you should not get any ECC errors for the locations that are not programmed.

    I feel you are getting ECC errors for some other reason - may be you are programming data with out ECC when you program using your bootloader flashing functions - make sure you use Fapi_AutoEccGeneration programming mode when you call the program function.

    Also, please search for below two questions in the Flash API wiki (processors.wiki.ti.com/.../C2000_Flash_FAQ
    1. "When using Fapi_AutoEccGeneration mode, what is the minimum number of 16-bit words that can be programmed?"
    2. "Why do you use align directive (ALIGN(x)) in the linker cmd files provided in the C2000Ware examples?"


    Thanks and regards,
    Vamsi
  • Marco,

    Do you have any update?

    Thanks and regards,
    Vamsi
  • Vamsi,

    sorry to answer that late but I have 2 projects to work on concurrently with the 28041-project being the one with more time to finish and the other with higher prio so I won't be able to get the progress on the ECC topic I would like.

    Some more background infos from my error:

    The bootloader - not knowing anything from the application it can flash and start but the destination flash address and an address to check some versionsinfos - does check the ECCs for the complete application before reading out the version infos. It does so by calculating the ECC for read out flash and using Fapi_calculateEcc and comparing the result to an Ecc value from the Ecc-section.

    If flashed via JTAG utilizing Uniflash and AutoEccGeneration option that functions fails at the first flash address not programmed (the first hole in my memory map). If I flash the app utilizing the bootloader and redo the compare process once again it succeeds somehow. That led me to the thought it might occure cause of not doing something like vfill-option cause using the linker generated Ecc-section and flashing that via Uniflash not using AutoEccGeneration it works as well.

    What I did not use yet is the ALIGN(4) statement. I will have to check again to give you some more infos but that will again take some time, sorry for that.

    Thanks and regards

    Marco

  • Macro

    Thanks for the background. Using ALIGN(4) is very important.
    You may be passed this but if you're not aware, there is F28004x flash programming example in C2000Ware under /driverlib.
    Let us know once you've had time to investigate further.

    Best regards
    Chris
  • Hello

    As holidays are here in the US, if your issue isn't resolved, note that I will be out of the office starting today and won't be able to reply until Jan 2nd.

    Best regards
    Chris
  • Chris,

    in the meanwhile I had the chance to try an align(4) version. But that makes no difference for my problem.

    But I made another interesting discovery: Using CCS (V.8.3.0) and flashing the code using CCSs AutoEcc-generation I got ECCs different of what I should become I think. But only for 2 bytes within the first few words. And I can't find any reason for that.

    I build my project and flashed it via CCS with AutoEcc generation and build the project another time with linker generated ECC and split the Ecc-Section into separate file using the ROMS cmd.

    It starts with the following section (linked @ 0x82000):

    :020000040108F1
    :2004000058F8C967AFE436517720F8643FAA77C7DF37E0759B792FDFF87C60D9DB524AD4A3

    Do you have any idea why that could occur?

    Besides: Flashing the out-file that contains the linker generated ECCs does work for my bootloader to compare for the correct ECCs successfully but gives an error msg like:

    .ecc0: 0 of 64 at 0x1080000: 97%
    error: C28xx_CPU1: File Loader: Verification failed: Attempted to write past the
     end of memory at 0x1080000@Program
            Finished: 97%

    All read out via CCS:

    The disassembled code itself:

    The code-mem read out:

    The CC read out: the red marked bytes are different to the bytes within the separately generated ECC-File.

  • Marco,

    1.  
    If you want UniFlash to program ECC for the entire Flash image (including holes), you can use fill in your linker command file to fill the holes with 1s.  By doing this, UniFlash's AutoEccGeneration will calculate ECC for the entire Flash image assuming all 1s data for any unfilled locations.

    2.
    When you use linker generated ECC, you need to make sure you provide the vfill value as 1s, if not linker will assume the unfilled locations as 0s when calculating ECC.

    3.
    ECC generated from AutoEccGeneration option vs Linker should be same if the input 64-bit data and the address given are same for both methods.  However, you cannot compare ECC of un-programmed locations (left as erased) to that of locations for which you program ECC assuming all 1s data.  Please check if you are comparing ECC of unprogrammed locations with that of all 1s data.  

    4.
    Regarding the error "Attempted to write past the end of memory at 0x1080000@Program", compiler team made some changes recently to the Linker-generated ECC feature.  Not sure if there is any bug in it.  I am sorry to mention that we can not try that for you until mid-February.  

    However, for your situation, I don't think you need to use linker-generated ECC.  When loading Flash image via UniFlash, enable AutoEccGeneration and when programming Flash via your custom boot loader, use Fapi_AutoEccGeneration programming mode.  In the ECC correctness check that you are doing, make sure you check ECC only for the locations that you really programmed.  You can accomplish this by avoiding the ECC-check when all the 64-bits of data is 1s.

    Hope this helps.

    Please let me know if I misunderstood any of your requirements or findings.
    Also, note that the images that you shared are not visible for us.

    Thanks and regards,
    Vamsi


  • Vamsi,

    thank you for your quick and detailed response.

    1. I tried that and it works fine but I prefer 2.

    2. That works as well fine for me.

    3. You are absolutely correct, I wrongly compared 16bit words with Ecc values but it is only 8bits for each 64 bit of code. The "workarround" you suggested (make sure you check ECC only for the locations that you really programmed.  You can accomplish this by avoiding the ECC-check when all the 64-bits of data is 1s) works fine for me.

    4. For the error msg issued from uniflash ("Attempted to write past the end of memory at 0x1080000@Program") I will wait for the next releases, that does not prevent me from doing progress within my project.

    Once again thanks a lot for your help.

    Thanks and regards,

    Marco

  • Marco,

    Glad that it helped.

    I am closing this post.

    Thanks and regards,
    Vamsi