hi
i need to declare a 512 byte array for my code because i need to get those data from a camera and send it to a FAT16 SD card
when i was going through the code, it gives me no definition that matches the type of section "udata_filename_0" when i was compiling it
it works fine if the total array declare is less than 256 byte
i opened the .asm file and the udata use percentage is not half yet
so how can i define a 512 byte array?
i just write a simple code to test how to declare this array but fail
i try to compile this code with 2 different compiler MPLAB IDE with MPLAB C18 and sdcc
the error msg is like this for sdcc
warning:relocation of section "udata_a_1"fail,relocating to a shared memory location
error:linker script has no definition that matches the type of section "udata_a_1"
and MPLAB C18 gives
Error - section '.udata_a.o' can not fit the section. Section '.udata_a.o' length=0x00000206
i need to declare a 512 byte array for my code because i need to get those data from a camera and send it to a FAT16 SD card
when i was going through the code, it gives me no definition that matches the type of section "udata_filename_0" when i was compiling it
it works fine if the total array declare is less than 256 byte
i opened the .asm file and the udata use percentage is not half yet
so how can i define a 512 byte array?
i just write a simple code to test how to declare this array but fail
i try to compile this code with 2 different compiler MPLAB IDE with MPLAB C18 and sdcc
the error msg is like this for sdcc
warning:relocation of section "udata_a_1"fail,relocating to a shared memory location
error:linker script has no definition that matches the type of section "udata_a_1"
and MPLAB C18 gives
Error - section '.udata_a.o' can not fit the section. Section '.udata_a.o' length=0x00000206
//file include
#include <p18f2620.h>
#include <stdio.h>
//***************************
//***********define************
#define TX PORTCbits.RC6
#define RX PORTCbits.RC7
//*****************************
//*****global variable**********
unsigned char rx_buffer[6];
unsigned char tx_buffer[512];
//******************************
//start coding
void main()
{
//register mapping for asynchronous transmit
TRISCbits.TRISC0 = 1; //setting pin as RX pin
INTCON |= 0xC0; //enable interrupts
RCSTAbits.SPEN = 1; //enable SPEN
TXSTAbits.SYNC = 0; //clear SYNC bits for asynchronous mode
TXSTAbits.BRGH = 1;//clock configure
PIE1 = 0x38;//set interrupt for EUSART & SPI
TXSTAbits.TXEN = 1; //transmit enable , trigger TXIF
RCSTAbits.CREN = 1; // enables receiver
SPBRG = 21; //57.6K baud rate
//end
}
Last edited: