If you use hex utility version 17.6.0.STS, then you are probably experiencing the bug described in this forum thread.
Otherwise, my best guess is that you have an initialized section on PAGE 1, and you shouldn't. Visit this article for background on memory pages. The hex utility only converts initialized sections, like .text and .data. Uninitialized sections, like the stack and .ebss, are ignored. Usually (bordering on always), a C2000 linker command file has initialized sections on PAGE 0, and uninitialized sections on PAGE 1. The hex utility always outputs data for PAGE 0 and PAGE 1 in different files. Usually, no output is needed for PAGE 1, and so only one file is output. If, for some reason, there are initialized sections on PAGE 0 and PAGE 1, then two files are output. If you have not specified a name for the second output file, then the hex utility automatically chooses an output file name and issues the warning diagnostic you show in your post.
Thanks and regards,
-George
https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/761417/compiler-tms320f28377s-warning-data-is-being-written-to-auto-generated-file
把带有初始化部分的地址段 定义在cmd的page0 就只生成一个hex了 |