Homebrew Homebrew Development

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
Relys i tried to insert your touch code into a test homebrew. Here's my program.c:

Code:
#include "program.h"
#include "draw.h"
 
//For ctrulib
#include <3ds\types.h>
#include <3ds\services\hid.h>
#include <3ds\gfx.h>
 
//For sprintF
#include <stdio.h>
 
void program()
{
touchPosition myTouchPosition;
 
//As you can see touchPosition is a struct comprised of two 16 bit unsigned integers.
//typedef struct
//{
//    u16 px, py;
//} touchPosition;
 
//Pass pointer to hidTouchRead function which updates values.
hidTouchRead(myTouchPosition);
 
//Read x cord
u16 posX = myTouchPosition.px;
//Read y cord
u16 posY = myTouchPosition.py;
}

I'm getting build errors. Here's the log:

Code:
3DS_Touch_Test
program.c
arm-none-eabi-gcc -MMD -MP -MF /c/devkitPro/Projects/3DS/3DS_Touch_Test/build/pr
ogram.d -g -Wall -O2 -mword-relocations -save-temps -fomit-frame-pointer -ffast-
math -mfloat-abi=softfp -march=armv6k -mtune=mpcore -I/c/devkitPro/Projects/3DS/
3DS_Touch_Test/include -IC:\devkitPro\libctru/include -I/c/devkitPro/Projects/3D
S/3DS_Touch_Test/build -DARM11 -D_3DS -c /c/devkitPro/Projects/3DS/3DS_Touch_Tes
t/source/program.c -o program.o
c:/devkitPro/Projects/3DS/3DS_Touch_Test/source/program.c: In function 'program'
:
c:/devkitPro/Projects/3DS/3DS_Touch_Test/source/program.c:23:2: error: incompati
ble type for argument 1 of 'hidTouchRead'
  hidTouchRead(myTouchPosition);
  ^
In file included from C:\devkitPro\libctru/include/3ds.h:21:0,
                 from c:/devkitPro/Projects/3DS/3DS_Touch_Test/source/draw.h:4,
                 from c:/devkitPro/Projects/3DS/3DS_Touch_Test/source/program.c:
2:
C:\devkitPro\libctru/include/3ds/services/hid.h:79:6: note: expected 'struct tou
chPosition *' but argument is of type 'touchPosition'
 void hidTouchRead(touchPosition* pos);
      ^
c:/devkitPro/Projects/3DS/3DS_Touch_Test/source/program.c:28:6: warning: unused
variable 'posY' [-Wunused-variable]
  u16 posY = myTouchPosition.py;
      ^
c:/devkitPro/Projects/3DS/3DS_Touch_Test/source/program.c:26:6: warning: unused
variable 'posX' [-Wunused-variable]
  u16 posX = myTouchPosition.px;
      ^
make[1]: *** [program.o] Error 1
make: *** [build] Error 2
Premere un tasto per continuare . . .

Could you tell me what have i done wrong?
 

MeisterFenster

Well-Known Member
Member
Joined
Nov 18, 2014
Messages
168
Trophies
0
Age
28
XP
165
Country
Gambia, The
Ok, I have set up a VM now, but when I try to Build ctrulib with make clean and make I get an error.
C:\devkitPro\libctru>make clean
make: echo: Command not found
make: *** [clean] Error 127
and
C:\devkitPro\libctru>make
make: make: Command not found
make: *** [build] Error 127
I added the enviroment variables and installed everything as said in the instructions on 3dbrew, but I cant find the error :/
 

Relys

^(Software | Hardware) Exploit? Development.$
Member
Joined
Jan 5, 2007
Messages
878
Trophies
1
XP
1,239
Country
United States
I've got always same errors for compil...


'arm-none-eabi-strip' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

Check to make sure arm-none-eabi-strip is working. I think it is missing from your path. You need to strip your elf before you use makerom to build it into .3DS/.CIA.
 

Cid2mizard

Well-Known Member
Member
Joined
Aug 16, 2007
Messages
401
Trophies
1
Age
43
Location
Maubeuge
XP
2,460
Country
France
'arm-none-eabi-strip' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

Check to make sure arm-none-eabi-strip is working. I think it is missing from your path. You need to strip your elf before you use makerom to build it into .3DS/.CIA.

OK arm-none-eabi-strip it's good, problem came Path. I have add PATH = c:\devkitPro\devkitARM\bin; and it's works for me...

Thanks...
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
Wait what
Code:
error: cannot convert 'gfx3dSide_t' to 'gfxScreen_t' for argument '8' to 'void drawString(char*, int, int, char, char, char, u8*, gfxScreen_t)'
  drawString(buffer, 5, 28, 255, 255, 255, screenTopLeft, GFX_LEFT);
Everything seems to be fine on my side:

052dafd76725475426971fd7515f13a8.jpg


EDIT: OOOOOPPPPPSSSS My mistake. I tought this was a reply to my thread... :(

Is it on the github repo?
 
  • Like
Reactions: filfat

tankgrrrl

Member
Newcomer
Joined
Nov 16, 2014
Messages
12
Trophies
0
Age
46
XP
73
Country
United States
Just a heads up to anyone having this issue, you have to log off your account then back on for changes to environment variables like PATH to take effect...
 

Relys

^(Software | Hardware) Exploit? Development.$
Member
Joined
Jan 5, 2007
Messages
878
Trophies
1
XP
1,239
Country
United States
Just a heads up to anyone having this issue, you have to log off your account then back on for changes to environment variables like PATH to take effect...

Hmmmm, for Windows you should only need to open a new console. :/
 

Relys

^(Software | Hardware) Exploit? Development.$
Member
Joined
Jan 5, 2007
Messages
878
Trophies
1
XP
1,239
Country
United States
Sure, give me a minute! ;)


Cool, also I added you on Skype if you want to chat right now to try to get screen saving to SD card. I think the code I posted in your thread should be almost right, but I don't currently have a 3DS to test it out on. D:
 
  • Like
Reactions: filfat

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    The Real Jdbye @ The Real Jdbye: @BakerMan needs more expand dong