
Mac M1STC89C52RC安装工具# homebrew/bin/bash-c$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)# vscodebrewinstall--caskvisual-studio-code# Pythonbrewinstallpython3# USB转串口https://www.wch.cn/downloads/CH341SER_MAC_ZIP.html](https://www.wch.cn/downloads/CH341SER_MAC_ZIP.html# sdccbrewinstallsdcc sdcc-v# stcgalpip3installstcgalVSCode插件C/C Extension Packc_cpp_properties.json{configurations:[{name:SDCC 8051 Mac,intelliSenseMode:macos-clang-x64,compilerPath:/opt/homebrew/bin/sdcc,cStandard:c11,includePath:[${workspaceFolder}/**,/opt/homebrew/share/sdcc/include,/opt/homebrew/share/sdcc/include/mcs51],defines:[__SDCC,__MCS51__]}],version:4}sdcc头文件#includemcs51/8052.h编译烧录# 编译为 .ihx 文件sdcc main.c# sdcc -mmcs51 file1.c file2.c file3.c main.c# 查询串口 | 例/dev/tty.wchusbserial210ls/dev/tty.wch*# 烧录 | -P 指定芯片系列 -p 指定串口sudostcgal-Pstc89-p/dev/tty.wchusbserial210 main.ihx