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,116
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,116
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,116
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,116
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,116
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
  • K3Nv2 @ K3Nv2:
    Chickens are known to eat their own eggs
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I sent them the idea for the surstroming flavored vodka.... I am sorry they tasted it lol
  • K3Nv2 @ K3Nv2:
    He's a one nut wonder
  • Xdqwerty @ Xdqwerty:
    Good night
  • BigOnYa @ BigOnYa:
    Nighty Night!
  • BigOnYa @ BigOnYa:
    I bought a bigger computer desk/stand last year, cause mine was always too cluttered and messy. Now with new bigger desktop, I have more room for junk, to make it even more cluttered. I thought would help, but made it worse.
  • K3Nv2 @ K3Nv2:
    My new desks arriving tomorrow
  • BigOnYa @ BigOnYa:
    I'm jelly
  • K3Nv2 @ K3Nv2:
    Gonna be a bitch putting together
  • BigOnYa @ BigOnYa:
    I think I'm gonna just build my own new one with cabinet board and then stain it dark.
  • BigOnYa @ BigOnYa:
    Nuh f all that, I have all the tools in my shed to make cabinets. I'll just custom make my own soo much cheaper. I want to do a corner unit anyways, for 3 monitors.
  • K3Nv2 @ K3Nv2:
    Still looks nice
  • BigOnYa @ BigOnYa:
    True dat
  • BigOnYa @ BigOnYa:
    How have you, and my wifey been? Been busy and haven't been here much. Oh and tell Uremum that Friday will be fine. I'll get cash before this time.
  • BakerMan @ BakerMan:
    MY BIRTHDAY IS IN LIKE A WEEK
    +2
  • BakerMan @ BakerMan:
    W BOYS
  • K3Nv2 @ K3Nv2:
    We know
  • K3Nv2 @ K3Nv2:
    MiniTool is so slow at extending partitions
  • BigOnYa @ BigOnYa:
    I prefer AOMEI Partition Assistant
  • BigOnYa @ BigOnYa:
    Happy birthday @BakerMan in case I miss it. Hope you have all your dreams come true,except the Wario in the woods one
  • K3Nv2 @ K3Nv2:
    Free edition doesnt let you resize
    +1
  • BigOnYa @ BigOnYa:
    So seriously, damn I didn't know that. One to grow on...Gonna go check myself
  • K3Nv2 @ K3Nv2:
    Etcher decided to partition like 400GB of this sd card so trying to find a good software that doesnt ask for your entire check
    +1
  • BigOnYa @ BigOnYa:
    Is it a blank Partition, or are you trying to take an existing partition and extend it
    BigOnYa @ BigOnYa: Is it a blank Partition, or are you trying to take an existing partition and extend it