Homebrew Homebrew game Issues with Nitrofox Makefile with Visual Studio Code environment setup

Vulf

Member
OP
Newcomer
Joined
Sep 22, 2022
Messages
11
Trophies
0
Age
18
Location
Massachusetts
XP
49
Country
United States
I am quite new to Nintendo DS development and am hoping to make a game on the platform. I started my project with Programmer's Notepad as that was what tutorials said I should use, but when I started refactoring after getting used to the different NitroFox functions I decided I wanted to switch to Visual Studio Code, a platform that I was much more used to and has better syntax highlighting. Thankfully I was able to find a GitHub repository that contained a setup VSC project to make things easier. My initial tests worked fine and compiled fine but when it came to adding the NitroFox library it failed to compile. I knew it had to be the Makefile so I swapped it with the one I had been using before with my Programmer's Notepad project. This didn't cause any compiler errors which seemed like a good sign, but attempting to run the file gives a DeSmuME warning that the ROM header is invalid. The ROM clearly doesn't run after that so I think it's safe to say that particular Makefile is not compatible with my VSC setup. The only issue is although I have knowledge of C++, I have no idea how Makefiles work or even where to start to fix my Makefile so it's able to have NitroFox and compile correctly. If anybody has any resources/a tutorial/anything that can help me please let me know :)

Due to my new account I am unable to link the VSC project template or the Makefile but the project is made by cuibonobo and can be found by googling "cuibonobo nds vscode", and the Nitrofox Makefile comes from the Nitrofox example projects (I can't remember which example I grabbed it from but as far as I'm aware they are all the same). Sorry!
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
I am quite new to Nintendo DS development and am hoping to make a game on the platform. I started my project with Programmer's Notepad as that was what tutorials said I should use, but when I started refactoring after getting used to the different NitroFox functions I decided I wanted to switch to Visual Studio Code, a platform that I was much more used to and has better syntax highlighting. Thankfully I was able to find a GitHub repository that contained a setup VSC project to make things easier. My initial tests worked fine and compiled fine but when it came to adding the NitroFox library it failed to compile. I knew it had to be the Makefile so I swapped it with the one I had been using before with my Programmer's Notepad project. This didn't cause any compiler errors which seemed like a good sign, but attempting to run the file gives a DeSmuME warning that the ROM header is invalid. The ROM clearly doesn't run after that so I think it's safe to say that particular Makefile is not compatible with my VSC setup. The only issue is although I have knowledge of C++, I have no idea how Makefiles work or even where to start to fix my Makefile so it's able to have NitroFox and compile correctly. If anybody has any resources/a tutorial/anything that can help me please let me know :)

Due to my new account I am unable to link the VSC project template or the Makefile but the project is made by cuibonobo and can be found by googling "cuibonobo nds vscode", and the Nitrofox Makefile comes from the Nitrofox example projects (I can't remember which example I grabbed it from but as far as I'm aware they are all the same). Sorry!
do you mean this?

1663812321824.png
 

Vulf

Member
OP
Newcomer
Joined
Sep 22, 2022
Messages
11
Trophies
0
Age
18
Location
Massachusetts
XP
49
Country
United States
where do I put this? I'm not sure I understand where nitrofox is located. you said examples, what example?
NitroFox is a library that you can include in your devkitPro libnds projects. It includes example projects similar to the ones that devkitpro includes and those example projects have a makefile. when i started working in programmers notepad i just took the makefile from those examples, put it in my project, and used it. it would go where the normal makefile would go. however now that ive moved to VS Code it no longer compiles correctly. if you dont have nitrofox and want to see these examples that i took the file from it can be found on source forge (once again my account is too new to post links sorry!)
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
I'm sorry, but that's beyond my abilities. I've added includes, at least with vs 2022, but I can find no way with vs code. plus, I don't know which folder you're adding.
 

Vulf

Member
OP
Newcomer
Joined
Sep 22, 2022
Messages
11
Trophies
0
Age
18
Location
Massachusetts
XP
49
Country
United States
where is lnflib? can't even run normal make due to missing that, and I've tried googling and nothing is found.
ive sent over 5 posts with this account so i should be able to send links now
https://github.com/Wolftr/ds-game/
this is the github repository with my setup. the makefile that is currently in the repository is the one that came with the template, and ive given you the one that came with night fox. remember to change the files in the .vscode folder so the filepaths work with your setup, and you can compile it with one of the tasks or with the ccr.bat included in the repository
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
ive sent over 5 posts with this account so i should be able to send links now
https://github.com/Wolftr/ds-game/
this is the github repository with my setup. the makefile that is currently in the repository is the one that came with the template, and ive given you the one that came with night fox. remember to change the files in the .vscode folder so the filepaths work with your setup, and you can compile it with one of the tasks or with the ccr.bat included in the repository
well, this is what happened in vs code terminal:

PS C:\Users\GODREBORN\Desktop\nflib\makefiles\NitroFS> make
linking NitroFS.elf
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.1.0/../../../../arm-none-eabi/bin/ld.exe: c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.1.0/../../../../arm-none-eabi/lib/thumb/ds_arm9_crt0.o: in function `IPCSync':
(.crt0+0x2f0): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/home/GODREBORN/Desktop/nflib/makefiles/NitroFS/Makefile:56: /home/GODREBORN/Desktop/nflib/makefiles/NitroFS/NitroFS.elf] Error 1
make: *** [Makefile:162: build] Error 2
PS C:\Users\GODREBORN\Desktop\nflib\makefiles\NitroFS>
 

Vulf

Member
OP
Newcomer
Joined
Sep 22, 2022
Messages
11
Trophies
0
Age
18
Location
Massachusetts
XP
49
Country
United States
well, this is what happened in vs code terminal:

PS C:\Users\GODREBORN\Desktop\nflib\makefiles\NitroFS> make
linking NitroFS.elf
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.1.0/../../../../arm-none-eabi/bin/ld.exe: c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.1.0/../../../../arm-none-eabi/lib/thumb/ds_arm9_crt0.o: in function `IPCSync':
(.crt0+0x2f0): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/home/GODREBORN/Desktop/nflib/makefiles/NitroFS/Makefile:56: /home/GODREBORN/Desktop/nflib/makefiles/NitroFS/NitroFS.elf] Error 1
make: *** [Makefile:162: build] Error 2
PS C:\Users\GODREBORN\Desktop\nflib\makefiles\NitroFS>
im not sure why youre getting errors when it comes to main
when using the makefile in the nflib\makefiles\NitroFS the program does compile a working rom oddly enough, i guess the file is slightly different then the one in the examples. there is still an issue of the file system not working properly but i can look into that on my own, thanks anyways
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
im not sure why youre getting errors when it comes to main
when using the makefile in the nflib\makefiles\NitroFS the program does compile a working rom oddly enough, i guess the file is slightly different then the one in the examples. there is still an issue of the file system not working properly but i can look into that on my own, thanks anyways
did you put those files in nds-lib or something else, then used an environmental variable to point to it? I'm trying to have the same setup as you.
 

Vulf

Member
OP
Newcomer
Joined
Sep 22, 2022
Messages
11
Trophies
0
Age
18
Location
Massachusetts
XP
49
Country
United States
did you put those files in nds-lib or something else, then used an environmental variable to point to it? I'm trying to have the same setup as you.
if you mean the makefile it should put be at the root of your project. the other files are exactly as i have them in the github. ive also updated the github to include the icon.bmp (fails to compile without) and put files in the nitrofiles folder (NFLib fails to set the directory when it is empty)
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
if you mean the makefile it should put be at the root of your project. the other files are exactly as i have them in the github. ive also updated the github to include the icon.bmp (fails to compile without) and put files in the nitrofiles folder (NFLib fails to set the directory when it is empty)
I'm talking about this: lnflib.a and it's corresponding include folder. there's no make install, so I don't even know where they're supposed to go in devkitPro.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • RedColoredStars @ RedColoredStars:
    Guy doesnt know wtf hes talking about half the time
  • realtimesave @ realtimesave:
    @SylverReZ that reminds me that my friend sells CRTs he gets cheap or free for hundreds of dollars. people are dumb
    +1
  • RedColoredStars @ RedColoredStars:
    And is incredibly annoying.
  • realtimesave @ realtimesave:
    man I just washed my shoes and they look exactly the same as before I washed them :|
  • realtimesave @ realtimesave:
    luckily they didn't fall apart
  • RedColoredStars @ RedColoredStars:
    Some CRTs are very much worth the price
  • RedColoredStars @ RedColoredStars:
    i used to go out to the recycling center every couple weeks and look at the crts and other electronics people would drop off. Usually screens were broken or severely scratched from being tossed around. Did find a good one here and there, but never anything like a 1080i widescreen crt.
  • RedColoredStars @ RedColoredStars:
    Or a good contition 40" Sony Trini that weighs 300 lbs. lol
  • RedColoredStars @ RedColoredStars:
    Literally 300 lbs. lolol
  • BigOnYa @ BigOnYa:
    I have a few of those boat anchors in my basement I tried giving away but no one wanted them, So anyone close to Columbus, Ohio area that wants them, (26", 2x 19") please come get, for free.
  • RedColoredStars @ RedColoredStars:
    Dont know anyone wants those smaller ones. Most are after larger sizes and the kinda top of the line models
  • RedColoredStars @ RedColoredStars:
    Motion handling and input lag on those things destroy plasmas, led, oled
  • realtimesave @ realtimesave:
    I had some really nice CRTs I should've kept
  • realtimesave @ realtimesave:
    now I have all lcd
  • realtimesave @ realtimesave:
    one in particular I regret getting rid of oh well :|
  • realtimesave @ realtimesave:
    the Sonys and stuff I don't care about
  • realtimesave @ realtimesave:
    and used LCD are hard to sell I can imagine.. not worth much
  • realtimesave @ realtimesave:
    @SylverReZ where do u lurk
  • a_username_that_isnt_cool @ a_username_that_isnt_cool:
    Is it piracy if it was released for free? Not in my opinion, but I also think it's not piracy if buying it isn't owning it, and it's not piracy if you can't buy it from the original creators anymore.
  • K3Nv2 @ K3Nv2:
    Free release can have loopholes where they still make money through ads
    +1
  • Xdqwerty @ Xdqwerty:
    sigh
  • Xdqwerty @ Xdqwerty:
    @a_username_that_isnt_cool, could you change your username?
  • Xdqwerty @ Xdqwerty:
    i guess not...
    Xdqwerty @ Xdqwerty: i guess not...