Make Usb Bootloader Mac



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. 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.

Q: Should I format USB stick to NTFS? Mac can only see USB drive formatted with exFAT or MS-FAT. NTFS is not supported by Mac in default. So you can not write ISO image to NTFS USB on Mac. FAT32 is more recommended! Q: How much time it takes for burning ISO to USB? For high-speed USB drive (3.0 or 3.1), it can be done within 10 minutes.

PagesFavoritedFavorite11

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-11232
1
FavoritedFavorite19
Warning: To make this work, we'll need to run the ATtiny84 at 12MHz during the bootloader phase. This tutorial shows how to do that with the internal RC clock at 3.3V. Note that this is out of spec for the ATtiny84! We're essentially overclocking/hacking the ATtiny to do something it's not supposed to do. Do this at your own risk! SparkFun takes no responsibility if you brick/smoke/blow up your ATtiny. Good thing they're cheap.

In this tutorial, we'll show you how to:

  1. Load Arduino ISP (In-System Programmer) on an Arduino
  2. Install the micronucleus bootloader on the ATtiny84
  3. Manually change fuses in the ATtiny84 to allow USB programming
  4. Create a new board definition in Arduino for the ATtiny84
  5. Install any necessary USB drivers
  6. 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.

Note: If you don't want to use the bootloader, you can still program the ATtiny84 directly from Arduino using another Arduino device as an ISP.

Parts List

To follow along, you will need these parts:

You Will Also Need

  • 2x 68Ω Resistors
  • 1x 1.5 kΩ Resistor
Tip: If you don't have the exact value, you can place resistors in series or parallel to get the equivalent value you need. For more information, check out our tutorial on resistors!

Resistors

A tutorial on all things resistors. What is a resistor, how do they behave in parallel/series, decoding the resistor color codes, and resistor applications.

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.

Note: This tutorial was tested with Arduino v1.6.13.

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.

Warning: Once again, this is extremely hackerish. SparkFun can't promise this will work with all computers.

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).

Usb

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 /commandline. Copy the micronucleus executable in the commandline directory to /hardware/tools.

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 udev rules to allow regular users to upload programs. To install the udev rules, run the following commands:

Make Usb Bootloader Machine

Example: Blinky

We should have everything set up to flash a program onto the ATtiny84 from the Arduino IDE! But first, let's simplify the hardware.

Hardware Setup

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.

Warning: Make sure you unplug the USB cable from the Arduino! We don't want to short anything. From now on, we'll be using the USB micro breakout on the breadboard to program the ATtiny84.

The Code

Close and reopen the Arduino IDE to load the new board definition files.

Note: On Linux and OS X, you'll need to run the Arduino IDE with administrator/root privileges in order to upload sketches over USB.

In a new sketch, copy in the following:

Upload and Run

In Tools > Board, you should see only one option under MyTiny Boards. Select it.

This part is important! Follow these steps to upload the sketch to the ATtiny84. Because our V-USB connection does not automatically reset the ATtiny, we'll need to reset it manually as the bootloader runs for the first five seconds after power-up before relinquishing control to the user program.
  1. Unplug USB cable
  2. Press Upload in the Arduino IDE
  3. Wait for the phrase 'Uploading...' to appear just above the Arduino console
  4. Plug in the USB cable
  5. Wait five seconds for the ATtiny84 to reboot and time out of the bootloader to start running our Blinky sketch

And that's it! You should see the LED begin to blink on and off.

Make Usb Bootloader Mac Download

Resources and Going Further

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.

ATtiny84 Pinout

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:

Re-Programming the LilyTiny / LilyTwinkle

A quick tutorial showing how to reprogram the ATtiny85 IC found on the LilyTiny or LilyTwinkle boards.

Pi AVR Programmer HAT Hookup Guide

In this tutorial, we will use a Raspberry Pi 3 and the Pi AVR Programmer HAT to program an ATMega328P target. We are going to first program the Arduino bootloader over SPI, and then upload an Arduino sketch over a USB serial COM port.

Qwiic Twist Hookup Guide

Make Usb Bootloader Mac Usb

Take your volume knob beyond 11 with the Qwiic Twist digital RGB LED encoder via I2C!

SparkFun Qwiic Button Hookup Guide

A Hookup Guide for the SparkFun Qwiic Button (Red) and SparkFun Qwiic Button Breakout. Goes over connecting the Qwiic Button to an Arduino microcontroller and using it with the Qwiic Button Arduino library.

What’s Needed:

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:


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

    1. DownloadClover EFI Bootloader
    2. Unzip & Open Clover folder
    3. Right-click & Open Clover EFI Bootloader (Note: Unsigned Apps like Clover must be right-click opened to avoid security warning)
    4. Click Continue
    5. Click Continue again
    6. Click Change Install Location…
    7. Select your Flash Drive under destination
    8. Click Continue
    9. Click Customize
    10. Check the following boxes:
    11. Click Install
    12. Enter Password and click Install Software
    13. Click Close
    14. Click Keep if it prompts

Make Usb Bootloader Mac High Sierra

Next Step

Make Usb Bootloader Mac

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