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.

CCSv4 & MSP430F54xx family: Upper flash memory bank (bank 2) access problem

Other Parts Discussed in Thread: MSP430F5419, MSP430F5438

Hey all,

 

I've downloaded the core version (16K limited) of CCS v.4.0.1, and I cannot load and debug code in bank 2 of a MSP430F5419 device.  This sounds like a very fundamental flaw, having the debugger fail to access all the memory in the device, so I'm wondering if I'm missing something obvious...

To reproduce the problem: W/CCS v.4.0.1, modify lnkxxx.cmd file to allocate the .text section into flash memory starting @ 0x20000:

MEMORY
{
    SFR                     : origin = 0x0000, length = 0x0010
    PERIPHERALS_8BIT        : origin = 0x0010, length = 0x00F0
    PERIPHERALS_16BIT       : origin = 0x0100, length = 0x0100
    RAM                     : origin = 0x1C00, length = 0x4000
    INFOA                   : origin = 0x1980, length = 0x0080
    INFOB                   : origin = 0x1900, length = 0x0080
    INFOC                   : origin = 0x1880, length = 0x0080
    INFOD                   : origin = 0x1800, length = 0x0080
    FLASH0                  : origin = 0x05C00,length = 0x0A380
    FLASH1                  : origin = 0x10000,length = 0x10000
    FLASH2                  : origin = 0x20000,length = 0x05C00
    INT00                   : origin = 0xFF80, length = 0x0002
    INT01                  ....

SECTIONS
{
    .bss       : {} > RAM                /* GLOBAL & STATIC VARS              */
    .sysmem    : {} > RAM                /* DYNAMIC MEMORY ALLOCATION AREA    */
    .stack     : {} > RAM (HIGH)         /* SOFTWARE SYSTEM STACK             */

    .text      : {} > FLASH2             /* CODE                              */
    .text:_isr : {} > FLASH0             /* ISR CODE SPACE                    */
    .cinit     : {} > FLASH1             /* INITIALIZATION TABLES             */
    .const     : {} > FLASH1             /* CONSTANT DATA                     */
    .cio       : {} > RAM                /* C I/O BUFFER                      */

    .pinit     : {} > FLASH1             /* C++ CONSTRUCTOR TABLES            */

    .infoA     : {} > INFOA              /* MSP430 INFO FLASH MEMORY SEGMENTS */
    .infoB     : {} > INFOB
    .infoC     : {} > INFOC
    .infoD     : {} > INFOD

    .int00   : {} > INT00 ...

Initiating 'Debug Active Project' fails w/the following err message:

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

MSP430: File Loader: Data verification failed at address 0x00020000 Please verify target memory and memory map.
Error found during data verification. Ensure the linker command file matches the memory map.

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

 

Any insight would be appreciated.

 

regards,

gifford scott

DST

  • Hi,

    have a look at this post http://e2e.ti.com/forums/t/9296.aspx. Be shure to enable the --large_memory model.

    Rgds
    aBUGSworstnightmare 

  • BUGS,

     

    I appreciate the response.  However, I believe I have enabled all the documented gotchas for dealing with large code and large data under MSP430X.  I've enabled --large_memory_model and am using the rts430xl.lib for the msp430f5419 target.  The post you refer to appears to concern itself w/accessing the 0x10000 address range (bank 1) on the 5438.  I have no problem accessing bank 1 on the 5419 - it's bank 2 (0x20000+ addresses) that's the issue.  I'm waiting to see if this isn't an inherent problem with the msp430f54xx support files under version 4.0.1 of CCS - apparently a v. 4.0.2 release for CCS is coming out 'any day now'.

     

    regards.

    gifford scott

    DST

  • Still looking for fix to this issue... New release of CCS (v4.0.2) has same issue of not recognizing flash bank 2 on the msp430f5419.

  • Hi Gifford,

    I am looking into this issue, but I haven't been able to reproduce this error. I tried loading code to 0x20000 on a MSP430F5438, and did not get the verification error that you are experiencing; can you determine if the issue you are seeing isolated on the F5419 device?

    Note that I have suggested a solution to the error on reading memory above 0xFFFF on F54XX devices in another post, although it is unclear if this issue is related to the one you described above.

    http://e2e.ti.com/forums/p/12032/47140.aspx#47140

    If you are still experience this issue after trying the fix, can you provide additional detail for further analysis. For example, provide an example project that you are seeing the issue on, as well as the full command linker file you were using; and definitely comment on if this is an isolated issue on F5419 devices.

    Let me know if you have any questions. I look forward to hear back from you.

    Ricky.

  • Ricky,

    Still looking for fix to this issue...

    Wrt to further detail, I can provide again what I provided on the other post (http://community.ti.com/forums/t/12032.aspx):

    1) Load the 'msp430x5xx C Example' project into CCS V4.0 using the MSP430F5438 Experimenter Board with the '5438 replaced by the '5419.  If you run the project as is, the project will load, but you will see memory access errs in both the [0x10000 ... 0x1FFFF] (flash bank 1) and the [0x20000 ... 0x25BFF] (flash bank 2) memory range.  Loading your fix, mspx_fix.gel, resolves the memory window errs, but does not fix the disassembler window errs in the very top part of the flash bank 2 range, ~0x25BA0 and above.

    2) Modify the loaded 'msp430x5xx C Example' project under CCS V4.0, by editing the linker command file, lnk_msp430f5419.cmd:

    - Change the following lines in the MEMORY section:

    FLASH    : origin = 0x5C00, length = 0xA380

    FLASH2    : origin = 0x10000, length = 0x15C00

    replace with:

    FLASH0    : origin = 0x5C00, length = 0xA380

    FLASH1    : origin = 0x10000, length = 0x10000

    FLASH2    : origin = 0x20000, length = 0x05C00

    - Change the following line in the SECTIONS section:

    .text           : {} >> FLASH                   /* CODE                                        */

    replace with:

    .text           : {}  > FLASH2                   /* CODE                                        */

    All other code sections go into FLASH0.

    Let me know whether you have further questions.  As mentioned in my other post, I do not have '5438 devices on hand, but *please* tell me that you intend to test CCS V4.0 against the MSP430F5419, at some point!

    regards,

    gifford scott

    DST

  • Gifford,

    Thank you for your detailed information on the problem you are having. We have isolated a couple of the problems here.

    1. Memory View.

    It is nice to hear that the temporary fix is working for you. I am currently implementing the actual fix right now, and will be available in the next release (we are still determining the best way to roll out the fix).

    2. Disassembly View.

    This issue has been tracked down, and will be fix very soon. The fix will be available at the same time as the first issue.

    3. Program Load for MSP430F5438.

    Unfortunately, we do not have the specific board you are using in our Office at this time. But I would like to inform you that we have asked the MSP430 team to help us look into this.  We will continue to look into this issue and will update you when we have any progress on this.

     

    Let me know if you have any questions. Thanks again.

    Ricky

  • Gifford,

    Another quick update.

    The Memory View and Disassembly View issues you reported has been addressed, and will be available starting in the next CCS release.

    Both of these issues were visibility issues in the GUI, and should not prevent you from loading programs onto the board.

    Regarding the program load issue at address 0x20000, I just heard back from the MSP430 team and after testing it on the F5419, they were not able to reproduce the issue you are seeing. Here is a short description on the testing process:

    1. Used the F5419 on a standard FET board. Everything worked just fine
    2. I used the experimenter’s board, just like the customer. When I had the Power switch set to “FET” I could not connect to the device at all (No MSP430 found). However, when I was changing the power switch to “BATT” everything worked without any problems.

    Based on their testing, there are two possibilities I can think of.

    1. The test was done on a different emulator/version that yours.

    - Can you tell me which emulator you are using for connection? (Parallel or USB)

    - I think you mentioned you tried it on both CCS4.0.1 and CCS4.0.2. Is this correct? and were you getting the same verification error on both versions?

    2. The is a problem with the board you are using.

    - Do you happen to have another F5419 board available for testing?

    - you mentioned that program load works on the original command linker file. In that case, can you try using the original command linker file to load your program, but fill the FLASH2 section with something like 0xABCD, and see if you get a verification error. You can also check the data at address 0x20000 in the memory view after the program load to determine if the program load was successful at that address.

    For example: FLASH2: origin = 0x10000, length = 0x15C00, f=0xABCD // fill unused memory with 0xABCD

     

    Please also note that I will be getting a F5419 board in our office next week, so that I can continue to work with you to resolve this issue.

    Let me know if you have any additional questions.

    Thank you very much.

    Ricky

  •  

    Ricky,

    Sorry for the delay in replying.  I'm glad to hear that you will be receiving the '5419 part this week, because there are still some obvious issues in CCS V4.0 wrt to this part.  In answer to your questions:

    1. Development environment: I am using CCS V4.0 with the MSP-FET430UIF USB JTAG controller.  I see these errors on both the 4.0.1 & 4.0.2 & w/the new gel fix file.

    2. Testing on different boards: I see these errors with our target board and with the MSP-EXP430F5438 board, both using the '5419 part.  I do *not* think it's an issue with the boards.  I believe the issue lies in the CPUX architecture and the unreliable JTAG interface on the '5419.  I assume you are aware of the number of errata associated w/the '5419 part - if not, you should check the errata doc, as there are over 20 pages of errata for this part. 

    2. Using the fill option: Thanks for the great advice on using the 'fill' option in the linker file.  Using the fill option, I opened the 'msp430x5xx C Example' project and made the single modification of adding ', f=0xabcd' to the FLASH2 line of the memory map.  The result was the same error that I'm seeing in my other project - 'Error found during data verification' - and also in the same memory range - 0x20000 (flash bank 2). I've attached a screen shot of the error below. 

    At this point, I believe that you have all the info you need to address this issue.  It is reproducible on the TI experimenter board using the example msp430x5xx project provided w/CCS V4.0.  Please take the time to reproduce this issue with the '5419, using the example project and the 'fill' command.  I believe that there is a legitimate issue with the  MSP430F5419 under CCS V4.0, and I would like it fixed, but I don't have the time to continue to spoon feed these examples to your support team.

    regards,

    gifford scott

     

  • Gifford,

    Thank you very much for your input. It was very helpful for me in understanding the problem. Please accept my apology for asking you so many questions and conducting use cases.

    I was finally able to get the F5419 part in the office, and was able to reproduce the error you are encountering. It has been determined that this is a device specific bug, and we are currently looking into if this bug affects any more targets beyond the F5419 part. Let me assure you we are looking into the issue with high priority and a fix should be available in the next CCS release.

    In the mean time, I have attached a temporary fix (mspx_fix_F5419.zip), which contains the file mspx_fix_F5419.gel. This GEL file contains the previous fix for the Memory view, as well as a new fix for erasing the upper banks on a F5419 part. Please use the same instructions as before for using this GEL file (ie; modify the Advanced settings in the Target Configuration).


    Some notes on the fix:

    1. This fix was only meant to be used for the F5419 part.

    2. The fix will erase the memory at address 0x20000 to 0x25BFF before performing a program load. If you want to retain this part of the memory on the target when you are loading a program to other parts of memory, please switch out the GEL file first in the Target Configuration.

    3. The performance of the erase will be a little slower than a regular memory erase.

    I hope this fix will allow you to continue working on the device.

     

    Sorry again for the inconvenience this has caused. Let me know if you have any questions or comments.

    Thank you very much.

    Ricky

     

    P.S. I accidentally clicked on the "Suggest as Answer" button on your previous post. Please ignore.

    mspx_fix_F5419.zip
  • Ricky,

    Thank you very much for your efforts on this issue.  I apologize for allowing my frustration on this particular issue to show on my last posting.  Unfortunately, I could not think of a better way to draw attention to this issue.  Before I discuss your fix, could you please provide some more detail as to the actual device-specific bug?  I'd like to know the following details:

    1) Is this related to the JTAG errata w/the '5419?

    2) After attempting to erase/write [0x20000 ... 0x25BFF], the JTAG interface will frequently hang - requiring the power-cycling of *both* the '5419 part and the USB FET interface.  Can you identify the issue here, and perhaps a work-around?

    3) I do not have access to the '5419A part yet, but the local TI FAE will be coming to our site to discuss the '5419 & '5419A today (about 1:30 am, Bangalore(?) time).  Can you confirm whether the '5419A will have this same defect?

    Again, thanks for providing your fix.  For now, I have been using a work-around, in which I only attempt to program the flash bank 0 [0x05C00 ... 0x0FFFF] & bank 1 [0x10000 ... 0x1FFFF] via the USB FET, and allow the target code to self-program flash bank 2 [0x20000 ... 0x25BFF].  With regards to your fix, I have a couple questions:

    4) Do I need to reset the USB FET or CCS application when changing GEL files?

    5) When is the release date for the next CCS release that incorporates fixes for this issue?

    It still surprises me that you have not received more feedback on this particular issue, but, believe me, I am relieved that this defect has now been reproduced and confirmed by your development team.  Thank you again for your efforts.

    regards,

    gifford scott

  • Gifford,

    I am trying to get some answers for your questions from the MSP team, but I have not heard back from them at this point.

    As for the questions on the fix.

    4. You do not need to reset the USB FET or CCS when switching the GEL file. GEL files are related to the Target Configuration (.ccxml) file and therefore you can switch GEL files before launching the debugger or debugging active project.

    You can check which GEL file you are using for the current debug session by going to Tools->GEL Files in the Debug View.

    5. I don't know the official release date of the next release, since I am not responsible for the scheduling of releases; but I understand it should be release within a couple of months. I will try to find something more official for you if possible.

    I will update you on answers to Q1-3 as soon as I hear back from the MSP team. Let me know if you have any questions.

    Thanks.

    Ricky

  • Ricky,

    I've confirmed that your mspx_fix_F5419.zip file does appear to fix the issue for MSP430F5419.  Thanks very much for your support.

    regards,

    gifford scott

    DST