Maximum code size of program binary in libNDS with devkitPro

Discussion in 'NDS - Emulation and Homebrew' started by Enu, Jan 19, 2009.

  1. Enu
    OP

    Newcomer Enu Newbie

    Joined:
    Jan 19, 2009
    Messages:
    1
    Country:
    United States
    I've recently run into an issue developing in devkitPro using libNDS. My program's size can exceed half a meg and I believe causes it to overwrite some video buffers. The data section of the .elf binary (when I use the arm-eabi-size tool) is at 100kb and the bss section is into the megabytes. However the final shrunken .nds size is over half a megabyte and it doesn't display anything in console mode. Removing code files causes the display to be written correctly. Is there a limit for the maximum size of the code in the final binary?

    text data bss dec hex
    1455884 77724 386756 1920364 1d4d6c (removed code from program and added in lots of data into program binary, still runs and displays okay)

    text data bss dec hex
    421068 102356 3794636 4318060 41e36c (removed data from program binary, does not display anything in console mode)

    I'm not getting any output on the video buffer when I test program variables by printing them out after initiating console mode (consoleDemoInit). So I think my program's large size has caused some of the video buffers to be overwritten. Is there anything that can be done to alleviate this problem? Perhaps by moving some of the video buffers around in memory?

    Thanks,

    Enu
     
  2. Normmatt

    Member Normmatt Former AKAIO Programmer

    Joined:
    Dec 14, 2004
    Messages:
    2,135
    Country:
    New Zealand
    your must be causing a buffer overflow, paste your code and we'll see what we can do.
     

Share This Page