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.

MSP430FR59941: trying to debug using CCS: Getting error "MSP430: Trouble Writing Memory Block at 0x1000 on Page 0 of Length 0x354: Could not write device memory"

Part Number: MSP430FR59941

Hi, 

i am trying to debug my program but im getting this error.  

Fullscreen
1
2
3
MSP430: Trouble Writing Memory Block at 0x1000 on Page 0 of Length 0x354: Could not write device memory
MSP430: File Loader: Verification failed: Target failed to write 0x01000
MSP430: GEL: File: C:\sandbox\i4pd-Batteryless-EarDefender\EarDefender\Debug\amcu_EarDefender.out: Load failed.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

0x1000 is the BSL.  as far as i was concerned i dont want to overwrite the BSL, is it normally the case that the BSL is written every time you load your code?  

I have looked on the forums, only thing i could find was to tick the box saying "allow read/write/erase access to BSL memory", which i tried but didnt help.  

looked through the project properties but cant see anything else to try

Any ideas what to try?   

Thanks,

michael.

  • Hi Michael,

    To clarify exactly what you are asking--are you trying to write to BSL or not? This will change how the error is interpreted.

    Best,
    Amruta

  • Hi,

    No I'm not trying to write to BSL. 

    I am trying to debug / load an application. 

    Regards

    Michael 

  • Got it, it might be an issue with your linker file then. Can you send it?

    Best,
    Amruta 

  • thanks.  its just the default cmd file for the part, lnk_msp430fr59941.cmd.  Inserted below anyway: 

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /******************************************************************************
    *
    * Copyright (C) 2012 - 2021 Texas Instruments Incorporated - http://www.ti.com/
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    * Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the
    * distribution.
    *
    * Neither the name of Texas Instruments Incorporated nor the names of
    * its contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • 0x1000 is the BSL.  as far as i was concerned i dont want to overwrite the BSL

    Do you get any linker warnings of the form "creating output section "<SECTION_NAME>" without a SECTIONS specification"?

    Such a linker warning would mean the linker could be placing some sections in the BSL memory region in the cmd file.

    Also, does the linker map file show anything being placed in the BSL memory region?

  • I found the issue. I had a couple of functions that were using #pragma code_section to place in a specific memory location (in upper fram) but I had forgot to add this to the linker file.  Now working thanks for the help. 

**Attention** This is a public forum