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.

MSP432P401R: how to troubleshoot slow debugger programming, set fixed memory flash range?

Part Number: MSP432P401R
Other Parts Discussed in Thread: MSP-FET

I have a CCS workspace that now has two (main) projects in it: a bootloader and an application project. Before splitting out a bootloader project, it was reasonably fast to debug the application project. That is, the time it took to build the code, prepare the debug probe, flash the code, and restart the CPU to wait at the `main()` breakpoint was maybe 10 seconds or less. But after I set up the application project so that it doesn't override the bootloader, it takes several minutes to prepare and flash its code.

This is with an MSP-FET probe. Specifically:

1. The bootloader project (linked from 0x00000 to 0x08000 of the Flash) still can be loaded/debugged quickly regardless of setting

2. The application project (linked from 0x08000 to 0x40000 of the Flash) takes several minutes, hanging Code Composer Studio at several points, when "Replace written memory locations, retain unwritten memory locations" is selected in the project's "Debug > MSP430 [sic] Flash Settings" menu.

3. The application project still only takes only a few seconds to load if I choose "Erase main memory only" instead, BUT that erases the bootloader range and prevents the app from running of course

What could cause this problem? Related, I would like to test with the option labelled "By Address Range (specify below)" which sounds promising BUT there is no "below" where I could "specify" the range (and choosing the option without being able to provide the range seems to erase the bootloader by default). 

  • Hi Nathan Vander Wilt, Thanks for your post!

    There are 2 banks on 256 KB Main Memory, Bank 0: 0-1FFFFh, Bank 1: 20000h-3FFFFh. I think the long program time is related with the application project covered 2 banks. Could you please set the application project start address 0x20000 and have the try?

  • Following up on this now that I've had a chance to test. Flashing my app starting at 0x00020000 instead of 0x00008000 does not seem to make an appreciable difference in programming times. Here's the numbers I'm seeing between pressing the "Debug" button (project source/dependencies already built in all cases) and the debugger showing paused at the breakpoint on main:

    Bootloader at 0x00000000: ~14 seconds (hangs after brief "configuring debugger", programming dialog barely seen before debugger pauses at main)

    App starting at 0x00008000: ~47 seconds (hangs without dialog after brief "configuring debugger,  .text: 0, 32752, 65504, …, and sometimes at "GEL expression: OnHalt()" before/during programming)

    App starting at 0x00020000: ~46 seconds (hangs at .text: 0, 32752, 65504, 98256 of 117792)

    Now if I set up my app with .intvecs at 0x00000000 (but otherwise allocated to a region at 0x00008000) so that "Erase main and information memory" can be used: it takes less than 10 seconds!

    So it takes about 5 times longer to flash the app with "Replace written memory locations, retain unwritten memory locations" than it does with "Erase main and information memory". This seems to be the case regardless of whether one or both flash banks are involved.

    Is there a way to use the "By Address Range" option to see if that is faster? There are no boxes for actually specifying the range, only a radio option that says "(specify below)" but no other related fields I see.