11 years, 10 months ago.

IAP not compiling?

For the life of me i can't figure out why this isn't working. I'm sure its probably the simplest thing.

I'm trying to compile the SPI_TFT_ILI932 library with the sample code provided, all the libraries are updated and i'm getting errors relating to IAP.

Error: Identifier "USER_FLASH_AREA_SIZE" is undefined in "SPI_TFT_ILI9320/IAP/IAP.cpp", Line: 33, Col: 25

Error: Identifier "USER_FLASH_AREA_START" is undefined in "SPI_TFT_ILI9320/IAP/IAP.cpp", Line: 216, Col: 21

I'm not sure if its something I need to change first or what, I really don't know where to start, I apologize for my ignorance haha. Any help would be much appreciated :)

The code is simply the sample stuff with just a little power on added reset. I'm using the KL25Z platform.

#include "mbed.h"
 
// SPI TFT
// NOTE : connect the LCD reset pin to the reset pin of the CPU board.
//        eg: on the mbed board, this is the 'nR' connection.
//#define NO_FLASH_BUFFER         // Do not use CPU flash for storing bitmaps
#include "SPI_TFT_ILI9320.h"
#include "Arial12x12.h"
#include "Arial24x23.h"
#include "Arial28x28.h"
#include "font_big.h"
SPI_TFT TFT(PTD2, p12,  PTD1, PTD5,"TFT");  //mosi, miso, clk, cs
 
DigitalOut ResetLCD(PTD0); //reset
int main (void)
{
    ResetLCD = 0;
    wait(0.5);
    ResetLCD = 1;  
    TFT.claim(stdout);        // send stdout to the TFT display
    TFT.background(Black);    // set background to black
    TFT.foreground(White);    // set chars to white
    TFT.cls();                // clear the screen
    TFT.set_font((unsigned char*) Arial12x12);  // select the font
 
    TFT.locate(0,0);
    printf("ILI9320 SPI TFT library\n");
    printf("Simple demo\n");
}

Question relating to:

1 Answer

11 years, 10 months ago.

The IAP is only available on the LPC1768 platform (and with some small changes the LCP11u24. Sadly the library is not available for the KL25. Uncommenting the NO_FLASH_BUFFER probably should fix it. But you will not be able to store the background in the flash memory of the microcontroller.

Thanks for your quick reply, I tried uncommenting the NO_FLASH_BUFFER, no luck. However I don't have any need to store a background. Maybe I will try follow back through the code and delete all the IAP/Background stuff. Cheers, Baden.

EDIT: dunno why defining NO_FLASH_BUFFER didn't work, i just went through and deleted all the parts pertaining to that in the code, and now its compiling.

posted by Baden Parr 06 Nov 2013