Comments (4)
Cool - makes sense! I was just doing it all via cmd line in bash :P
from nesizer2.
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.
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.
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.
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)
- I Want To Build One HOT 6
- Need Help With Code!PLZ! HOT 2
- Documentation sample code does not compile HOT 2
- How to upload samples? HOT 7
- Nesizer goes crazy when cell battery is inserted HOT 13
- Unable to compile firmware properly with avr-gcc HOT 2
- How can I compile the sources HOT 12
- BOM Inquiry HOT 33
- AVR Programming Method HOT 8
- Build Problems HOT 101
- Midi CC integration HOT 12
- A recent update is causing a compile error: HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nesizer2.