cannot read system data from XML file

Recently, when using ccs for debug simulation, I don’t know why it keeps reporting errors, or occasionally the program can be downloaded normally. Some error cases are as follows:

One or more sections of your program falls into a memory region that is not writable.

Invalid Target Configuration file

There may be no access to debug at all:

Or after entering the debug interface, the buttons for starting simulation and pausing simulation are gray

But I don’t know where the problem is. I consulted Puzhong customer service and said that the file location may be abnormal, but I think that the program can be downloaded normally for a long time before. It should not be the location of the file location. Besides, the previous experience is , if there is a problem with the location, it will remind you that the header file cannot be found when compiling. Then the second method is to turn off the power of the development board, disconnect the downloader from the development board and the computer, then turn on the development board, see if the indicator light is flashing, then plug the downloader into the development board, and finally connect the downloader to the computer , I remember that at the beginning of this method, a project could be downloaded normally, but it still couldn’t work after a few times. This problem has been troubled for a long time. There are also some sayings on the Internet. For example, in the cmd file, some areas of the memory are not large enough. I have tried it and it still doesn’t work. The most important point is that this problem has been mentioned in my blog before. How to use the large array, If the memory allocation is unreasonable, it will not pass at compile time.

Today I rebuilt a project and imported the simplest water lamp program, and found that it can be downloaded normally after many attempts. Then I think that the project that could not be successfully downloaded before should not be a problem with the code itself. The failure to download must be a problem with the debug settings. Then I compare the debugs of the two projects. (The project that can be downloaded normally is called project 1, and the project that cannot be downloaded normally is called project 2)

————————————————– ————————————————– —————————–

First, we enter the debug page of the settings for comparison: click project, then click properties. Then click debug

The interface of Project 1 is as follows: You can see that there is an introduction of the emulator

But the project 2 interface is as follows: It is obvious that there is an error reported Invalid Target Configuration file (I checked a lot of information, and I didn’t know how to solve this problem at the time. I always thought that the device model of the new emulator xxcml is correct)

————————————————– ————————————————– —————————-

Then we then compare the debug settings: click run, click debug configurations, and compare them one by one

Project 1 interface is as follows:

Project 2 interface is as follows:

————————————————– ————————————————– —————————–

So you can see that it is a problem with the debug settings. You can open an interface that you can download normally before and change it, or compare it with my normal interface below to change it, and then start debugging:< /strong>

1. Delete redundant debug simulation

2. Change the target configuration to: ${target_config_active_default:Example24_DSP2833x_SCI_echoback}

${target_config_active_default: The following content is the project name, which is the name in the box above, you can copy it directly

3. Set program

4. Then click apply, click debug to start normal simulation.

ps: Let’s go back and look at the properties of the project at this time, and we can see that the debug page is correct

————————————————2023.5.24 new ————————————————– ———–

One or more sections of your program falls into a memory region that is not writable.

Regarding this error, I found that according to the above steps, it was still not completely successful. Finally, I suddenly wanted to make the array smaller and found that it could be downloaded. Let’s take a closer look at the error reported here. In fact, it means that some memory addresses failed to write. , that is, the written program occupies a large amount of memory space or data space, but in fact, no error is reported when compiling, but it may enter some memory addresses that cannot be written, so you can reintegrate the memory allocation, or expand the A little memory allocation, a little more redundant addresses.

It can be seen that the addresses are not continuously available:

We can take a look at the official address allocation below:

MEMORY
{
Page 0:
   /* BEGIN is used for the "boot to SARAM" bootloader mode */

   BEGIN : origin = 0x000000, length = 0x000002 /* Boot to M0 will go here */
   RAMM0: origin = 0x000050, length = 0x0003B0
   RAML0: origin = 0x008000, length = 0x001000
   RAML1: origin = 0x009000, length = 0x001000
   RAML2: origin = 0x00A000, length = 0x001000
   RAML3: origin = 0x00B000, length = 0x001000
   ZONE7A : origin = 0x200000, length = 0x00FC00 /* XINTF zone 7 - program space */
   CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
   CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
   ADC_CAL : origin = 0x380080, length = 0x000009
   RESET : origin = 0x3FFFC0, length = 0x000002
   IQTABLES: origin = 0x3FE000, length = 0x000b50
   IQTABLES2: origin = 0x3FEB50, length = 0x00008c
   FPUTABLES : origin = 0x3FEBDC, length = 0x0006A0
   BOOTROM: origin = 0x3FF27C, length = 0x000D44


Page 1:
   /* BOOT_RSVD is used by the boot ROM for stack. */
   /* This section is only reserved to keep the BOOT ROM from */
   /* corrupting this area during the debug process */

   BOOT_RSVD : origin = 0x000002, length = 0x00004E /* Part of M0, BOOT rom will use this for stack */
   RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
   RAML4: origin = 0x00C000, length = 0x001000
   RAML5: origin = 0x00D000, length = 0x001000
   RAML6: origin = 0x00E000, length = 0x001000
   RAML7: origin = 0x00F000, length = 0x001000
   ZONE7B : origin = 0x20FC00, length = 0x000400 /* XINTF zone 7 - data space */
}


SECTIONS
{
   /* Setup for "boot to SARAM" mode:
      The codestart section (found in DSP28_CodeStartBranch.asm)
      re-directs execution to the start of user code. */
   codestart : > BEGIN, PAGE = 0
   ramfuncs : > RAML0, PAGE = 0
   .text : > RAML1, PAGE = 0
   .cinit : > RAML0, PAGE = 0
   .pinit : > RAML0, PAGE = 0
   .switch : > RAML0, PAGE = 0

   .stack : > RAMM1, PAGE = 1
   .ebss : > RAML4, PAGE = 1
   .econst : > RAML5, PAGE = 1
   .esysmem : > RAMM1, PAGE = 1

   IQmath : > RAML1, PAGE = 0
   IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD

   /* Uncomment the section below if calling the IQNexp() or IQexp()
      functions from the IQMath.lib library in order to utilize the
      relevant IQ Math table in Boot ROM (This saves space and Boot ROM
      is 1 wait-state). If this section is not uncommented, IQmathTables2
      will be loaded into other memory (SARAM, Flash, etc.) and will take
      up space, but 0 wait-state is possible.
   */
   /*
   IQmathTables2 : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
   {

              IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)

   }
   */

   FPUmathTables : > FPUTABLES, PAGE = 0, TYPE = NOLOAD

   DMARAML4 : > RAML4, PAGE = 1
   DMARAML5 : > RAML5, PAGE = 1
   DMARAML6 : > RAML6, PAGE = 1
   DMARAML7 : > RAML7, PAGE = 1

   ZONE7DATA : > ZONE7B, PAGE = 1

   .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used */
   csm_rsvd : > CSM_RSVD PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
   csmpasswds : > CSM_PWL PAGE = 0, TYPE = DSECT /* not used for SARAM examples */

   /* Allocate ADC_cal function (pre-programmed by factory into TI reserved memory) */
   .adc_cal : load = ADC_CAL, PAGE = 0, TYPE = NOLOAD

}

In fact, the three blocks that we can really use are RAMM, RAML, and SARAM, so we can stitch their addresses together, as follows:

MEMORY
{
Page 0:
   /* BEGIN is used for the "boot to SARAM" bootloader mode */

   BEGIN : origin = 0x000000, length = 0x000002 /* Boot to M0 will go here */
   ZONE7A : origin = 0x200000, length = 0x00FC00 /* XINTF zone 7 - program space */
   CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
   CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
   ADC_CAL : origin = 0x380080, length = 0x000009
   RESET : origin = 0x3FFFC0, length = 0x000002
   IQTABLES: origin = 0x3FE000, length = 0x000b50
   IQTABLES2: origin = 0x3FEB50, length = 0x00008c
   FPUTABLES : origin = 0x3FEBDC, length = 0x0006A0
   BOOTROM: origin = 0x3FF27C, length = 0x000D44


Page 1:
   /* BOOT_RSVD is used by the boot ROM for stack. */
   /* This section is only reserved to keep the BOOT ROM from */
   /* corrupting this area during the debug process */

   BOOT_RSVD : origin = 0x000002, length = 0x00004E /* Part of M0, BOOT rom will use this for stack */


RAMM1 : origin = 0x000050, length = 0x0007B0
RAML4: origin = 0x008000, length = 0x008000
ZONE7B : origin = 0x20FC00, length = 0x002000
}


SECTIONS
{
   /* Setup for "boot to SARAM" mode:
      The codestart section (found in DSP28_CodeStartBranch.asm)
      re-directs execution to the start of user code. */
   codestart : > BEGIN, PAGE = 0
   ramfuncs : > RAMM1, PAGE = 1 //RAML0
   .text : > RAML4, PAGE = 1 //RAML1
   .cinit : > RAMM1, PAGE = 1 //RAML0
   .pinit : > RAMM1, PAGE = 1 //RAML0
   .switch : > RAMM1, PAGE = 1 //RAML0

   .stack : > RAMM1, PAGE = 1
   .ebss : > RAML4, PAGE = 1
   .econst : > RAMM1, PAGE = 1 //RAML5
   .esysmem : > RAMM1, PAGE = 1

   IQmath : > RAMM1, PAGE = 1 //RAML1
   IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD

   /* Uncomment the section below if calling the IQNexp() or IQexp()
      functions from the IQMath.lib library in order to utilize the
      relevant IQ Math table in Boot ROM (This saves space and Boot ROM
      is 1 wait-state). If this section is not uncommented, IQmathTables2
      will be loaded into other memory (SARAM, Flash, etc.) and will take
      up space, but 0 wait-state is possible.
   */
   /*
   IQmathTables2 : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
   {

              IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)

   }
   */

   FPUmathTables : > FPUTABLES, PAGE = 0, TYPE = NOLOAD

// DMARAML4 : > RAML4, PAGE = 1
// DMARAML5 : > RAML5, PAGE = 1
// DMARAML6 : > RAML6, PAGE = 1
// DMARAML7 : > RAML7, PAGE = 1

   ZONE7DATA : > ZONE7B, PAGE = 1

   .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used */
   csm_rsvd : > CSM_RSVD PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
   csmpasswds : > CSM_PWL PAGE = 0, TYPE = DSECT /* not used for SARAM examples */

   /* Allocate ADC_cal function (pre-programmed by factory into TI reserved memory) */
   .adc_cal : load = ADC_CAL, PAGE = 0, TYPE = NOLOAD

}
syntaxbug.com © 2021 All Rights Reserved.