What’s Needed:
In this tutorial, we'll show you how to use Arduino to install the micronucleus bootloader, which has V-USB, onto an ATtiny84.These steps will work for other ATtiny chips, but you'll need to change things like the pinsarduino.h file and target parameters in avrdude. TOOLWIN/LIN/MAC MiUnlockTool - Unlock bootloader of xiaomi devices on mac & linux Ciao xda users, I'm here to introduce a new tool of mine, MiUnlockTool. MiUnlockTool is an unofficial tool used to unlock bootloader on Xiaomi devices. This tool is copied from the original windows MiFlashUnlock tool and works the same way. What is Clover Configurator for Mac Clover Configurator designed to help you create custom configuration files for the Clover EFI bootloader via a streamlined graphical interface. Upon launch, Clover Configurator will check to see if there are already available configuration files, and enables you to view their content.
In this tutorial we will be creating the bootloader that will allow you to run the macOS installer that will also be created in this guide onto your to-be Hackintosh. This will be created using a flash drive that needs to be 8GB or larger in size so that it has enough space ton hold the Sierra or El Capitan installer files.
You’ll need to be running macOS in order to complete this guide. If you do not have a mac available for use, you can learn how to create a virtual machine on your computer before following this guide:
Mac OS Installer retail Version of Yosemite, El Capitan or Mac OS Sierra, choose one you desire to make the bootable USB. To get Mac OS X InstallerApps you can ask help from a friend who has “real Macintosh” to download it from the App Store. Or alternatively, you can download it through torrent. However, if the appropriate USB Drivers aren’t installed on your PC, the connection stands futile. In this regard, you will have to install the OEM-specific USB drivers on your PC or Mac. However, finding the right drivers is no easy task. In this guide, we have shared the USB Drivers for all the Android OEMs.
STEP 1: Creating the macOS Installer
The first step to making a hackintosh is transferring the macOS install files to a USB flash drive to do that follow the guide: How to make a macOS flash drive installer
STEP 2: Setting up the EFI Boot Partition
- DownloadClover EFI Bootloader
- Unzip & Open Clover folder
- Right-click & Open Clover EFI Bootloader (Note: Unsigned Apps like Clover must be right-click opened to avoid security warning)
- Click Continue
- Click Continue again
- Click Change Install Location…
- Select your Flash Drive under destination
- Click Continue
- Click Customize
- Check the following boxes:
- Click Install
- Enter Password and click Install Software
- Click Close
- Click Keep if it prompts
Next Step
Now that you have created a USB Installer you will need to make it bootable on your PC.
If you are following one of our custom guides return to that guide for custom boot steps.
Otherwise follow our general guild on How-to Make Your Hackintosh Installer Bootable
Introduction
In this tutorial, we'll show you how to use Arduino to install the micronucleus bootloader, which has V-USB, onto an ATtiny84. These steps will work for other ATtiny chips, but you'll need to change things like the pins_arduino.h file and target parameters in avrdude.
By following this guide, you will be able to upload Arduino sketches directly to the ATtiny84 over USB without needing to use a programming device (such as another Arduino or FTDI chip).
The Atmel AVR ATtiny84 is very similar to the ATtiny85 but with a few more I/O pins (six more, to be exact). If you like working with very small, inexpensive microcontrollers, the ATtiny84 and lower-power ATtiny84A are good options. Either the ATtiny84 or ATtiny84A will work for this tutorial.
AVR 14 Pin 20MHz 8K 12A/D - ATtiny84
COM-11232In this tutorial, we'll show you how to:
- Load Arduino ISP (In-System Programmer) on an Arduino
- Install the micronucleus bootloader on the ATtiny84
- Manually change fuses in the ATtiny84 to allow USB programming
- Create a new board definition in Arduino for the ATtiny84
- Install any necessary USB drivers
- Upload example firmware from Arduino IDE to the ATtiny84
The ATtiny microcontrollers are fantastic little chips but often suffer from low programming space. The ATtiny84 and 85 have 8k of flash memory (compared to 32k in the ATmega328p, the most commonly found microcontroller on Arduino platforms). A bootloader like micronucleus allows us to upload firmware to the microcontroller over a 'virtual' USB (V-USB) connection rather than using a separate microcontroller for programming. The downside is that micronucleus uses 2k of the available flash, leaving us with only 6k of flash for our program!
However, using a bootloader potentially reduces the production cost of a custom Arduino board if you don't want to rely on separate hardware for programming.
Parts List
To follow along, you will need these parts:
You Will Also Need
- 2x 68Ω Resistors
- 1x 1.5 kΩ Resistor
Resistors
Suggested Reading
Before moving along, we recommend you have familiarity with the following concepts.
Load Arduino ISP
To get started, we'll need to use another Arduino as an In-System Programmer (ISP) to send firmware to the target device (our ATtiny84). We'll only need to do this once in order to upload the micronucleus bootloader.
Hardware Connections
To start, make the following connections:
Upload ArduinoISP Sketch
Download the latest Arduino IDE.
Connect an FTDI breakout to the Arduino Pro Mini. In Arduino, select File > Examples > ArduinoISP > ArduinoISP. Select your Arduino board in Tools:
- Board: Arduino Pro or Pro Mini
- Processor: ATmega328 (3.3V, 8MHz)
- Port:
Click upload to burn the Arduino ISP firmware to the Arduino Pro Mini.
Install Micronucleus
Micronucleus is a bootloader created for ATtiny microcontrollers. It has V-USB built in so that we can send compiled firmware over a virtual USB connection.
When we say 'virtual USB,' we're actually mimicking low-speed USB with GPIO pins on the ATtiny, since there is no actual USB hardware on the ATtiny84. Essentially, the V-USB library bit-bangs the differential pair signaling of USB communications to make the USB host on our computer think we're transferring information using the USB protocol.
Hardware Setup
Add a 10μF capacitor between the RESET and GND pins of the Arduino. Watch the polarity! The capacitor will prevent the Arduino from entering bootloader mode so that it will pass the compiled firmware to the connected ATtiny rather than trying to program itself.
Upload Micronucleus to the ATtiny84
Head to the micronucleus GitHub repository to clone the bootloader or download the zip here.
Unzip the folder.
The Arduino IDE comes with a tool called AVRDUDE, which is a piece of software that can be used to download and upload firmware, read and write fuses, and manipulate ROM and EEPROM on AVR microcontrollers. Whenever you upload code to an AVR-based Arduino, the Arduino IDE is quietly calling AVRDUDE in the background to make that happen.
We're going to call AVRDUDE manually to send a piece of pre-compiled firmware to the ATtiny.
Open a command terminal and navigate to /hardware/tools/avr/bin:
Enter the following command, changing to wherever you downloaded and unzipped the micronucleus repository and to the serial port connected to your Arduino ISP (e.g., COM65
on Windows).
Your output should look similar to the following.
Change Fuses
Most microcontrollers come with a number of configuration bits that reside in nonvolatile memory outside of the normal program space. In AVR chips, like our ATtiny84, these bits are known as 'fuses.' By default, the fuses on a new ATtiny84 are set to:
- Divide the clock by 8
- Disabled brown-out detection
- No self-programming
We want to change the fuses so that we have:
- No clock divider
- Brown-out detection at 2.7V (not necessary, but useful if running off battery)
- Self-programming
To see which fuses need to be changed, select ATtiny84 from the dropdown list on the AVR Fuse Calculator site.
Burning Fuses with AVRDUDE
If you change the features on the fuse calculator, you'll see that we need to set the following:
- Low Fuse Byte:
0xE2
- High Fuse Byte:
0xDD
- Extended Fuse Byte:
0xFE
To do that, we'll use AVRDUDE. Once again, navigate to the directory with AVRDUDE in Arduino and execute the following command:
Verify that the fuses have been written with the following:
While you are telling AVRDUDE to specifically read the lfuse, it will print out the state of all the fuses. You should see the following at the bottom of the printout:
Create an Arduino Board Definition
To be able to program the ATtiny84 from Arduino, we need to make a custom board definition. There are three main parts for a board definition, and we'll create each one:
- boards.txt -- Information about the microcontroller (clock speed, program space, etc.)
- platform.txt -- Extra information the compiler might need and which loader tool to use (e.g., AVRDUDE)
- pins_ardiuno.h -- Tells the compiler which pins in code map to which pins on the microcontroller
Additionally, we'll need to copy over the micronucleus loader tool from the micronucleus project directory to the Arduino directory. The loader tool will be used to send compiled firmware to the ATtiny84 (much as AVRDUDE does).
boards.txt
Navigate to /hardware and create a directory that corresponds to the class of platforms or company name that our ATtiny84 will belong to. I'll call mine mytiny.
In that directory, create another directory that corresponds to the target microcontroller family, 'avr' in this case.
In the avr directory, create a file named boards.txt and copy in the following text:
platform.txt
In the avr directory, create a file named platform.txt and copy in the following:
Pin Definitions
At this point, we need to create a custom pin definitions file. Create a directory in avr with the name variants:
Create another directory in variants named tiny14. In tiny14, create a file named pins_arduino.h.
Copy the following code into pins_arduino.h. Note that the original contents of this file come from the ATtiny cores for Arduino project.
If you look through the platform.txt file, you'll see that the loader tool is micronucleus and not avrdude. Because Arduino does not come with the micronucleus loader tool, we need to build it or copy it from the micronucleus project directory.
Build the Micronucleus Loader (Mac)
First, you'll need to make sure you have Homebrew installed. Then, open a command terminal and enter:
Navigate to
Copy the Micronucleus Executable (Windows)
Navigate to Plug in a USB micro cable from your computer to the USB micro breakout on the breadboard. Windows will likely tell you that no driver could be found. Navigate to If you installed libusb from the previous section, you should be all set. You have two choices. You can either run Arduino with root privileges in order to send data to an 'unknown' USB device, or you can install a set of udev rules to allow regular users to upload programs. To install the udev rules, run the following commands: We should have everything set up to flash a program onto the ATtiny84 from the Arduino IDE! But first, let's simplify the hardware. We can modify our hardware to disconnect the programming lines from the Arduino Pro Mini, which will free up some GPIO on the ATtiny. We'll still want to use the Pro Mini's voltage regulator to drop the USB voltage from 5V to 3.3V. Close and reopen the Arduino IDE to load the new board definition files. In a new sketch, copy in the following: In Tools > Board, you should see only one option under MyTiny Boards. Select it. And that's it! You should see the LED begin to blink on and off. While this is a lot of information to take in, it shows how to hack the Arduino IDE to load custom board definitions. These steps should work for other ATtiny devices that are supported by the micronucleus project, such as: You might have to modify the pins_arduino.h file, however, if you plan to use a different ATtiny. If you need additional support, please check out the following resources. If you want to go further with the ATtiny, please check out our additional tutorials that showcase the ATtiny:Linux
Example: Blinky
Make Usb Bootloader Mac Download
Hardware Setup
The Code
Upload and Run
Make Usb Bootloader Mac Usb
Make Usb Bootloader Mac
Resources and Going Further
ATtiny84 Pinout
Re-Programming the LilyTiny / LilyTwinkle
Pi AVR Programmer HAT Hookup Guide
Make Usb Bootloader Mac High Sierra
Qwiic Twist Hookup Guide
Make Usb Bootloader Machine
SparkFun Qwiic Button Hookup Guide