Homebrew Homebrew Development

trainboy2019

Well-Known Member
Member
Joined
Oct 6, 2015
Messages
1,114
Trophies
0
Age
23
Location
GA
XP
1,107
Country
United States
I'm trying to run the make command, but I keep getting this error.
Code:
main.cpp
arm-none-eabi-g++ -MMD -MP -MF /Users/Air/Desktop/3DSBREWMAKER/buttonPress/build/main.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard -I/Users/Air/Desktop/3DSBREWMAKER/buttonPress/include -I/opt/devkitpro/libctru/include -I/opt/devkitpro/portlibs/armv6k/include -I/opt/devkitpro/portlibs/3ds/include -I/Users/Air/Desktop/3DSBREWMAKER/buttonPress/build -DARM11 -D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /Users/Air/Desktop/3DSBREWMAKER/buttonPress/source/main.cpp -o main.o
linking FidgetSpinner3DS.elf
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/bin/ld: cannot find -lsfil
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/bin/ld: cannot find -lpng
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/bin/ld: cannot find -ljpeg
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/bin/ld: cannot find -lz
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/bin/ld: cannot find -lsf2d
collect2: error: ld returned 1 exit status
make[1]: *** [/Users/Air/Desktop/3DSBREWMAKER/buttonPress/FidgetSpinner3DS.elf] Error 1
make: *** [build] Error 2
I've tried everything. I set up the dev environment correctly by following the tutorial on 3dbrew. I put the paths in my bashrc file. Where am I going wrong?
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,032
Country
United States
I'm trying to run the make command, but I keep getting this error.
Code:
main.cpp
arm-none-eabi-g++ -MMD -MP -MF /Users/Air/Desktop/3DSBREWMAKER/buttonPress/build/main.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard -I/Users/Air/Desktop/3DSBREWMAKER/buttonPress/include -I/opt/devkitpro/libctru/include -I/opt/devkitpro/portlibs/armv6k/include -I/opt/devkitpro/portlibs/3ds/include -I/Users/Air/Desktop/3DSBREWMAKER/buttonPress/build -DARM11 -D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /Users/Air/Desktop/3DSBREWMAKER/buttonPress/source/main.cpp -o main.o
linking FidgetSpinner3DS.elf
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/bin/ld: cannot find -lsfil
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/bin/ld: cannot find -lpng
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/bin/ld: cannot find -ljpeg
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/bin/ld: cannot find -lz
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/bin/ld: cannot find -lsf2d
collect2: error: ld returned 1 exit status
make[1]: *** [/Users/Air/Desktop/3DSBREWMAKER/buttonPress/FidgetSpinner3DS.elf] Error 1
make: *** [build] Error 2
I've tried everything. I set up the dev environment correctly by following the tutorial on 3dbrew. I put the paths in my bashrc file. Where am I going wrong?
This project uses external libraries that you do not have installed.
You can find them at the following links:
https://github.com/devkitPro/3ds_portlibs
https://github.com/xerpi?tab=repositories
 

trainboy2019

Well-Known Member
Member
Joined
Oct 6, 2015
Messages
1,114
Trophies
0
Age
23
Location
GA
XP
1,107
Country
United States
I can't seem to convert my home-brew .elf file to a CIA, I keep getting this error.
Code:
[EXHEADER ERROR] Invalid FileSystemAccess Name: "SeedDB"
[EXHEADER ERROR] Failed to create ExHeader
[NCCH ERROR] NCCH Build Process Failed
[RESULT] Failed to build outfile
What am I doing wrong? I'm using the latest makerom with this command.
Code:
./makerom -f cia -o Project.cia -rsf cia.rsf -target t -exefslogo -elf Project.elf -icon Project.smdh -banner banner.bin

./makerom -f cia -o Project.cia -rsf cia.rsf -target t -exefslogo -elf Project.elf -icon Project.icn -banner banner.bin

./makerom -f cia -o Project.cia -rsf cia.rsf -target t -exefslogo -elf Project.elf -icon Project.bin -banner banner.bin
 

erman1337

Well-Known Member
Member
Joined
Sep 27, 2015
Messages
1,211
Trophies
0
Location
Brussels
XP
983
Country
Belgium
I can't seem to convert my home-brew .elf file to a CIA, I keep getting this error.
Code:
[EXHEADER ERROR] Invalid FileSystemAccess Name: "SeedDB"
[EXHEADER ERROR] Failed to create ExHeader
[NCCH ERROR] NCCH Build Process Failed
[RESULT] Failed to build outfile
What am I doing wrong? I'm using the latest makerom with this command.
Code:
./makerom -f cia -o Project.cia -rsf cia.rsf -target t -exefslogo -elf Project.elf -icon Project.smdh -banner banner.bin

./makerom -f cia -o Project.cia -rsf cia.rsf -target t -exefslogo -elf Project.elf -icon Project.icn -banner banner.bin

./makerom -f cia -o Project.cia -rsf cia.rsf -target t -exefslogo -elf Project.elf -icon Project.bin -banner banner.bin
The problem is in the rsf file
 

thane98

Well-Known Member
Member
Joined
Apr 23, 2016
Messages
617
Trophies
0
XP
1,529
Country
United States
I'm trying to set up one of the example homebrew projects in Visual Studio. I've gotten everything to build correctly, but VS is unable to locate one of the header files, "vshader_shbin.h", so I'm getting a lot of red lines inside the editor. Any how I can get VS to recognize the header and stop throwing errors?

Edit: Nevermind, I got the header situation figured out. That said, VS is still having issues with a lot of the expressions despite recognizing most of the expressions... Odd.
 
Last edited by thane98,

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,032
Country
United States
I'm trying to set up one of the example homebrew projects in Visual Studio. I've gotten everything to build correctly, but VS is unable to locate one of the header files, "vshader_shbin.h", so I'm getting a lot of red lines inside the editor. Any how I can get VS to recognize the header and stop throwing errors?

Edit: Nevermind, I got the header situation figured out. That said, VS is still having issues with a lot of the expressions despite recognizing most of the expressions... Odd.
This thread has some info - http://gbatemp.net/posts/6780557/

I could not get it to work 100% with .c files, it works a lot better with .cpp files.
 
  • Like
Reactions: thane98

TarableCode

Well-Known Member
Member
Joined
Mar 2, 2016
Messages
184
Trophies
0
Age
37
XP
319
Country
Canada
I've got gdb working and can use VS Code to attach and debug my test app, but is there a way to attach before the app launches so I can debug from the start?

Also a neat thing I found is that you can pass 80 to APT_SetAppCpuTimeLimit and it'll work but it breaks the luma menu and hardlocks the 3ds once
you enter the button combo.
I'll test tomorrow to see if it works if I lower it.

I've been fiddling with using the syscore to share in part of Indexed->RGB conversion and the 8BPP results are promising (9ms down to 5.5ms on o3ds for 512x384) but it's a bit finnicky at the moment.
Might be something for more talented devs to look into as well.
 

MasterFeizz

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
1,098
Trophies
1
Age
29
XP
3,710
Country
United States
I've been fiddling with using the syscore to share in part of Indexed->RGB conversion and the 8BPP results are promising (9ms down to 5.5ms on o3ds for 512x384) but it's a bit finnicky at the moment.
Might be something for more talented devs to look into as well.

I've implemented that in Quake2CTR, but depending on the situation this can actually be a bottleneck. I believe that if you set APT_SetAppCpuTimeLimit over 30 on the O3DS it doesn't really make any difference.
 

TarableCode

Well-Known Member
Member
Joined
Mar 2, 2016
Messages
184
Trophies
0
Age
37
XP
319
Country
Canada
Weird, it definitely goes up to 80 for me but beyond that thread creation seems to always fail.
I do seem to get 80% cpu time when doing 8BPP colour conversion, but conversely when doing 4BPP conversion it seems less than 50%.

I'll take a peek at your source too and check it out :)
 

TarableCode

Well-Known Member
Member
Joined
Mar 2, 2016
Messages
184
Trophies
0
Age
37
XP
319
Country
Canada
This is what I was using on my end, I haven't verified the output I was just checking how long it took to complete:
Code:
void ConvertIRGB8_To_RGBA8( u8* Src, u32* Dest, int SrcSizeInBytes ) {
while ( SrcSizeInBytes-- ) {
*Dest++ = FBConvTable[ *Src++ ][ 0 ];
}
}

void Convert8BPPThread( void* Param ) {
struct ConvertStruct* CS = ( struct ConvertStruct* ) Param;

ConvertIRGB8_To_RGBA8( CS->Src, CS->Dest, CS->Size );
}

/*
* Converts an indexed RGB888 image to an RGBA888 image and
* splits the workload between syscore and appcore.
*/
int IRGB8_To_RGBA8( u8* Src, u32* Dest, int Size ) {
struct ConvertStruct CS;
Thread T = NULL;

/* Set up the params for the syscore to use the 2nd
* half of the buffer.
*/
CS.Src = &Src[ Size / 2 ];
CS.Dest = &Dest[ Size / 8 ];
CS.Size = Size / 2;

/* Create a syscore thread */
T = threadCreate( Convert8BPPThread, ( void* ) &CS, 4096, 0x23, 1, true );

/* While syscore is running the thread, run this normally for
* the first half of the buffer.
*/
ConvertIRGB8_To_RGBA8( Src, Dest, Size / 2 );

if ( T != NULL ) {
/* Wait for syscore thread to finish */
threadJoin( T, U64_MAX );
} else {
printf( "threadCreate: Error\n" );
}

return T == NULL ? 0 : 1;
}

I'm not really used to threading so it could just be that it's entirely horribly wrong.

e:
It's not pasting tabs into the post... sorry.
 
Last edited by TarableCode,

MasterFeizz

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
1,098
Trophies
1
Age
29
XP
3,710
Country
United States
This is what I was using on my end, I haven't verified the output I was just checking how long it took to complete:
Code:
void ConvertIRGB8_To_RGBA8( u8* Src, u32* Dest, int SrcSizeInBytes ) {
while ( SrcSizeInBytes-- ) {
*Dest++ = FBConvTable[ *Src++ ][ 0 ];
}
}

void Convert8BPPThread( void* Param ) {
struct ConvertStruct* CS = ( struct ConvertStruct* ) Param;

ConvertIRGB8_To_RGBA8( CS->Src, CS->Dest, CS->Size );
}

/*
* Converts an indexed RGB888 image to an RGBA888 image and
* splits the workload between syscore and appcore.
*/
int IRGB8_To_RGBA8( u8* Src, u32* Dest, int Size ) {
struct ConvertStruct CS;
Thread T = NULL;

/* Set up the params for the syscore to use the 2nd
* half of the buffer.
*/
CS.Src = &Src[ Size / 2 ];
CS.Dest = &Dest[ Size / 8 ];
CS.Size = Size / 2;

/* Create a syscore thread */
T = threadCreate( Convert8BPPThread, ( void* ) &CS, 4096, 0x23, 1, true );

/* While syscore is running the thread, run this normally for
* the first half of the buffer.
*/
ConvertIRGB8_To_RGBA8( Src, Dest, Size / 2 );

if ( T != NULL ) {
/* Wait for syscore thread to finish */
threadJoin( T, U64_MAX );
} else {
printf( "threadCreate: Error\n" );
}

return T == NULL ? 0 : 1;
}

I'm not really used to threading so it could just be that it's entirely horribly wrong.

e:
It's not pasting tabs into the post... sorry.

This will only make your code slower, since you are creating a thread, running it on a "slower" core and waiting for the output. If you are going to halt the main thread waiting for the output then there is no point in using a separate thread.
 

TarableCode

Well-Known Member
Member
Joined
Mar 2, 2016
Messages
184
Trophies
0
Age
37
XP
319
Country
Canada
It splits the input buffer and passes the 2nd half of it to the syscore and does the first half of the buffer in the main thread.
I've timed it and it does seem to roughly double the speed of conversion.
 

yerWizard

Active Member
Newcomer
Joined
Oct 21, 2016
Messages
32
Trophies
0
Age
25
XP
225
Country
Im trying to render a model using citro3d and im getting this:
make[1]: *** No rule to make target «linksimpl.obj.o», needed for «/home/3dsthingsnotmine/textured_cube/textured_cube.elf». Stop.
make: *** [build] Error 2
root@alumne-VirtualBox:/home/3dsthingsnotmine/textured_cube#
What rule do i add to the makefile?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-