Help Me!!!!!!!!

Thread Starter


Joined Jun 3, 2008
Dear Forum,
I have purchased a Kickstart development board from IAR, LPC2378-SK-01,I have written a program for toggling a pin on the board using IAR IDE.I am new to the ARM Development.My program is as follows:

#include <iolpc2378.h>
#include <inarm.h>
#include <stdio.h>
#include <intrinsics.h>
#include "io_macros.h"
void Delay(unsigned int);

* Function Name: irq_handler
* Parameters: none
* Return: none
* Description: IRQ handler

// IRQ exception handler. Calls the interrupt handlers.
__irq __arm void irq_handler(void)
void (*interrupt_function)();
unsigned int vector;

vector = VICADDRESS; // Get interrupt vector.
interrupt_function = (void(*)())vector;
(*interrupt_function)(); // Call vectored interrupt function.

VICADDRESS = 0; // Clear interrupt in Vector Interrut Controller.
} //IRQ end

void main()

__disable_interrupt(); //First disable interrupts.
PINSEL4_bit.P2_0 = 0;
IO0DIR = 0x00000001;
IO0SET = 0x00000001;
IO0CLR = 0x00000001;


void Delay(unsigned int data)
unsigned int i;


I have written this program in release mode.But when I am making and debugging it using the simulator or when downloading the program using J-link to flash, there is a message on the debug log as:

Wed Jun 04 11:38:39 2008: Download completed.
Wed Jun 04 11:38:39 2008: Loaded debugee: D:\DEVELOPMENT PROGRAMS\Release\Exe\test_program.hex
Wed Jun 04 11:38:39 2008: Target reset
Wed Jun 04 11:38:39 2008: Error (col 1): Unknown or ambiguous symbol. main
Wed Jun 04 11:38:39 2008: Couldn't go to 'main'.

Kindly sort out my problem........

Rajesh Mahapatra


Joined Apr 29, 2008
Beyond stating the obvious, I can't see anything wrong from looking over your code.

For some reason the debugger can't figure out where your main routine is. I would make sure that it is declared correctly (maybe "int main(void)"?).

Maybe somebody else has some ideas?


Joined Apr 15, 2008
It's all in the compiler setup. Look at one of the IAR example projects to determine what you are doing differently.

Thread Starter


Joined Jun 3, 2008
I m not able to undersatand whether there is some problem in the code or in the IAR IDE settings.I have set the options in the release mode.