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.

MSP-EXP432P4111: MSP-EXP432P4111: Attempting to run BSL from source build in CCS, having problems

Part Number: MSP-EXP432P4111

I'm finally (six months later) back on this problem, that is, loading the BSL as a program into INFO nonvolatile memory so as to be able to debug and possibly modify the BSL.

The BSL program now builds w/o errors but will not load.

The last response in the linked forum post for this  BSL project notes: "don't load it into workspace, as it use Absolute address."

I'm not sure how to do this, i.e. load the program into the launchpad without also loading it into the workspace.

When I do try to load via "norma"l steps, I get the error message: "Cortex_m4_0: flash programmer: verify error. Writing to Flash failed!"

I assume this is because I'm trying to write into INFO nonvolatile memory and it is likely write protected.

Any help?

note: the launchpad is 401r, and yes I know it is obsolete, we've just received our 4111 flight boards back from fab and we have to go with what we've got

  • If the link to the earlier thread isn't attached, here it is:

    e2e.ti.com/.../3972448

  • Hey Robert,

    When Eason was describing "absolute addressing" I believe he is discussing the software project is addressing dependencies using an relative addressing (which is why he was requiring it to be in the C:/ti folder.)    Anyway, if you have if building, then the project is probably finding all the correct dependencies.  

    It seems your issue now is during programming.  Can you program the launch pad with other projects?  Is it just this one that is failing to program?  

    I'm going to assign this thread back to Eason for now but just wanted to try and clarify while I was taking a look.  

    Thanks,

    JD

  • Hi Robert,

    Please double check:

    1. Whether you put the code at the address shown bellow.

    2. Whether you unselect the copy the project into workspace.

    Eason

  • going to do that today

  • to clarify, other projects load and run without issues, the BSL is different in that it uses INFO NVM instead of DATA NVM, was likely initially loaded at the factory, and doesn't get overwritten by CCS when loading/debugging projects into DATA NVM.

  • I get the same error following the instructions above.

    My guess is there is a hardware lockout on the INFO NVM memory space to prevent accidentally erasing the orignal/factory installed BSL.

  • Hi Robert,

    I would suggest you try to use no verify solution:

    If it doesn't help, please let me know.

    Eason

  • hi, just tried this, even though "no verify" was selected, ccs responded with the same error, "verify error. writing to flash failed!"

  • one more data point. I revisited the .cmd file used to link the code, and changed .intvecs

    from:

    .intvecs:   > BSL_INTVEC

    to:

    .intvecs:  > 0x00000000

    (info you gave me half a year ago, tried and forgot for the flash debug build, and I only re-remembered now)

    now, instead of getting the write to fiash failed error, I now get the indication that the xds110 probe is being held in reset.

  • Please try this, that can enable you erase the BSL memory.

    Remember that you may need to change the debug probe:

    At last you need to directly set the PC to debug the code:

  • hi,

       Just to clarify, I'm running CCS on a linux host., not a windows host.

       I set the options as described above, allowing the INFO memory to be written. CCS still returns "Verify error. Writing to Flash failed!"

       The register window is blank, no registers are shown, I cannot set the PC.

    bob s.

  • Sorry, I don't have linux to try it for you.

    It is hard to believe that you can't enable the CCS  to write the INFO memory in linux.

    Is it able for you to use Windows?

  • I don't have access to a windows box.

    What I am doing, as a hack, is using the upper 2 sectors of DATA NVM to load the BSL, and using a rewritten bootloader loading my app into the lower 12 sectors of DATA NVM (with 2 sectors spare for growth). I recoded the BSL to do a 12 sector erase instead of a mass erase, so the BSL won't erase itself. This works to reload the code consistently.

    So, my issue remains unresolved but for now, this isn't a problem for me moving forward.

    For future reference, for those who look at this thread archived:

    There are 2 issues with the original BSL that make it unreliable for me that I changed.

    1. if my loader restarts, the intial handshake by the loader is seen as a bad header by the BSL, I recoded that the re-handshake is ignored by the BSL.

    2. I'm using the UART but the BSL looks at both the UART and the SPI bus on startup and sometimes the SPI bus is taken to be active. When this happens, the BSL code runs away, I conditionally compiled away the SPI bus check and the BSL crashes stopped.

  • Thank you for your sharing.

    Sorry, I don't have PC with linux and can't do more test for you.