#79780 - phoenixj91 - Sat Apr 15, 2006 11:31 pm
I'm trying out the code from Day 4 of the PERN project. I went through and corrected the names of all the register constants, which were almost all incorrect in the tutorial (BGCOLOR_256 instead of BGCOLOR256, for instance). I got everything except for CpuFastSet. Here's what returns when I compile:
Here's my code (truncated to the parts that matter):
I checked it all out and gba_bios.h is getting included in the project and everything, but the function is still not recognized. Do I have to include an external assembler file in my project or something?
Sorry for being clueless ;_;
Code: |
>build.bat main.o(.text+0xba): In function `main': C:\Projects\Chronofox/main.c:14: undefined reference to `CpuFastSet' main.o(.text+0xc6):C:\Projects\Chronofox/main.c:15: undefined reference to `CpuFastSet' collect2: ld returned 1 exit status arm-elf-objcopy: 'Chronofox.elf': No such file ROM fixed! Could Not Find C:\Projects\Chronofox\Chronofox.elf Chronofox compiled successfuly >Exit code: 1 |
Here's my code (truncated to the parts that matter):
Code: |
//Main program loop #include "gba.h" #include "functions.h" int main(){ //Begin program initoam(); //Clear sprite memory SetMode(MODE_0 | BG2_ENABLE | OBJ_ENABLE | OBJ_MAP_1D); //Set screenmode u16* vrammap = (u16*)SCREEN_BASE_BLOCK(31); u16* vramtiles = (u16*)MAP_BASE_BLOCK(0); REG_BG2CNT= BG_COLOR_256 | ROTBG_SIZE_128x128 | WRAPAROUND | (31<<SCREEN_SHIFT) | (0 << CHAR_SHIFT); CpuFastSet(vrammap,testmap,16*16/4); CpuFastSet(vramtiles,checker,64/4); //testmap and checker are defined in functions.h while(1){} } |
I checked it all out and gba_bios.h is getting included in the project and everything, but the function is still not recognized. Do I have to include an external assembler file in my project or something?
Sorry for being clueless ;_;