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
17
Location
Massachusetts
XP
39
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,059
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
17
Location
Massachusetts
XP
39
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,059
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
17
Location
Massachusetts
XP
39
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,059
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
17
Location
Massachusetts
XP
39
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,059
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
17
Location
Massachusetts
XP
39
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,059
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.
  • BigOnYa @ BigOnYa:
    Nighty night. I messed up, made a margirita but used vodka by accident, taste like shit, but can't bring myself to dump it
  • BigOnYa @ BigOnYa:
    Alright I'm out too, gonna go shoot some 8-ball with the old lady. Good Night all!
  • HiradeGirl @ HiradeGirl:
    G Night
  • NinStar @ NinStar:
    game night
  • wolffangalchemist @ wolffangalchemist:
    Today I learned that raz disposable vapes have 0.96 inch i2c oled screens in them that can be used with various mcu's. I will be getting a bunch from. My coworkers now I j
  • wolffangalchemist @ wolffangalchemist:
    Just need a project to use them in.
  • K3Nv2 @ K3Nv2:
    @BigOnYa watches porn on his vape
  • wolffangalchemist @ wolffangalchemist:
    I made the same joke about a hour ago lol
    +1
  • wolffangalchemist @ wolffangalchemist:
    Seriously co worker said he has like 20 or so of these exact vapes that are empty, I am gonna have a lot of screens and USB c ports.
    +1
  • K3Nv2 @ K3Nv2:
    Use them for meth also
  • SylverReZ @ SylverReZ:
    @K3Nv2, Can it run Crysis?
  • Sicklyboy @ Sicklyboy:
    Holy shit I'm finally below 900 tabs open in Chrome
  • K3Nv2 @ K3Nv2:
    @Sicklyboy, All porn?
  • Sicklyboy @ Sicklyboy:
    >500 of it is youtube videos, so not all porn
  • K3Nv2 @ K3Nv2:
    Good lad
  • wolffangalchemist @ wolffangalchemist:
    i will make a tiny psp and put porn it.
  • NinStar @ NinStar:
    I totally forgot I was a stacked transsexual anthropomorphic bunny on steam
  • BakerMan @ BakerMan:
    ...
  • BakerMan @ BakerMan:
    what the fuck?
  • BakerMan @ BakerMan:
    also, going to bed
  • DinohScene @ DinohScene:
    feckin spambots
  • K3Nv2 @ K3Nv2:
    Wine and dine the spambots before you do that
  • DinohScene @ DinohScene:
    they better pay up
  • K3Nv2 @ K3Nv2:
    They might have grandma's 401k
  • S @ salazarcosplay:
    how are yall doing?
    S @ salazarcosplay: how are yall doing?