Skip to content

Commit cd50818

Browse files
committed
[fix]解决 git action的错误,升级了 windows的默认arm-none-eabi-gcc版本
1 parent e7b8490 commit cd50818

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ jobs:
9696
- name: Install ARM GCC Toolchain
9797
shell: pwsh
9898
run: |
99-
# 下载并解压ARM GCC工具链
100-
$url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-win32.zip"
99+
# 下载并解压ARM GCC工具链(使用13.2版本以支持最新的ld脚本语法)
100+
$url = "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi.zip"
101101
$output = "gcc-arm-none-eabi.zip"
102102
Invoke-WebRequest -Uri $url -OutFile $output
103103
Expand-Archive -Path $output -DestinationPath "C:\gcc-arm"
104104
105105
# 添加到PATH
106-
$env:Path = "C:\gcc-arm\gcc-arm-none-eabi-10.3-2021.10\bin;" + $env:Path
107-
echo "C:\gcc-arm\gcc-arm-none-eabi-10.3-2021.10\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
106+
$env:Path = "C:\gcc-arm\arm-gnu-toolchain-13.2.Rel1-mingw-w64-i686-arm-none-eabi\bin;" + $env:Path
107+
echo "C:\gcc-arm\arm-gnu-toolchain-13.2.Rel1-mingw-w64-i686-arm-none-eabi\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
108108
109109
- name: Verify toolchain installation
110110
shell: pwsh

‎Test/shell_port.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
#if defined(__linux__) || defined(__APPLE__) || defined(WIN32)
21
// 解决 letter shell 的 ld 报错
2+
#if defined(__linux__) || defined(__APPLE__)
3+
34
unsigned long _shell_command_start = 0;
45
extern unsigned long _shell_command_end __attribute__((alias("_shell_command_start")));
56

7+
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
8+
int _shell_command_start;
9+
int _shell_command_end;
10+
611
#endif

0 commit comments

Comments
 (0)