Hacking [Tutorial] Printing Spla2n Posts with an Arduino/Teensy Board!

Which AVR are you using?


  • Total voters
    55
D

Deleted User

Guest
I'm having a problem. When I try to type "make" in the SwitchFightstick directory, It says "
'make' is not recognized as an internal or external command, operable program or batch file." I have MinGW installed and added to the path and I have rebooted several times. How can I fix this?
 

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
look, I'm gonna be honest with you. this guide is a mess. you didn't even mention the splatmeme repo past the fact that it's required. you also confused usb type a and usb type micro-b (which is what the Teensy ACTUALLY uses). you then failed to mention the required adapters/cables for the other two boards, as well as which (if any) extra packages would be required when installing minGW. please, put more work into your guides next time. the only reason I got it to work is because I already knew what I was doing.
I think you mixed up the USB bit; The Teensy has a Mini USB port on the board itself, which you plug a Mini USB to USB type A cable into. You then plug the USB type A end into the USB A to C adapter to plug into the Switch. Here's a handy diagram.

And did you miss the part where I specifically said to extract the repo into a folder? Literally the first step, I say to extract the contents into a folder of your choice. In fact, that's what the entire first section of the guide is specifically setting up. I already had MinGW and everything installed and could not remember the name of the packages necessary, and most people should be able to figure out what I meant by the "basic package".

so Ive followed everything and when I try to make it shows

makefile:30: ../LUFA/LUFA/Build/lufa_core.mk: No such file or directory
makefile:31: ../LUFA/LUFA/Build/lufa_sources.mk: No such file or directory
makefile:32: ../LUFA/LUFA/Build/lufa_build.mk: No such file or directory
makefile:33: ../LUFA/LUFA/Build/lufa_cppcheck.mk: No such file or directory
makefile:34: ../LUFA/LUFA/Build/lufa_doxygen.mk: No such file or directory
makefile:35: ../LUFA/LUFA/Build/lufa_dfu.mk: No such file or directory
makefile:36: ../LUFA/LUFA/Build/lufa_hid.mk: No such file or directory
makefile:37: ../LUFA/LUFA/Build/lufa_avrdude.mk: No such file or directory
makefile:38: ../LUFA/LUFA/Build/lufa_atprogram.mk: No such file or directory
make: *** No rule to make target `../LUFA/LUFA/Build/lufa_atprogram.mk'. Stop.

Everything is done properly so far, only confusing part is the MinGW part where it gives a list of packages
Path for LUFA is likely incorrectly configured in the makefile. Open the makefile in a text editor and replace "../LUFA/LUFA" with "./LUFA/LUFA", and if that doesn't work just type "./LUFA"

I'm having a problem. When I try to type "make" in the SwitchFightstick directory, It says "
'make' is not recognized as an internal or external command, operable program or batch file." I have MinGW installed and added to the path and I have rebooted several times. How can I fix this?
I noticed a typo that I had saying that the path was "C:\WinGW" and not "C:\MinGW", that might be the problem. Fixed it in the guide itself for future reference
 
Last edited by dj505,

Hopeywolf

Member
Newcomer
Joined
Jun 26, 2017
Messages
6
Trophies
0
Age
33
XP
43
Country
United States
Ok i got that sorted but now i ran into another error

[GCC] : Compiling C file "Joystick.c"
avr-gcc -c -pipe -gdwarf-2 -g2 -mmcu=at90usb1286 -fshort-enums -fno-inline-small-functions -fpack-struct -Wall -fno-strict-aliasing -funsigned-char -funsigned-bitfields -ffunction-sections -I. -DARCH=ARCH_AVR8 -DF_CPU=16000000UL -mrelax -fno-jump-tables -x c -Os -std=gnu99 -Wstrict-prototypes -DUSE_LUFA_CONFIG_HEADER -IConfig/ -I. -I./LUFA/LUFA/.. -DARCH=ARCH_AVR8 -DBOARD=BOARD_NONE -DF_USB=16000000UL -MMD -MP -MF obj/Joystick.d Joystick.c -o obj/Joystick.o
Assembler messages:
Fatal error: can't create obj/Joystick.o: No such file or directory
make: *** [obj/Joystick.o] Error 3​
 
D

Deleted User

Guest
When I try to make, I get

The system cannot find the path specified.
'avr-size' is not recognized as an internal or external command,
operable program or batch file.
'avr-size' is not recognized as an internal or external command,
operable program or batch file.
' [INFO] :' Begin compilation of project \"Joystick\"...
""
process_begin: CreateProcess(NULL, avr-gcc --version, ...) failed.
make (e=2): The system cannot find the file specified.
LUFA/LUFA/Build/DMBS/DMBS/gcc.mk:154: recipe for target 'build_begin' failed
mingw32-make: *** [build_begin] Error 2
 

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
Ok i got that sorted but now i ran into another error

[GCC] : Compiling C file "Joystick.c"
avr-gcc -c -pipe -gdwarf-2 -g2 -mmcu=at90usb1286 -fshort-enums -fno-inline-small-functions -fpack-struct -Wall -fno-strict-aliasing -funsigned-char -funsigned-bitfields -ffunction-sections -I. -DARCH=ARCH_AVR8 -DF_CPU=16000000UL -mrelax -fno-jump-tables -x c -Os -std=gnu99 -Wstrict-prototypes -DUSE_LUFA_CONFIG_HEADER -IConfig/ -I. -I./LUFA/LUFA/.. -DARCH=ARCH_AVR8 -DBOARD=BOARD_NONE -DF_USB=16000000UL -MMD -MP -MF obj/Joystick.d Joystick.c -o obj/Joystick.o
Assembler messages:
Fatal error: can't create obj/Joystick.o: No such file or directory
make: *** [obj/Joystick.o] Error 3​
-snip-
 
Last edited by dj505,

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
Is there a reason why this is only for Ardunio/Teensy board? Or does it also works on a Raspberry PI?
Teensy and (some) Arduino boards use chips like the atmega32u4, at90usb1286, atmega16u2, etc. which are all programmable via USB, and act as USB HID decides. The Raspberry Pi is a full computer and not just a programmable AVR, so it won't work.
 

Hopeywolf

Member
Newcomer
Joined
Jun 26, 2017
Messages
6
Trophies
0
Age
33
XP
43
Country
United States
So I was able to get it working but it seems that the brush it selects is the larger one which the image turns into a mess after. How can i fix that
 

HamBone41801

Vipera’s Alt
Member
Joined
Jan 16, 2017
Messages
1,083
Trophies
0
Age
23
XP
974
Country
United States
Is there a reason why this is only for Ardunio/Teensy board? Or does it also works on a Raspberry PI?
technically, the raspberry pi is a usable device, just not via this method. (and also, the method that would use it will never exist.) you would need to write, build, and install a bare-bones program to do everything, which is impossible unless you are familiar with asm.
 

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
So I was able to get it working but it seems that the brush it selects is the larger one which the image turns into a mess after. How can i fix that
You'll need to select a different tool beforehand instead of setting it to the smallest one so that when the tool does change, it changes to the smallest one automatically. It's a weird thing that happens sometimes, not sure why.

Edit: I see you got it working lol
N0c86K0.png
 
Last edited by dj505,
D

Deleted User

Guest
I managed to fix it by adding C:\Program Files (x86)\Arduino\hardware\tools\avr\bin to my PATH with the arduino IDE installed. I also used the command mingw32-make instead of make and added my flip installation folder as the driver location for my arduino uno while in DFU mode in device manager. It all worked and it's drawing as we speak.
 

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
I managed to fix it by adding C:\Program Files (x86)\Arduino\hardware\tools\avr\bin to my PATH with the arduino IDE installed. I also used the command mingw32-make instead of make and added my flip installation folder as the driver location for my arduino uno while in DFU mode in device manager. It all worked and it's drawing as we speak.
Alright, good to know! I'll add this to the guide when I have a few minutes
 

crk14341

New Member
Newbie
Joined
Aug 30, 2017
Messages
3
Trophies
0
Age
26
XP
51
Country
United States
So I've managed to fix a few of the issues that I've been having however I've come across a new problem that I can't figure out. What should I do to fix this?
 

Attachments

  • Capture.PNG
    Capture.PNG
    12.1 KB · Views: 592

Vverg

Member
Newcomer
Joined
Jan 5, 2017
Messages
22
Trophies
0
Age
33
XP
68
Country
Netherlands
Well.. I'm trying to do this stuff with a ATMEGA32U4.

Anyways you talk about Joystick.hex but I dont see anywhere in the tutorial how I can make this (as in making it for the stick i have). I do read something about makefile thing... but no idea how I exactly can run this.

And my guess is that I eventually have to put this in cmd?

Code:
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -C "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega32u4 -cavr109 -PCOM4 -b57600 -D -Uflash:w:E:\SwitchFightstick/Joystick.hex:i
 

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
Well.. I'm trying to do this stuff with a ATMEGA32U4.

Anyways you talk about Joystick.hex but I dont see anywhere in the tutorial how I can make this (as in making it for the stick i have). I do read something about makefile thing... but no idea how I exactly can run this.

And my guess is that I eventually have to put this in cmd?

Code:
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -C "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega32u4 -cavr109 -PCOM4 -b57600 -D -Uflash:w:E:\SwitchFightstick/Joystick.hex:i
Everything you need to do is in the guide. Install the necessary things and read it step by step. When you get to the part where there are 3 different boards, use the atmega32u4 section. You can just copy/paste the commands I have in the guide.

You get joystick.hex by compiling the program, which you do by editing the makefile to compile for the atmega32u4. The .hex file is the actual code you flash to the AVR once compiled.
 
Last edited by dj505,

Vverg

Member
Newcomer
Joined
Jan 5, 2017
Messages
22
Trophies
0
Age
33
XP
68
Country
Netherlands
Well I really can't see in the guide where I have to compile it.

Anyways, I decided to investigate it myself trough Google and found out that "mingw32-make" in CMD in the Switch folder did the trick. Had to download the joystick.o stuff but I finally got my Joystick.hex.

(Edit: I see GomiHiko had the same issue, stupid I dind't see it before.)

But then the issue came for writing the stuff to the Arduino stick, it simply dind't want to "reset" it... I don't have a reset button on my "Beetle atmega32u4 mini dev board". After some searching (+ give it some of my own touch) I discovered that if I change the baudsetting in Devicemanager to 1200 Baud... then change the command line also to 1200 Baud... (the one where you write the hex) I hear the connect/disconnect sound from Windows. But it jumps to other COM port after the reset, so I have to use that cmd line first with the first COM port (which was COM5 for me) and then the second (COM7).

Though I dind't needed to change stuff in the Arduino IDE program, it simply switched the COM port automatically for me after the first reset.

Now I have to wait for my USB C > USB A (female) stick (cant find the one I had). So I expect I can test the result tomorrow.
 
Last edited by Vverg,

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
Well I really can't see in the guide where I have to compile it.

Anyways, I decided to investigate it myself trough Google and found out that "mingw32-make" in CMD in the Switch folder did the trick. Had to download the joystick.o stuff but I finally got my Joystick.hex.

(Edit: I see GomiHiko had the same issue, stupid I dind't see it before.)

But then the issue came for writing the stuff to the Arduino stick, it simply dind't want to "reset" it... I don't have a reset button on my "Beetle atmega32u4 mini dev board". After some searching (+ give it some of my own touch) I discovered that if I change the baudsetting in Devicemanager to 1200 Baud... then change the command line also to 1200 Baud... (the one where you write the hex) I hear the connect/disconnect sound from Windows. But it jumps to other COM port after the reset, so I have to use that cmd line first with the first COM port (which was COM5 for me) and then the second (COM7).

Though I dind't needed to change stuff in the Arduino IDE program, it simply switched the COM port automatically for me after the first reset.

Now I have to wait for my USB C > USB A (female) stick (cant find the one I had). So I expect I can test the result tomorrow.
You can use the dock USB ports to test (won't work 100% right but it's possible for now) until your adapter arrives.

And the make instructions are in the guide, yes. Once everything is installed it's as simple as typing "make"; again, everything is in the guide. You have to read it in order, start to end, without skipping parts.
 

Vverg

Member
Newcomer
Joined
Jan 5, 2017
Messages
22
Trophies
0
Age
33
XP
68
Country
Netherlands
Once everything is installed it's as simple as typing "make";

But that simply dind't work for me, if you look up GomiHoki had the exact same issue as me.
I pretty much read and checked all your steps 10x to make sure I did exactly everything you said.

Aaah yeah I do see it "working" in dockmode, so guess I'm ready for now :)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/MddR6PTmGKg?si=mU2EO5hoE7XXSbSr