PlatformIO可能的关键upload_flags和upload_command字符串选项

问题描述 投票:0回答:1

我使用STM32F429ZI和PlatformIO,例如,我需要将固件上传到特定地址,例如0x08020000。而且我在platformio的文档中找不到我可以使用的upload_flags密钥,或者如何修改它的upload_command。谢谢。

configuration platformio
1个回答
0
投票

正确的解决方案是使用以下命令将mbed_app.json添加到项目根目录:

{
    "target_overrides": {
        "*": {
        "target.mbed_app_start" : "0x08020000",
        "target.mbed_app_size" :  "0x000A0000"
        }
    }
}

https://os.mbed.com/docs/mbed-os/v5.15/reference/bootloader-configuration.html

此参数扩展为:

MEMORY
{
  FLASH (rx) : ORIGIN = 0x8020000, LENGTH = 0xa0000
...
}

在您的.ld脚本上,您无需更改upload_flags和upload_command。

© www.soinside.com 2019 - 2024. All rights reserved.