GithubHelp home page GithubHelp logo

Setting the right fuses about nesizer2 HOT 4 CLOSED

NilocEidlog avatar NilocEidlog commented on July 24, 2024
Setting the right fuses

from nesizer2.

Comments (4)

NilocEidlog avatar NilocEidlog commented on July 24, 2024 1

Cool - makes sense! I was just doing it all via cmd line in bash :P

from nesizer2.

beau-seidon avatar beau-seidon commented on July 24, 2024

If you clone the repo and open the root folder in VSCode with the PlatformIO extension installed (on any OS), all you have to do is open the PlatformIO Tasks menu and select Set Fuses and it will burn the fuse bits as configured in platformio.ini.

image

Otherwise, if you have avrdude installed (it comes with the Arduino IDE), you can use it just as you wrote.
The specific command I used to burn the fuse bits, back when I compiled and loaded everything using the terminal (before I found out how to do it with PIO), was this:

avrdude -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -v -p atmega328p -c stk500v1 -P COM4 -b 19200 -U lfuse:w:0xe0:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m

And to flash the firmware I would use:

avrdude -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -v -p atmega328p -c stk500v1 -P COM4 -b 19200 -U "flash:w:%USERPROFILE%\Desktop\nesizer_fw.hex:i"

The stk500v1 is the programmer argument that corresponds to an Arduino Uno with an ATmega328p installed which has been programmed with the "ArduinoISP.ino" example sketch. (I mention this primarily to inform anyone else who reads this in future who wants to use an Arduino Uno as a programmer.) Of course you will have to set your own paths and COM port settings etc, corresponding to your OS.

For a little more information, see the closed Issue called AVR Programming Method #11

from nesizer2.

beau-seidon avatar beau-seidon commented on July 24, 2024

Cool - makes sense! I was just doing it all via cmd line in bash :P

That's how it was originally intended to be done, but it's open source, build it however you want!

I still use Windows primarily. I love Linux but there are 2 applications I won't go without, which don't run properly on Linux. I was able to set fuse bits and load the firmware via Windows, but (probably because of operator error) I was only able to get the source to compile on Linux. Tried using git bash on Windows and mingw64, but the main problem is I still don't fully understand Make. Feel free to ridicule me.

I've been programming microcontrollers using PlatformIO for a while now, so I fiddled around a bit and got the NESizer2 firmware to compile and upload, on Windows and Linux, entirely within VSCode. I was told it works on MacOS also.

All you have to do is git-clone or manually download the repo, open it in VSCode (with PIO extension enabled), set the fuse bits (only required the first time), and click upload. It will auto install any dependencies, compile everything, and load it to the chip using the programmer settings in the platformio.ini file, which may have to be modified to match your ISP programmer device.

That's the way I like doing it.

from nesizer2.

beau-seidon avatar beau-seidon commented on July 24, 2024

If I remember correctly, @Jaffe- compiles (or has compiled at least once) via CLI using WSL in Windows. I haven't tried that yet.

from nesizer2.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.