Platform编译ESP32项目提示firmware.map这个文件丢失

问题:我在使用Platform 开发ESP32时,把工程文件和github的仓库绑定了,然后编译工程时报下面的错误。 

编译报错如下:

c:/users/86133/.platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: cannot open map file D:/eps32/
/Test_LVGL_WiFi_Timer_end/Test_LVGL_/.pio/build/esp32-s3-devkitc-1/firmware.map
: No such file or directory
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32-s3-devkitc-1\firmware.elf] Error 1

 

原因:在git仓库内的文件文件夹的名称必须要为英文且文件和文件夹的命名不能带空格。注意platform 是支持中文命名的,所在工程文件不与github仓库绑定可以正常编译。

解决办法:把工程文件路径下的所有文件夹名改为中文即可。注意命名不能带空格。如上在我的路径中 测试文件夹为中文,改成TEST然后再去即可编译成功。


其它问题请看: 问题专栏

 

  • 38
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
要在 PlatformIO 中使用 ESP32 和 CP2102 进行调试,需要进行以下步骤: 1. 确保你已经安装了 PlatformIO IDE,并且已经将 ESP32 开发板添加到了 PlatformIO 中。 2. 连接 ESP32 开发板和电脑,并将 CP2102 驱动程序安装到电脑中。 3. 在 PlatformIO 中创建一个新的项目,并将项目配置为 ESP32 开发板的设置。 4. 在 PlatformIO 中打开 "platformio.ini" 文件,将以下代码添加到文件末尾: ``` [env:esp32dev] platform = espressif32 board = esp32dev framework = arduino monitor_speed = 115200 debug_tool = esp-prog debug_init_break = tbreak setup upload_port = COM3 ``` 注意:upload_port 的值应该设置为你的 CP2102 的串口号。 5. 在 PlatformIO 中打开 "main.cpp" 文件,并添加以下代码: ``` void setup() { Serial.begin(115200); delay(1000); Serial.println("Debugging starts..."); // Your setup code here } void loop() { // Your loop code here } ``` 6. 在 PlatformIO 中打开 "launch.json" 文件,并添加以下代码: ``` { "version": "0.2.0", "configurations": [ { "type": "esp32", "request": "launch", "name": "ESP32 Debug", "program": "${workspaceFolder}/.pio/build/esp32dev/firmware.elf", "args": [], "cwd": "${workspaceFolder}", "preLaunchTask": "PlatformIO: Build (ESP32)", "initBreak": { "function": "setup" }, "serialPort": "COM3", "monitorSpeed": 115200 } ] } ``` 注意:serialPort 的值应该设置为你的 CP2102 的串口号。 7. 在 PlatformIO 中打开 "tasks.json" 文件,并添加以下代码: ``` { "version": "2.0.0", "tasks": [ { "type": "PlatformIO", "task": "Build", "group": { "kind": "build", "isDefault": true } } ] } ``` 8. 点击 PlatformIO 工具栏中的 "Build" 按钮,编译项目。 9. 点击 PlatformIO 工具栏中的 "Debug" 按钮,开始调试。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值