EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

CrossWorks for ARM - Simple led blink code doesn't run on lpc2368

Started by Barış July 19, 2010
Hi all,

I have a sample led blink code running on lpc2368.When I build this code on keil uVision, it runs successfully.But when I tried with CrossWorks, I don't see any action on board.Is there a specific issue that I didn't know?

Could anybody help me?

An Engineer's Guide to the LPC2100 Series

On 19/07/2010 21:00, Barış wrote:
> Hi all,
>
> I have a sample led blink code running on lpc2368.When I build this code on keil uVision, it runs successfully.But when I tried with CrossWorks, I don't see any action on board.Is there a specific issue that I didn't know?
>
> Could anybody help me?
This code of mine for CrossWorks might help:

/*
** led.c
**
** simple program to test switch input and LED output
*/

#include

void LED_on();
void LED_off();

#define LED_ROW 0x04000000 //P0.26
#define LED_COLUMN 0x00000008 //P0.3
#define SWITCH_PIN 15 // Button 1

int main(void)
{
while(1)
{
if (IOPIN & (1< LED_on();
else
LED_off();
}
}

void LED_on()
{
IODIR = 0x00000000;
IODIR |= (LED_ROW | LED_COLUMN);
IOSET = LED_ROW; // row low
IOSET = LED_COLUMN; // column high
}

void LED_off()
{
IODIR = 0x00000000;
IODIR |= (LED_ROW | LED_COLUMN);
IOCLR = LED_ROW; // row low
IOCLR = LED_COLUMN; // column high
}

It's for an LED array, rather than a single LED, on the little Silica
LPC2103 board I got at a seminar.

Leon
--
Leon Heller
G1HSM
--- In l..., Barış wrote:
>
> Hi all,
>
> I have a sample led blink code running on lpc2368.When I build this code on keil uVision, it runs successfully.But when I tried with CrossWorks, I don't see any action on board.Is there a specific issue that I didn't know?
>
> Could anybody help me?
>
The startup assumptions on Keil are different than the startup assumptions on Crossworks.

Your assumptions are all compiler environments are the same.

I am sure you did not check this, so please read the manual.

don

--- In l..., Barış wrote:
>
> Hi all,
>
> I have a sample led blink code running on lpc2368.When I build this code on keil uVision, it runs successfully.But when I tried with CrossWorks, I don't see any action on board.Is there a specific issue that I didn't know?
>
> Could anybody help me?
>
I tried your suggestions and added "STARTUP_FROM_RESET" to startup code but nothing has changed. My code is very simple.

while(1)
{
FIO3CLR = 0x02000000; // LED1OFF
FIO3SET = 0x04000000; // LED2ON
delay();
FIO3CLR = 0x04000000; // LED2OFF
FIO3SET = 0x02000000; // LED1ON
delay();
}

This code must be run on all compilers I think.I'm creating a new executable project described at "Creating a project" tutorial and startup codes included automatically.But it doesn't work

--- In l..., Barış wrote:
>
> Hi all,
>
> I have a sample led blink code running on lpc2368.When I build this code on keil uVision, it runs successfully.But when I tried with CrossWorks, I don't see any action on board.Is there a specific issue that I didn't know?
>
> Could anybody help me?
>

Ok, I get it work now. I included these lines to startup code's preprocessor definitions section.
VECTORED_IRQ_INTERRUPTS
VPBDIV_VAL=1
STARTUP_FROM_RESET

But now when I activate the PLL module, flow stucked. Where can I find the full list of these settings? I don't know meanings the lines above

On 20/07/2010 13:12, Barış wrote:
>
>
> --- In l..., Barış wrote:
>>
>> Hi all,
>>
>> I have a sample led blink code running on lpc2368.When I build this code on keil uVision, it runs successfully.But when I tried with CrossWorks, I don't see any action on board.Is there a specific issue that I didn't know?
>>
>> Could anybody help me?
>>
>
> Ok, I get it work now. I included these lines to startup code's preprocessor definitions section.
>
>
> VECTORED_IRQ_INTERRUPTS
> VPBDIV_VAL=1
> STARTUP_FROM_RESET
>
> But now when I activate the PLL module, flow stucked. Where can I find the full list of these settings? I don't know meanings the lines above
I believe they are explained in the comments found at the top of the
start up files that are distributed with the CrossWorks install. Also
in the documentation. Also on the Rowley support site (particularly the
FAQ).
Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers. More than 7000 downloads per month.

+ http://www.SafeRTOS.com
Certified by TÜV as meeting the requirements for safety related systems.

> > VECTORED_IRQ_INTERRUPTS
> > VPBDIV_VAL=1
> > STARTUP_FROM_RESET
> >
> > But now when I activate the PLL module, flow stucked. Where can I find the
> full list of these settings? I don't know meanings the lines above
> I believe they are explained in the comments found at the top of the
> start up files that are distributed with the CrossWorks install. Also
> in the documentation. Also on the Rowley support site (particularly the
> FAQ).

Don't expect too much. You may well wonder why he's asking here rather than at the source.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
SolderCore arriving Winter 2010! http://www.soldercore.com

Am 20.07.2010 14:26, schrieb Paul Curtis:
>>> VECTORED_IRQ_INTERRUPTS
>>> VPBDIV_VAL=1
>>> STARTUP_FROM_RESET
>>>
>>> But now when I activate the PLL module, flow stucked. Where can I find the
>> full list of these settings? I don't know meanings the lines above
>> I believe they are explained in the comments found at the top of the
>> start up files that are distributed with the CrossWorks install. Also
>> in the documentation. Also on the Rowley support site (particularly the
>> FAQ).
>
> Don't expect too much. You may well wonder why he's asking here rather than at the source.

Maybe because Rowley support could not help him ??? :-) (*kidding*)

From what I have seen so far in this group regarding CrossWorks, I really
wonder if we ever should give eval versions of our RTOS :(

--
42Bastian
+
| http://www.sciopta.com
| Fastest direct message passing kernel.
| IEC61508 certified.
+
That seems unreasonably harsh.
Porting software designed for the IAR or ARM toolset to a GCC baseset is never going to be a simple plug and play (Indeed porting applications from IAR ARM v4 to v5 was no simple thing).

I'm still using IAR toolset but, from what I have seen on this mailing list, Rowley seems to offer excellent support, and I am very very tempted to upgrade to Crossworks Personal to once I need more than the 32k that the IAR Kickstart edition supplies.

Nick

----- Original Nachricht ----
Von: 42Bastian
An: l...
Datum: 20.07.2010 14:53
Betreff: Re: [lpc2000] Re: CrossWorks for ARM - Simple led blink code doesn't
run on lpc2368

> Am 20.07.2010 14:26, schrieb Paul Curtis:
> >>> VECTORED_IRQ_INTERRUPTS
> >>> VPBDIV_VAL=1
> >>> STARTUP_FROM_RESET
> >>>
> >>> But now when I activate the PLL module, flow stucked. Where can I find
> the
> >> full list of these settings? I don't know meanings the lines above
> >>
> >>
> >> I believe they are explained in the comments found at the top of the
> >> start up files that are distributed with the CrossWorks install. Also
> >> in the documentation. Also on the Rowley support site (particularly the
> >> FAQ).
> >
> > Don't expect too much. You may well wonder why he's asking here rather
> than at the source.
>
> Maybe because Rowley support could not help him ??? :-) (*kidding*)
>
> From what I have seen so far in this group regarding CrossWorks, I really
> wonder if we ever should give eval versions of our RTOS :(
>
> --
> 42Bastian
> +
> | http://www.sciopta.com
> | Fastest direct message passing kernel.
> | IEC61508 certified.
> +
>
--- In l..., Barış wrote:
>
> Hi all,
>
> I have a sample led blink code running on lpc2368.When I build this code on keil uVision, it runs successfully.But when I tried with CrossWorks, I don't see any action on board.Is there a specific issue that I didn't know?
>
> Could anybody help me?
>

Thank you all for your replies.
I solved my problem


The 2024 Embedded Online Conference