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.

[参考译文] TMS320F2812:在 dslite 上刷写图像

Guru**** 2390935 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1380265/tms320f2812-flashing-images-over-dslite

器件型号:TMS320F2812

工具与软件:

我使用以下命令成功擦除了整个闪存和闪存引导加载程序.out 文件。

    # Erasing the entire flash memory
    try:
        subprocess.run(
            [
                dslite_path,
                "--config",
                ccxml_path,
                "-a",
                "Erase",
            ],
            check=True,
        )
        messagebox.showinfo("Info", "Entire flash memory erased successfully!")
    except subprocess.CalledProcessError as e:
        messagebox.showerror("Error", f"Failed to erase flash memory: {e}")
        return
# Flashing the bootloader
    try:
        subprocess.run(
            [
                dslite_path,
                "--config",
                ccxml_path,
                "--flash",
                bootloader_path,
            ],
            check=True,
        )
        messagebox.showinfo("Info", "Bootloader flashed successfully!")
    except subprocess.CalledProcessError as e:
        messagebox.showerror("Error", f"Failed to flash bootloader: {e}")
        return

对于应用、我有一个.srec 格式的图像。
我可以在 uni-flash 中执行此操作。
但是、dslite 无法正常工作。

但是、当我像引导加载程序那样刷写 srec 文件时、
它擦除整个闪存、然后刷写 srec 文件。 我还尝试了-模式加载选项,但没有改变。
能不能在这个问题上为我提供帮助吗?



  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

        # Flashing the application srec file without erasing memory
        try:
            subprocess.run(
                [
                    dslite_path,
                    "--timeout",
                    "60",
                    "--config",
                    ccxml_path,
                    "--flash",
                    application_path,
                    "--load-settings",
                    load_settings_path,
                ],
                check=True,
            )
        except subprocess.CalledProcessError as e:
            messagebox.showerror("Error", f"Failed to flash application: {e}")
            return

    我设法刷写了存储器的特定部分。 您应进行包含闪存设置的设置、例如"Flash、Verify Only"(不要选择"Erase"选项)、然后取消点击"All Flash Regions"(所有闪存区域)、然后在"Standalone Command Line"(独立命令行)部分下、单击"Generate Package"(生成软件包)。
    它会生成 zip 文件、其中包括名为 generated.ufsettings 的文件中的设置。
    文件应具有如下设置:
    {"Blackhawk XDS560v2-USB System Trace Emulator/C28xx":{"FlashOperations":"Program, Verify","FlashSectorA":false,"FlashSectorB":false,"FlashSectorC":false,"FlashSectorD":false,"FlashSectorE":false,"FlashSectorF":false,"FlashSectorG":false,"FlashSectorH":false,"FlashSectorI":false,"FlashSectorJ":false}}
    只需将此文件的路径传递到我在上面分享的命令中即可。 (-- load-settings "settings_path")与命令的其他部分,就是这样。