Macos 如何在mac中运行.hex文件来测试atmega8板

Macos 如何在mac中运行.hex文件来测试atmega8板,macos,bootloader,atmega,Macos,Bootloader,Atmega,在windows中,我在AVRStudio中创建了一个新项目并编译了代码。然后给我一个.hex文件,在编译后可以在Bootloader.exe上运行。但在Mac中,它似乎不起作用。我编译了代码,然后得到了.hex文件。但是如何在Mac上测试它呢?我遵循了本网站上提到的以下步骤: 之后,我必须运行以下命令: bash$makeflash 但它说: =avrdude -p atmega8 -U flash:w:main.hex:i avrdude: no programmer has been

在windows中,我在AVRStudio中创建了一个新项目并编译了代码。然后给我一个.hex文件,在编译后可以在Bootloader.exe上运行。但在Mac中,它似乎不起作用。我编译了代码,然后得到了.hex文件。但是如何在Mac上测试它呢?我遵循了本网站上提到的以下步骤:

之后,我必须运行以下命令: bash$makeflash

但它说:

=avrdude  -p atmega8 -U flash:w:main.hex:i

avrdude: no programmer has been specified on the command line or the config file
     Specify a programmer using the -c option and try again

make: *** [flash] Error 1
如何修复它?请把我当作新手吧,我对编译引导加载程序之类的东西一无所知。用非常简单的步骤解释我。

最后一行(带avrdude…)应该在ATMega8(-p ATMega8)的闪存(闪存:)中写入main.hex文件(:w:),该文件使用英特尔格式(:i)写入。为了真正上传这个程序,你必须在微控制器和计算机之间使用一个编程器。另外,您必须使用-c选项告诉avrdude这个程序员是什么,后跟程序员的名字(要确切知道名字是什么,请输入“avrdude-c”,它将显示avrdude支持的所有程序员)。因此,如果你想上传,修改Makefile,搜索行“avrdude-patmeg8-U flash:w:main.hex:i”并添加“-c”。现在应该可以了

=avrdude  -p atmega8 -U flash:w:main.hex:i

avrdude: no programmer has been specified on the command line or the config file
     Specify a programmer using the -c option and try again

make: *** [flash] Error 1