Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,016
  • Replies Replies 6,048
  • Likes Likes 54
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?
 
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
 
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
 
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
 
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,
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
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.
 
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.
 
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 :)
 
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,
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.
 
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.
 
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