EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

LPC2368 + FreeRTOS

Started by "Jorge S." October 15, 2008
Hello all:

I'm just trying to install FreeRTOS on a LPC2368 Development board, and it
doesn't works even when replacing main() function with a simple led example.

My host is an Ubuntu Linux, with a devkitARM toolchain. (Toolchain has been
sucessfully tested, i can compile lots of working examples, leds, serial
ports, timers, and so on)

Steps i did on the ARM7_LPC2368_Eclipse demo:
1) Checked FreeRTOSConfig.h file -> It seems to be expecting a 12Mhz main
OSC, and thats what i have on my board.
Both of the "#define configPINSEL2_VALUE " options tested, none is
working :(.

2) Just following the docs, i've replaced the main() function with my own
main():

int main( void )
{
// Board has 2 leds tied to P3.25 & P3.26, and they are ON when pin is
tied to GND
FIO3DIR=(1<<25) | (1<<26);
FIO3SET=(1<<26);
while (1);
}
Everything builds OK (no errors, no warnings), and i get a RTOSDemo.hex file
wich i upload to the uC using serial ISP using the lpc21isp tool, but the
program isn't running, i don't see the LED (p3.26) ON.

Pd: Same main() test function works fine with my usual test makefile.
Any ideas? Maybe i'm missing any configuration? What can i check?

How can i identify if i have a REV A. version of the LPC2368?

Thanks in advance.

Regards,

Jorge.

An Engineer's Guide to the LPC2100 Series

> I'm just trying to install FreeRTOS on a LPC2368 Development
> board, and it doesn't works even when replacing main()
> function with a simple led example.



If you have such a simple main() then I would think the problem must be with
either the linker script or startup code.

Can you compare the linker scripts between the demo that works, and your new
project that doesn't. Likewise the linker scripts.

The different revs of the chip can make this a little challenging (I
actually have a rev '-' device that has never missed a beat as far as I can
tell).

Feedback from other people getting the project to work:

- comment out the usbram and ethram sections in the linker script.
- Use the boot.s file from FreeRTOS.org V4.8.0 (this can be obtained from
SourceForge) - although personally I cannot see that anything changed.
Regards,
Richard.

+ http://www.FreeRTOS.org
17 official architecture ports, more than 6000 downloads per month.

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

Hello,

try to delete or comment out the "Clear BSS" section of the boot.s file,
lines 72-89. (The problem I had is shortly explained in message ID
36512, http://tech.groups.yahoo.com/group/lpc2000/message/36512)

See LPC2356 Errata sheet for processor markings.

Best regards
Mikkel Kristiansen

________________________________

From: l... [mailto:l...] On Behalf
Of Jorge S.
Sent: 15. oktober 2008 20:18
To: l...
Subject: [lpc2000] LPC2368 + FreeRTOS

Hello all:

I'm just trying to install FreeRTOS on a LPC2368 Development board, and
it
doesn't works even when replacing main() function with a simple led
example.

My host is an Ubuntu Linux, with a devkitARM toolchain. (Toolchain has
been
sucessfully tested, i can compile lots of working examples, leds, serial
ports, timers, and so on)

Steps i did on the ARM7_LPC2368_Eclipse demo:

1) Checked FreeRTOSConfig.h file -> It seems to be expecting a 12Mhz
main
OSC, and thats what i have on my board.
Both of the "#define configPINSEL2_VALUE " options tested, none is
working :(.

2) Just following the docs, i've replaced the main() function with my
own
main():

int main( void )
{
// Board has 2 leds tied to P3.25 & P3.26, and they are ON when pin is
tied to GND
FIO3DIR=(1<<25) | (1<<26);
FIO3SET=(1<<26);
while (1);
}

Everything builds OK (no errors, no warnings), and i get a RTOSDemo.hex
file
wich i upload to the uC using serial ISP using the lpc21isp tool, but
the
program isn't running, i don't see the LED (p3.26) ON.

Pd: Same main() test function works fine with my usual test makefile.

Any ideas? Maybe i'm missing any configuration? What can i check?

How can i identify if i have a REV A. version of the LPC2368?

Thanks in advance.

Regards,

Jorge.




Hi,

As suggested here, i have checked the 4.0.8 version of boot.s but it's the
same file wich
comes with the version 5.0.4 version (the only changes are the missing .bss
section lines that i've deleted)

Just deleted the "Clear BSS" section of the boot.s file and now it partially
works.

My leds are now OK, so my main() test function is working, i can
switch leds on/off. But when i uncomment the demo main() it gets stuck on
the
very first API call:

xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( xLCDMessage ) );
Having a look at my RTOSDemo.map file i can see that sections .data and .bss
look like overlapping.
This is what my .map file looks like:

..
..

.data 0x400008bc 0x0
/opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_muldivdf3.o)
.data 0x400008bc 0x0
/opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_cmpdf2.o)
.data 0x400008bc 0x0
/opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_fixdfsi.o)
.data 0x400008bc 0x0
/opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/lib/thumb/libg.a(lib_a-malloc.o)
0x400008bc __data_end__ = .

.bss 0x400008bc 0x737c
0x400008bc __bss_beg__ = .
*(.bss)
.bss 0x400008bc 0x0
../../../Source/portable/GCC/ARM7_LPC23xx/portISR.o
.bss 0x400008bc 0x0 ./webserver/EMAC_ISR.o
.bss 0x400008bc 0x8 main.o
.bss 0x400008c4 0x0 ./ParTest/ParTest.o
.bss 0x400008c4 0x4 ./LCD/portlcd.o
.bss 0x400008c8 0x18 ../../Common/Minimal/BlockQ.o


Can you see things overlapping at address 0x400008bc?? or am i
misunderstanding the .map file?

Thanks for helping :)

Regards,
Jorge.

On Wed, Oct 15, 2008 at 9:16 PM, Kristiansen Mikkel Roth <
m...@danfoss.com> wrote:

> Hello,
>
> try to delete or comment out the "Clear BSS" section of the boot.s file,
> lines 72-89. (The problem I had is shortly explained in message ID
> 36512, http://tech.groups.yahoo.com/group/lpc2000/message/36512)
> See LPC2356 Errata sheet for processor markings.
> Best regards
> Mikkel Kristiansen
>
> ________________________________
>
> From: l... [mailto:
> l... ] On Behalf
> Of Jorge S.
> Sent: 15. oktober 2008 20:18
> To: l...
> Subject: [lpc2000] LPC2368 + FreeRTOS
> Hello all:
>
> I'm just trying to install FreeRTOS on a LPC2368 Development board, and
> it
> doesn't works even when replacing main() function with a simple led
> example.
>
> My host is an Ubuntu Linux, with a devkitARM toolchain. (Toolchain has
> been
> sucessfully tested, i can compile lots of working examples, leds, serial
> ports, timers, and so on)
>
> Steps i did on the ARM7_LPC2368_Eclipse demo:
>
> 1) Checked FreeRTOSConfig.h file -> It seems to be expecting a 12Mhz
> main
> OSC, and thats what i have on my board.
> Both of the "#define configPINSEL2_VALUE " options tested, none is
> working :(.
>
> 2) Just following the docs, i've replaced the main() function with my
> own
> main():
>
> int main( void )
> {
> // Board has 2 leds tied to P3.25 & P3.26, and they are ON when pin is
> tied to GND
> FIO3DIR=(1<<25) | (1<<26);
> FIO3SET=(1<<26);
> while (1);
> }
>
> Everything builds OK (no errors, no warnings), and i get a RTOSDemo.hex
> file
> wich i upload to the uC using serial ISP using the lpc21isp tool, but
> the
> program isn't running, i don't see the LED (p3.26) ON.
>
> Pd: Same main() test function works fine with my usual test makefile.
>
> Any ideas? Maybe i'm missing any configuration? What can i check?
>
> How can i identify if i have a REV A. version of the LPC2368?
>
> Thanks in advance.
>
> Regards,
>
> Jorge.
>
>
>
>
>
>
>

Hi again,

Just diving into the xQueueCreate() function code i can confirm that it gets
stuck when calling pvportmalloc().

Maybe something wrong with my libc malloc() function? how can i solve this?
My toolchain uses newlibc.

On Thu, Oct 16, 2008 at 7:06 PM, Jorge S. wrote:

> Hi,
>
> As suggested here, i have checked the 4.0.8 version of boot.s but it's the
> same file wich
> comes with the version 5.0.4 version (the only changes are the missing .bss
> section lines that i've deleted)
>
> Just deleted the "Clear BSS" section of the boot.s file and now it
> partially works.
>
> My leds are now OK, so my main() test function is working, i can
> switch leds on/off. But when i uncomment the demo main() it gets stuck on
> the
> very first API call:
>
> xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( xLCDMessage ) );
> Having a look at my RTOSDemo.map file i can see that sections .data and
> .bss look like overlapping.
> This is what my .map file looks like:
>
> ..
> ..
>
> .data 0x400008bc 0x0
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_muldivdf3.o)
> .data 0x400008bc 0x0
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_cmpdf2.o)
> .data 0x400008bc 0x0
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_fixdfsi.o)
> .data 0x400008bc 0x0
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/lib/thumb/libg.a(lib_a-malloc.o)
> 0x400008bc __data_end__ = .
>
> .bss 0x400008bc 0x737c
> 0x400008bc __bss_beg__ = .
> *(.bss)
> .bss 0x400008bc 0x0
> ../../../Source/portable/GCC/ARM7_LPC23xx/portISR.o
> .bss 0x400008bc 0x0 ./webserver/EMAC_ISR.o
> .bss 0x400008bc 0x8 main.o
> .bss 0x400008c4 0x0 ./ParTest/ParTest.o
> .bss 0x400008c4 0x4 ./LCD/portlcd.o
> .bss 0x400008c8 0x18 ../../Common/Minimal/BlockQ.o
>
>
> Can you see things overlapping at address 0x400008bc?? or am i
> misunderstanding the .map file?
>
> Thanks for helping :)
>
> Regards,
> Jorge.
> On Wed, Oct 15, 2008 at 9:16 PM, Kristiansen Mikkel Roth <
> m...@danfoss.com> wrote:
>
>> Hello,
>>
>> try to delete or comment out the "Clear BSS" section of the boot.s file,
>> lines 72-89. (The problem I had is shortly explained in message ID
>> 36512, http://tech.groups.yahoo.com/group/lpc2000/message/36512)
>> See LPC2356 Errata sheet for processor markings.
>> Best regards
>> Mikkel Kristiansen
>>
>> ________________________________
>>
>> From: l... [mailto:
>> l... ] On Behalf
>> Of Jorge S.
>> Sent: 15. oktober 2008 20:18
>> To: l...
>> Subject: [lpc2000] LPC2368 + FreeRTOS
>> Hello all:
>>
>> I'm just trying to install FreeRTOS on a LPC2368 Development board, and
>> it
>> doesn't works even when replacing main() function with a simple led
>> example.
>>
>> My host is an Ubuntu Linux, with a devkitARM toolchain. (Toolchain has
>> been
>> sucessfully tested, i can compile lots of working examples, leds, serial
>> ports, timers, and so on)
>>
>> Steps i did on the ARM7_LPC2368_Eclipse demo:
>>
>> 1) Checked FreeRTOSConfig.h file -> It seems to be expecting a 12Mhz
>> main
>> OSC, and thats what i have on my board.
>> Both of the "#define configPINSEL2_VALUE " options tested, none is
>> working :(.
>>
>> 2) Just following the docs, i've replaced the main() function with my
>> own
>> main():
>>
>> int main( void )
>> {
>> // Board has 2 leds tied to P3.25 & P3.26, and they are ON when pin is
>> tied to GND
>> FIO3DIR=(1<<25) | (1<<26);
>> FIO3SET=(1<<26);
>> while (1);
>> }
>>
>> Everything builds OK (no errors, no warnings), and i get a RTOSDemo.hex
>> file
>> wich i upload to the uC using serial ISP using the lpc21isp tool, but
>> the
>> program isn't running, i don't see the LED (p3.26) ON.
>>
>> Pd: Same main() test function works fine with my usual test makefile.
>>
>> Any ideas? Maybe i'm missing any configuration? What can i check?
>>
>> How can i identify if i have a REV A. version of the LPC2368?
>>
>> Thanks in advance.
>>
>> Regards,
>>
>> Jorge.
>>
>>
>>
>>
>>
>>
>>

Which heap_x.c file are you including in your project? (there are three
heap_1, heap_2 and heap_3)

Did you say you had removed some section initialisation from the start-up
file? That could cause problems if you have uninitialised variables.
Regards,
Richard.

+ http://www.FreeRTOS.org
17 official architecture ports, more than 6000 downloads per month.

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

> -----Original Message-----
> From: l...
> [mailto:l...] On Behalf Of Jorge S.
> Sent: 16 October 2008 19:19
> To: l...
> Subject: Re: [lpc2000] LPC2368 + FreeRTOS
>
> Hi again,
>
> Just diving into the xQueueCreate() function code i can
> confirm that it gets stuck when calling pvportmalloc().
>
> Maybe something wrong with my libc malloc() function? how can
> i solve this?
> My toolchain uses newlibc.
>
> On Thu, Oct 16, 2008 at 7:06 PM, Jorge S.
> > wrote:
>
> > Hi,
> >
> > As suggested here, i have checked the 4.0.8 version of
> boot.s but it's
> > the same file wich comes with the version 5.0.4 version (the only
> > changes are the missing .bss section lines that i've deleted)
> >
> > Just deleted the "Clear BSS" section of the boot.s file and now it
> > partially works.
> >
> > My leds are now OK, so my main() test function is working, i can
> > switch leds on/off. But when i uncomment the demo main() it
> gets stuck
> > on the very first API call:
> >
> > xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( xLCDMessage ) );
> >
> >
> > Having a look at my RTOSDemo.map file i can see that sections .data
> > and .bss look like overlapping.
> > This is what my .map file looks like:
> >
> >
> >
> > ..
> > ..
> >
> > .data 0x400008bc 0x0
> >
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_muldiv
> > df3.o)
> > .data 0x400008bc 0x0
> >
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_cmpdf2
> > .o)
> > .data 0x400008bc 0x0
> >
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_fixdfs
> > i.o)
> > .data 0x400008bc 0x0
> >
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/l
> > ib/thumb/libg.a(lib_a-malloc.o)
> > 0x400008bc __data_end__ = .
> >
> > .bss 0x400008bc 0x737c
> > 0x400008bc __bss_beg__ = .
> > *(.bss)
> > .bss 0x400008bc 0x0
> > ../../../Source/portable/GCC/ARM7_LPC23xx/portISR.o
> > .bss 0x400008bc 0x0 ./webserver/EMAC_ISR.o .bss 0x400008bc
> 0x8 main.o
> > .bss 0x400008c4 0x0 ./ParTest/ParTest.o .bss 0x400008c4 0x4
> > ./LCD/portlcd.o .bss 0x400008c8 0x18 ../../Common/Minimal/BlockQ.o
> >
> >
> >
> >
> > Can you see things overlapping at address 0x400008bc?? or am i
> > misunderstanding the .map file?
> >
> > Thanks for helping :)
> >
> > Regards,
> > Jorge.
> >
> >
> >
> >
> > On Wed, Oct 15, 2008 at 9:16 PM, Kristiansen Mikkel Roth <
> > m...@danfoss.com
> > wrote:
> >
> >> Hello,
> >>
> >> try to delete or comment out the "Clear BSS" section of the boot.s
> >> file, lines 72-89. (The problem I had is shortly explained
> in message
> >> ID 36512, http://tech.groups.yahoo.com/group/lpc2000/message/36512
> >> )
> >>
> >>
> >> See LPC2356 Errata sheet for processor markings.
> >>
> >>
> >> Best regards
> >> Mikkel Kristiansen
> >>
> >> ________________________________
> >>
> >> From: l...
>
> [mailto:
> >> l...
> >> ] On Behalf Of Jorge S.
> >> Sent: 15. oktober 2008 20:18
> >> To: l...
> >>
> >> Subject: [lpc2000] LPC2368 + FreeRTOS
> >>
> >>
> >> Hello all:
> >>
> >> I'm just trying to install FreeRTOS on a LPC2368
> Development board,
> >> and it doesn't works even when replacing main() function with a
> >> simple led example.
> >>
> >> My host is an Ubuntu Linux, with a devkitARM toolchain. (Toolchain
> >> has been sucessfully tested, i can compile lots of working
> examples,
> >> leds, serial ports, timers, and so on)
> >>
> >> Steps i did on the ARM7_LPC2368_Eclipse demo:
> >>
> >> 1) Checked FreeRTOSConfig.h file -> It seems to be
> expecting a 12Mhz
> >> main OSC, and thats what i have on my board.
> >> Both of the "#define configPINSEL2_VALUE " options tested, none is
> >> working :(.
> >>
> >> 2) Just following the docs, i've replaced the main()
> function with my
> >> own
> >> main():
> >>
> >> int main( void )
> >> {
> >> // Board has 2 leds tied to P3.25 & P3.26, and they are ON
> when pin
> >> is tied to GND
> >> FIO3DIR=(1<<25) | (1<<26);
> >> FIO3SET=(1<<26);
> >> while (1);
> >> }
> >>
> >> Everything builds OK (no errors, no warnings), and i get a
> >> RTOSDemo.hex file wich i upload to the uC using serial ISP
> using the
> >> lpc21isp tool, but the program isn't running, i don't see the LED
> >> (p3.26) ON.
> >>
> >> Pd: Same main() test function works fine with my usual
> test makefile.
> >>
> >> Any ideas? Maybe i'm missing any configuration? What can i check?
> >>
> >> How can i identify if i have a REV A. version of the LPC2368?
> >>
> >> Thanks in advance.
> >>
> >> Regards,
> >>
> >> Jorge.
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
>
>
>
>
>
>
>

I'm using heap_2.c (it comes as default on the demo makefile).

Just diving again....i can confirm that it gets stuck at a while loop
located at heap_2.c
on line 193.

This is the loop:

while( ( pxBlock->xBlockSize < xWantedSize ) && (
pxBlock->pxNextFreeBlock ) )
{
pxPreviousBlock = pxBlock;
pxBlock = pxBlock->pxNextFreeBlock;
}

It loops forever....
And yes, i've removed that bss initialization section as Kristiansen
sugested early on this thread. If i don't remove the bss initialization, the
demo simply doesn't work :(.

So ...steps i did so far:

1) Uncompressed the Source and issued a "make" on the lpc2368_Eclipse
demo...
Results: Not working.

2) Commented demo main() function and replaced with some led candy...
Results: Not working

3) As Kristian sugested i deleted de bss init code.
Results: Now my led eye candy works fine!

4) Commented my led test main() function and uncommented the demo main()
function
Results: Demo gets frozen on the while() loop i described before.
Any idea?

You guys are really helping me ...consider yourself "free beer awarded" if
you ever come to spain :)

Regards,

Jorge.

On Thu, Oct 16, 2008 at 8:29 PM, FreeRTOS.org Info wrote:

> Which heap_x.c file are you including in your project? (there are three
> heap_1, heap_2 and heap_3)
>
> Did you say you had removed some section initialisation from the start-up
> file? That could cause problems if you have uninitialised variables.
> Regards,
> Richard.
>
> + http://www.FreeRTOS.org
> 17 official architecture ports, more than 6000 downloads per month.
>
> + http://www.SafeRTOS.com
> Certified by T as meeting the requirements for safety related systems.
>
> > -----Original Message-----
> > From: l...
> > [mailto:l... ] On Behalf
> Of Jorge S.
> > Sent: 16 October 2008 19:19
> > To: l...
> > Subject: Re: [lpc2000] LPC2368 + FreeRTOS
> >
> > Hi again,
> >
> > Just diving into the xQueueCreate() function code i can
> > confirm that it gets stuck when calling pvportmalloc().
> >
> > Maybe something wrong with my libc malloc() function? how can
> > i solve this?
> > My toolchain uses newlibc.
> >
> > On Thu, Oct 16, 2008 at 7:06 PM, Jorge S.
> > > jorgesolla%40gmail.com > > wrote:
> >
> > > Hi,
> > >
> > > As suggested here, i have checked the 4.0.8 version of
> > boot.s but it's
> > > the same file wich comes with the version 5.0.4 version (the only
> > > changes are the missing .bss section lines that i've deleted)
> > >
> > > Just deleted the "Clear BSS" section of the boot.s file and now it
> > > partially works.
> > >
> > > My leds are now OK, so my main() test function is working, i can
> > > switch leds on/off. But when i uncomment the demo main() it
> > gets stuck
> > > on the very first API call:
> > >
> > > xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( xLCDMessage ) );
> > >
> > >
> > > Having a look at my RTOSDemo.map file i can see that sections .data
> > > and .bss look like overlapping.
> > > This is what my .map file looks like:
> > >
> > >
> > >
> > > ..
> > > ..
> > >
> > > .data 0x400008bc 0x0
> > >
> > /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_muldiv
> > > df3.o)
> > > .data 0x400008bc 0x0
> > >
> > /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_cmpdf2
> > > .o)
> > > .data 0x400008bc 0x0
> > >
> > /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_fixdfs
> > > i.o)
> > > .data 0x400008bc 0x0
> > >
> > /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/l
> > > ib/thumb/libg.a(lib_a-malloc.o)
> > > 0x400008bc __data_end__ = .
> > >
> > > .bss 0x400008bc 0x737c
> > > 0x400008bc __bss_beg__ = .
> > > *(.bss)
> > > .bss 0x400008bc 0x0
> > > ../../../Source/portable/GCC/ARM7_LPC23xx/portISR.o
> > > .bss 0x400008bc 0x0 ./webserver/EMAC_ISR.o .bss 0x400008bc
> > 0x8 main.o
> > > .bss 0x400008c4 0x0 ./ParTest/ParTest.o .bss 0x400008c4 0x4
> > > ./LCD/portlcd.o .bss 0x400008c8 0x18 ../../Common/Minimal/BlockQ.o
> > >
> > >
> > >
> > >
> > > Can you see things overlapping at address 0x400008bc?? or am i
> > > misunderstanding the .map file?
> > >
> > > Thanks for helping :)
> > >
> > > Regards,
> > > Jorge.
> > >
> > >
> > >
> > >
> > > On Wed, Oct 15, 2008 at 9:16 PM, Kristiansen Mikkel Roth <
> > > m...@danfoss.com
> > >
> > wrote:
> > >
> > >> Hello,
> > >>
> > >> try to delete or comment out the "Clear BSS" section of the boot.s
> > >> file, lines 72-89. (The problem I had is shortly explained
> > in message
> > >> ID 36512, http://tech.groups.yahoo.com/group/lpc2000/message/36512
> > >> )
> > >>
> > >>
> > >> See LPC2356 Errata sheet for processor markings.
> > >>
> > >>
> > >> Best regards
> > >> Mikkel Kristiansen
> > >>
> > >> ________________________________
> > >>
> > >> From: l...
> > >
> > [mailto:
> > >> l... > lpc2000%40yahoogroups.com >
> > >> ] On Behalf Of Jorge S.
> > >> Sent: 15. oktober 2008 20:18
> > >> To: l... > lpc2000%40yahoogroups.com >
> > >> > >> Subject: [lpc2000] LPC2368 + FreeRTOS
> > >>
> > >>
> > >> Hello all:
> > >>
> > >> I'm just trying to install FreeRTOS on a LPC2368
> > Development board,
> > >> and it doesn't works even when replacing main() function with a
> > >> simple led example.
> > >>
> > >> My host is an Ubuntu Linux, with a devkitARM toolchain. (Toolchain
> > >> has been sucessfully tested, i can compile lots of working
> > examples,
> > >> leds, serial ports, timers, and so on)
> > >>
> > >> Steps i did on the ARM7_LPC2368_Eclipse demo:
> > >>
> > >> 1) Checked FreeRTOSConfig.h file -> It seems to be
> > expecting a 12Mhz
> > >> main OSC, and thats what i have on my board.
> > >> Both of the "#define configPINSEL2_VALUE " options tested, none is
> > >> working :(.
> > >>
> > >> 2) Just following the docs, i've replaced the main()
> > function with my
> > >> own
> > >> main():
> > >>
> > >> int main( void )
> > >> {
> > >> // Board has 2 leds tied to P3.25 & P3.26, and they are ON
> > when pin
> > >> is tied to GND
> > >> FIO3DIR=(1<<25) | (1<<26);
> > >> FIO3SET=(1<<26);
> > >> while (1);
> > >> }
> > >>
> > >> Everything builds OK (no errors, no warnings), and i get a
> > >> RTOSDemo.hex file wich i upload to the uC using serial ISP
> > using the
> > >> lpc21isp tool, but the program isn't running, i don't see the LED
> > >> (p3.26) ON.
> > >>
> > >> Pd: Same main() test function works fine with my usual
> > test makefile.
> > >>
> > >> Any ideas? Maybe i'm missing any configuration? What can i check?
> > >>
> > >> How can i identify if i have a REV A. version of the LPC2368?
> > >>
> > >> Thanks in advance.
> > >>
> > >> Regards,
> > >>
> > >> Jorge.
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
>

If you are not initialising bss then the behaviour you describe makes sense.
If you look in the heap_2 function you will see a static variable
xHeapHasBeenInitialised which should be set to false. If you inspect the
variable on first entry I bet it is not false, so the heap never gets
initialised. Also there are file scope statics that are probably also
wrong.

I think you need to go back a step. First work out why initialising the bss
causes the program to crash, this again points to the linker script.

What I don't understand is why it works fine on my and other peoples
devices, and does not work on others? Is the memory map not the same?

Regards,
Richard.

+ http://www.FreeRTOS.org
17 official architecture ports, more than 6000 downloads per month.

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



> -----Original Message-----
> From: l...
> [mailto:l...] On Behalf Of Jorge S.
> Sent: 16 October 2008 19:47
> To: l...
> Subject: Re: [lpc2000] LPC2368 + FreeRTOS
>
> I'm using heap_2.c (it comes as default on the demo makefile).
>
> Just diving again....i can confirm that it gets stuck at a
> while loop located at heap_2.c on line 193.
>
> This is the loop:
>
> while( ( pxBlock->xBlockSize < xWantedSize ) && (
> pxBlock->pxNextFreeBlock ) )
> {
> pxPreviousBlock = pxBlock;
> pxBlock = pxBlock->pxNextFreeBlock;
> }
>
> It loops forever....
>
> And yes, i've removed that bss initialization section as
> Kristiansen sugested early on this thread. If i don't remove
> the bss initialization, the demo simply doesn't work :(.
>
> So ...steps i did so far:
>
> 1) Uncompressed the Source and issued a "make" on the
> lpc2368_Eclipse demo...
> Results: Not working.
>
> 2) Commented demo main() function and replaced with some led candy...
> Results: Not working
>
> 3) As Kristian sugested i deleted de bss init code.
> Results: Now my led eye candy works fine!
>
> 4) Commented my led test main() function and uncommented the
> demo main() function
> Results: Demo gets frozen on the while() loop i described before.
>
> Any idea?
>
> You guys are really helping me ...consider yourself "free
> beer awarded" if you ever come to spain :)
>
> Regards,
>
> Jorge.
>
> On Thu, Oct 16, 2008 at 8:29 PM, FreeRTOS.org Info
> >wrote:
>
> > Which heap_x.c file are you including in your project? (there are
> > three heap_1, heap_2 and heap_3)
> >
> > Did you say you had removed some section initialisation from the
> > start-up file? That could cause problems if you have
> uninitialised variables.
> >
> >
> > Regards,
> > Richard.
> >
> > + http://www.FreeRTOS.org
> > 17 official architecture ports, more than 6000 downloads per month.
> >
> > + http://www.SafeRTOS.com
> > Certified by T as meeting the requirements for safety
> related systems.
> >
> > > -----Original Message-----
> > > From: l...
> > > [mailto:l...
> > >
> ] On
> > > Behalf
> > Of Jorge S.
> > > Sent: 16 October 2008 19:19
> > > To: l...
> > >
> > > Subject: Re: [lpc2000] LPC2368 + FreeRTOS
> > >
> > > Hi again,
> > >
> > > Just diving into the xQueueCreate() function code i can
> confirm that
> > > it gets stuck when calling pvportmalloc().
> > >
> > > Maybe something wrong with my libc malloc() function? how can i
> > > solve this?
> > > My toolchain uses newlibc.
> > >
> > > On Thu, Oct 16, 2008 at 7:06 PM, Jorge S.
> > >
> > > jorgesolla%40gmail.com > > wrote:
> > >
> > > > Hi,
> > > >
> > > > As suggested here, i have checked the 4.0.8 version of
> > > boot.s but it's
> > > > the same file wich comes with the version 5.0.4 version
> (the only
> > > > changes are the missing .bss section lines that i've deleted)
> > > >
> > > > Just deleted the "Clear BSS" section of the boot.s file
> and now it
> > > > partially works.
> > > >
> > > > My leds are now OK, so my main() test function is
> working, i can
> > > > switch leds on/off. But when i uncomment the demo main() it
> > > gets stuck
> > > > on the very first API call:
> > > >
> > > > xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof(
> xLCDMessage ) );
> > > >
> > > >
> > > > Having a look at my RTOSDemo.map file i can see that sections
> > > > .data and .bss look like overlapping.
> > > > This is what my .map file looks like:
> > > >
> > > >
> > > >
> > > > ..
> > > > ..
> > > >
> > > > .data 0x400008bc 0x0
> > > >
> > >
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_muld
> > > iv
> > > > df3.o)
> > > > .data 0x400008bc 0x0
> > > >
> > >
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_cmpd
> > > f2
> > > > .o)
> > > > .data 0x400008bc 0x0
> > > >
> > >
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_fixd
> > > fs
> > > > i.o)
> > > > .data 0x400008bc 0x0
> > > >
> > >
> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi
> > > /l
> > > > ib/thumb/libg.a(lib_a-malloc.o)
> > > > 0x400008bc __data_end__ = .
> > > >
> > > > .bss 0x400008bc 0x737c
> > > > 0x400008bc __bss_beg__ = .
> > > > *(.bss)
> > > > .bss 0x400008bc 0x0
> > > > ../../../Source/portable/GCC/ARM7_LPC23xx/portISR.o
> > > > .bss 0x400008bc 0x0 ./webserver/EMAC_ISR.o .bss 0x400008bc
> > > 0x8 main.o
> > > > .bss 0x400008c4 0x0 ./ParTest/ParTest.o .bss 0x400008c4 0x4
> > > > ./LCD/portlcd.o .bss 0x400008c8 0x18
> ../../Common/Minimal/BlockQ.o
> > > >
> > > >
> > > >
> > > >
> > > > Can you see things overlapping at address 0x400008bc?? or am i
> > > > misunderstanding the .map file?
> > > >
> > > > Thanks for helping :)
> > > >
> > > > Regards,
> > > > Jorge.
> > > >
> > > >
> > > >
> > > >
> > > > On Wed, Oct 15, 2008 at 9:16 PM, Kristiansen Mikkel Roth <
> > > > m...@danfoss.com
> > > >
> > > >
> > >
> > > > oss.com>>
> > > wrote:
> > > >
> > > >> Hello,
> > > >>
> > > >> try to delete or comment out the "Clear BSS" section of the
> > > >> boot.s file, lines 72-89. (The problem I had is
> shortly explained
> > > in message
> > > >> ID 36512,
> > > >> http://tech.groups.yahoo.com/group/lpc2000/message/36512
> > > >>
> > > >> > > > >> > )
> > > >>
> > > >>
> > > >> See LPC2356 Errata sheet for processor markings.
> > > >>
> > > >>
> > > >> Best regards
> > > >> Mikkel Kristiansen
> > > >>
> > > >> ________________________________
> > > >>
> > > >> From: l...
>
> > > >>
> > > >
> > > [mailto:
> > > >> l...
>
> > > lpc2000%40yahoogroups.com >
> > > >> ] On Behalf Of Jorge S.
> > > >> Sent: 15. oktober 2008 20:18
> > > >> To: l...
>
> > > lpc2000%40yahoogroups.com >
> > > >>
> >
> > > >> Subject: [lpc2000] LPC2368 + FreeRTOS
> > > >>
> > > >>
> > > >> Hello all:
> > > >>
> > > >> I'm just trying to install FreeRTOS on a LPC2368
> > > Development board,
> > > >> and it doesn't works even when replacing main()
> function with a
> > > >> simple led example.
> > > >>
> > > >> My host is an Ubuntu Linux, with a devkitARM toolchain.
> > > >> (Toolchain has been sucessfully tested, i can compile lots of
> > > >> working
> > > examples,
> > > >> leds, serial ports, timers, and so on)
> > > >>
> > > >> Steps i did on the ARM7_LPC2368_Eclipse demo:
> > > >>
> > > >> 1) Checked FreeRTOSConfig.h file -> It seems to be
> > > expecting a 12Mhz
> > > >> main OSC, and thats what i have on my board.
> > > >> Both of the "#define configPINSEL2_VALUE " options
> tested, none
> > > >> is working :(.
> > > >>
> > > >> 2) Just following the docs, i've replaced the main()
> > > function with my
> > > >> own
> > > >> main():
> > > >>
> > > >> int main( void )
> > > >> {
> > > >> // Board has 2 leds tied to P3.25 & P3.26, and they are ON
> > > when pin
> > > >> is tied to GND
> > > >> FIO3DIR=(1<<25) | (1<<26);
> > > >> FIO3SET=(1<<26);
> > > >> while (1);
> > > >> }
> > > >>
> > > >> Everything builds OK (no errors, no warnings), and i get a
> > > >> RTOSDemo.hex file wich i upload to the uC using serial ISP
> > > using the
> > > >> lpc21isp tool, but the program isn't running, i don't
> see the LED
> > > >> (p3.26) ON.
> > > >>
> > > >> Pd: Same main() test function works fine with my usual
> > > test makefile.
> > > >>
> > > >> Any ideas? Maybe i'm missing any configuration? What
> can i check?
> > > >>
> > > >> How can i identify if i have a REV A. version of the LPC2368?
> > > >>
> > > >> Thanks in advance.
> > > >>
> > > >> Regards,
> > > >>
> > > >> Jorge.
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
>
>
>
>
>
>
>

On Thu, Oct 16, 2008 at 9:06 PM, FreeRTOS.org Info wrote:
> If you are not initialising bss then the behaviour you describe makes sense.
> If you look in the heap_2 function you will see a static variable
> xHeapHasBeenInitialised which should be set to false. If you inspect the
> variable on first entry I bet it is not false, so the heap never gets
> initialised. Also there are file scope statics that are probably also
> wrong.
>
> I think you need to go back a step. First work out why initialising the bss
> causes the program to crash, this again points to the linker script.

Yes, you are right. I'll try to use another bss init routine from a
working crt.s file i have ..

>
> What I don't understand is why it works fine on my and other peoples
> devices, and does not work on others? Is the memory map not the same?

Maybe a toolchain related issue?

Anyway, i don't give up... i love the idea of having a freertos
running on my system.

>
> Regards,
> Richard.
>
> + http://www.FreeRTOS.org
> 17 official architecture ports, more than 6000 downloads per month.
>
> + http://www.SafeRTOS.com
> Certified by T as meeting the requirements for safety related systems.
>
>> -----Original Message-----
>> From: l...
>> [mailto:l...] On Behalf Of Jorge S.
>> Sent: 16 October 2008 19:47
>> To: l...
>> Subject: Re: [lpc2000] LPC2368 + FreeRTOS
>>
>> I'm using heap_2.c (it comes as default on the demo makefile).
>>
>> Just diving again....i can confirm that it gets stuck at a
>> while loop located at heap_2.c on line 193.
>>
>> This is the loop:
>>
>> while( ( pxBlock->xBlockSize < xWantedSize ) && (
>> pxBlock->pxNextFreeBlock ) )
>> {
>> pxPreviousBlock = pxBlock;
>> pxBlock = pxBlock->pxNextFreeBlock;
>> }
>>
>> It loops forever....
>>
>> And yes, i've removed that bss initialization section as
>> Kristiansen sugested early on this thread. If i don't remove
>> the bss initialization, the demo simply doesn't work :(.
>>
>> So ...steps i did so far:
>>
>> 1) Uncompressed the Source and issued a "make" on the
>> lpc2368_Eclipse demo...
>> Results: Not working.
>>
>> 2) Commented demo main() function and replaced with some led candy...
>> Results: Not working
>>
>> 3) As Kristian sugested i deleted de bss init code.
>> Results: Now my led eye candy works fine!
>>
>> 4) Commented my led test main() function and uncommented the
>> demo main() function
>> Results: Demo gets frozen on the while() loop i described before.
>>
>> Any idea?
>>
>> You guys are really helping me ...consider yourself "free
>> beer awarded" if you ever come to spain :)
>>
>> Regards,
>>
>> Jorge.
>>
>> On Thu, Oct 16, 2008 at 8:29 PM, FreeRTOS.org Info
>> >wrote:
>>
>> > Which heap_x.c file are you including in your project? (there are
>> > three heap_1, heap_2 and heap_3)
>> >
>> > Did you say you had removed some section initialisation from the
>> > start-up file? That could cause problems if you have
>> uninitialised variables.
>> >
>> >
>> > Regards,
>> > Richard.
>> >
>> > + http://www.FreeRTOS.org
>> > 17 official architecture ports, more than 6000 downloads per month.
>> >
>> > + http://www.SafeRTOS.com
>> > Certified by T as meeting the requirements for safety
>> related systems.
>> >
>> > > -----Original Message-----
>> > > From: l...
>> > > [mailto:l...
>> > >
>> ] On
>> > > Behalf
>> > Of Jorge S.
>> > > Sent: 16 October 2008 19:19
>> > > To: l...
>> > >
>> > > Subject: Re: [lpc2000] LPC2368 + FreeRTOS
>> > >
>> > > Hi again,
>> > >
>> > > Just diving into the xQueueCreate() function code i can
>> confirm that
>> > > it gets stuck when calling pvportmalloc().
>> > >
>> > > Maybe something wrong with my libc malloc() function? how can i
>> > > solve this?
>> > > My toolchain uses newlibc.
>> > >
>> > > On Thu, Oct 16, 2008 at 7:06 PM, Jorge S.
>> > >
>> >> > jorgesolla%40gmail.com > > wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > As suggested here, i have checked the 4.0.8 version of
>> > > boot.s but it's
>> > > > the same file wich comes with the version 5.0.4 version
>> (the only
>> > > > changes are the missing .bss section lines that i've deleted)
>> > > >
>> > > > Just deleted the "Clear BSS" section of the boot.s file
>> and now it
>> > > > partially works.
>> > > >
>> > > > My leds are now OK, so my main() test function is
>> working, i can
>> > > > switch leds on/off. But when i uncomment the demo main() it
>> > > gets stuck
>> > > > on the very first API call:
>> > > >
>> > > > xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof(
>> xLCDMessage ) );
>> > > >
>> > > >
>> > > > Having a look at my RTOSDemo.map file i can see that sections
>> > > > .data and .bss look like overlapping.
>> > > > This is what my .map file looks like:
>> > > >
>> > > >
>> > > >
>> > > > ..
>> > > > ..
>> > > >
>> > > > .data 0x400008bc 0x0
>> > > >
>> > >
>> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_muld
>> > > iv
>> > > > df3.o)
>> > > > .data 0x400008bc 0x0
>> > > >
>> > >
>> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_cmpd
>> > > f2
>> > > > .o)
>> > > > .data 0x400008bc 0x0
>> > > >
>> > >
>> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_fixd
>> > > fs
>> > > > i.o)
>> > > > .data 0x400008bc 0x0
>> > > >
>> > >
>> /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi
>> > > /l
>> > > > ib/thumb/libg.a(lib_a-malloc.o)
>> > > > 0x400008bc __data_end__ = .
>> > > >
>> > > > .bss 0x400008bc 0x737c
>> > > > 0x400008bc __bss_beg__ = .
>> > > > *(.bss)
>> > > > .bss 0x400008bc 0x0
>> > > > ../../../Source/portable/GCC/ARM7_LPC23xx/portISR.o
>> > > > .bss 0x400008bc 0x0 ./webserver/EMAC_ISR.o .bss 0x400008bc
>> > > 0x8 main.o
>> > > > .bss 0x400008c4 0x0 ./ParTest/ParTest.o .bss 0x400008c4 0x4
>> > > > ./LCD/portlcd.o .bss 0x400008c8 0x18
>> ../../Common/Minimal/BlockQ.o
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > Can you see things overlapping at address 0x400008bc?? or am i
>> > > > misunderstanding the .map file?
>> > > >
>> > > > Thanks for helping :)
>> > > >
>> > > > Regards,
>> > > > Jorge.
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > On Wed, Oct 15, 2008 at 9:16 PM, Kristiansen Mikkel Roth <
>> > > > m...@danfoss.com
>> > > >
>> > > >
>> > >
>> >> > > oss.com>>
>> > > wrote:
>> > > >
>> > > >> Hello,
>> > > >>
>> > > >> try to delete or comment out the "Clear BSS" section of the
>> > > >> boot.s file, lines 72-89. (The problem I had is
>> shortly explained
>> > > in message
>> > > >> ID 36512,
>> > > >> http://tech.groups.yahoo.com/group/lpc2000/message/36512
>> > > >>
>> > > >> >> > > >> > )
>> > > >>
>> > > >>
>> > > >> See LPC2356 Errata sheet for processor markings.
>> > > >>
>> > > >>
>> > > >> Best regards
>> > > >> Mikkel Kristiansen
>> > > >>
>> > > >> ________________________________
>> > > >>
>> > > >> From: l...
>>
>> > > >>
>> > > >
>> > > [mailto:
>> > > >> l...
>>
>> >> > lpc2000%40yahoogroups.com >
>> > > >> ] On Behalf Of Jorge S.
>> > > >> Sent: 15. oktober 2008 20:18
>> > > >> To: l...
>>
>> >> > lpc2000%40yahoogroups.com >
>> > > >>
>> >
>> > > >> Subject: [lpc2000] LPC2368 + FreeRTOS
>> > > >>
>> > > >>
>> > > >> Hello all:
>> > > >>
>> > > >> I'm just trying to install FreeRTOS on a LPC2368
>> > > Development board,
>> > > >> and it doesn't works even when replacing main()
>> function with a
>> > > >> simple led example.
>> > > >>
>> > > >> My host is an Ubuntu Linux, with a devkitARM toolchain.
>> > > >> (Toolchain has been sucessfully tested, i can compile lots of
>> > > >> working
>> > > examples,
>> > > >> leds, serial ports, timers, and so on)
>> > > >>
>> > > >> Steps i did on the ARM7_LPC2368_Eclipse demo:
>> > > >>
>> > > >> 1) Checked FreeRTOSConfig.h file -> It seems to be
>> > > expecting a 12Mhz
>> > > >> main OSC, and thats what i have on my board.
>> > > >> Both of the "#define configPINSEL2_VALUE " options
>> tested, none
>> > > >> is working :(.
>> > > >>
>> > > >> 2) Just following the docs, i've replaced the main()
>> > > function with my
>> > > >> own
>> > > >> main():
>> > > >>
>> > > >> int main( void )
>> > > >> {
>> > > >> // Board has 2 leds tied to P3.25 & P3.26, and they are ON
>> > > when pin
>> > > >> is tied to GND
>> > > >> FIO3DIR=(1<<25) | (1<<26);
>> > > >> FIO3SET=(1<<26);
>> > > >> while (1);
>> > > >> }
>> > > >>
>> > > >> Everything builds OK (no errors, no warnings), and i get a
>> > > >> RTOSDemo.hex file wich i upload to the uC using serial ISP
>> > > using the
>> > > >> lpc21isp tool, but the program isn't running, i don't
>> see the LED
>> > > >> (p3.26) ON.
>> > > >>
>> > > >> Pd: Same main() test function works fine with my usual
>> > > test makefile.
>> > > >>
>> > > >> Any ideas? Maybe i'm missing any configuration? What
>> can i check?
>> > > >>
>> > > >> How can i identify if i have a REV A. version of the LPC2368?
>> > > >>
>> > > >> Thanks in advance.
>> > > >>
>> > > >> Regards,
>> > > >>
>> > > >> Jorge.
>> > > >>

Hello,

my suggestion about deleting the bss section was strictly meant as a small test - sorry for not making my suggestion more accurate. Richard's point about initialising the bss data area is correct.
The fix that I have used, moving the bss_end line in the lpc23xx.ld file, did make my lpc2387 port run . I think it's worth a try.


Best regards
Mikkel Kristiansen
Product development - controls

Danfoss
District Heating controls
Office E39, 6430 Nordborg, Denmark
Tel.: +45 7488 2745 / Mobile: -
Fax: +45 7449 0950
E-mail: m...@danfoss.com
www.danfoss.com



________________________________

From: l... [mailto:l...] On Behalf Of Jorge S.
Sent: 16. oktober 2008 20:47
To: l...
Subject: Re: [lpc2000] LPC2368 + FreeRTOS

I'm using heap_2.c (it comes as default on the demo makefile).

Just diving again....i can confirm that it gets stuck at a while loop
located at heap_2.c
on line 193.

This is the loop:

while( ( pxBlock->xBlockSize < xWantedSize ) && (
pxBlock->pxNextFreeBlock ) )
{
pxPreviousBlock = pxBlock;
pxBlock = pxBlock->pxNextFreeBlock;
}

It loops forever....

And yes, i've removed that bss initialization section as Kristiansen
sugested early on this thread. If i don't remove the bss initialization, the
demo simply doesn't work :(.

So ...steps i did so far:

1) Uncompressed the Source and issued a "make" on the lpc2368_Eclipse
demo...
Results: Not working.

2) Commented demo main() function and replaced with some led candy...
Results: Not working

3) As Kristian sugested i deleted de bss init code.
Results: Now my led eye candy works fine!

4) Commented my led test main() function and uncommented the demo main()
function
Results: Demo gets frozen on the while() loop i described before.

Any idea?

You guys are really helping me ...consider yourself "free beer awarded" if
you ever come to spain :)

Regards,

Jorge.

On Thu, Oct 16, 2008 at 8:29 PM, FreeRTOS.org Info >wrote:

> Which heap_x.c file are you including in your project? (there are three
> heap_1, heap_2 and heap_3)
>
> Did you say you had removed some section initialisation from the start-up
> file? That could cause problems if you have uninitialised variables.
> Regards,
> Richard.
>
> + http://www.FreeRTOS.org
> 17 official architecture ports, more than 6000 downloads per month.
>
> + http://www.SafeRTOS.com
> Certified by T as meeting the requirements for safety related systems.
>
> > -----Original Message-----
> > From: l...
> > [mailto:l... ] On Behalf
> Of Jorge S.
> > Sent: 16 October 2008 19:19
> > To: l...
> > Subject: Re: [lpc2000] LPC2368 + FreeRTOS
> >
> > Hi again,
> >
> > Just diving into the xQueueCreate() function code i can
> > confirm that it gets stuck when calling pvportmalloc().
> >
> > Maybe something wrong with my libc malloc() function? how can
> > i solve this?
> > My toolchain uses newlibc.
> >
> > On Thu, Oct 16, 2008 at 7:06 PM, Jorge S.
> > > jorgesolla%40gmail.com > > wrote:
> >
> > > Hi,
> > >
> > > As suggested here, i have checked the 4.0.8 version of
> > boot.s but it's
> > > the same file wich comes with the version 5.0.4 version (the only
> > > changes are the missing .bss section lines that i've deleted)
> > >
> > > Just deleted the "Clear BSS" section of the boot.s file and now it
> > > partially works.
> > >
> > > My leds are now OK, so my main() test function is working, i can
> > > switch leds on/off. But when i uncomment the demo main() it
> > gets stuck
> > > on the very first API call:
> > >
> > > xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( xLCDMessage ) );
> > >
> > >
> > > Having a look at my RTOSDemo.map file i can see that sections .data
> > > and .bss look like overlapping.
> > > This is what my .map file looks like:
> > >
> > >
> > >
> > > ..
> > > ..
> > >
> > > .data 0x400008bc 0x0
> > >
> > /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_muldiv
> > > df3.o)
> > > .data 0x400008bc 0x0
> > >
> > /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_cmpdf2
> > > .o)
> > > .data 0x400008bc 0x0
> > >
> > /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/thumb/libgcc.a(_fixdfs
> > > i.o)
> > > .data 0x400008bc 0x0
> > >
> > /opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/l
> > > ib/thumb/libg.a(lib_a-malloc.o)
> > > 0x400008bc __data_end__ = .
> > >
> > > .bss 0x400008bc 0x737c
> > > 0x400008bc __bss_beg__ = .
> > > *(.bss)
> > > .bss 0x400008bc 0x0
> > > ../../../Source/portable/GCC/ARM7_LPC23xx/portISR.o
> > > .bss 0x400008bc 0x0 ./webserver/EMAC_ISR.o .bss 0x400008bc
> > 0x8 main.o
> > > .bss 0x400008c4 0x0 ./ParTest/ParTest.o .bss 0x400008c4 0x4
> > > ./LCD/portlcd.o .bss 0x400008c8 0x18 ../../Common/Minimal/BlockQ.o
> > >
> > >
> > >
> > >
> > > Can you see things overlapping at address 0x400008bc?? or am i
> > > misunderstanding the .map file?
> > >
> > > Thanks for helping :)
> > >
> > > Regards,
> > > Jorge.
> > >
> > >
> > >
> > >
> > > On Wed, Oct 15, 2008 at 9:16 PM, Kristiansen Mikkel Roth <
> > > m...@danfoss.com
> > >
> > wrote:
> > >
> > >> Hello,
> > >>
> > >> try to delete or comment out the "Clear BSS" section of the boot.s
> > >> file, lines 72-89. (The problem I had is shortly explained
> > in message
> > >> ID 36512, http://tech.groups.yahoo.com/group/lpc2000/message/36512
> > >> > )
> > >>
> > >>
> > >> See LPC2356 Errata sheet for processor markings.
> > >>
> > >>
> > >> Best regards
> > >> Mikkel Kristiansen
> > >>
> > >> ________________________________
> > >>
> > >> From: l...
> > >
> > [mailto:
> > >> l... > lpc2000%40yahoogroups.com >
> > >> ] On Behalf Of Jorge S.
> > >> Sent: 15. oktober 2008 20:18
> > >> To: l... > lpc2000%40yahoogroups.com >
> > >> > >> Subject: [lpc2000] LPC2368 + FreeRTOS
> > >>
> > >>
> > >> Hello all:
> > >>
> > >> I'm just trying to install FreeRTOS on a LPC2368
> > Development board,
> > >> and it doesn't works even when replacing main() function with a
> > >> simple led example.
> > >>
> > >> My host is an Ubuntu Linux, with a devkitARM toolchain. (Toolchain
> > >> has been sucessfully tested, i can compile lots of working
> > examples,
> > >> leds, serial ports, timers, and so on)
> > >>
> > >> Steps i did on the ARM7_LPC2368_Eclipse demo:
> > >>
> > >> 1) Checked FreeRTOSConfig.h file -> It seems to be
> > expecting a 12Mhz
> > >> main OSC, and thats what i have on my board.
> > >> Both of the "#define configPINSEL2_VALUE " options tested, none is
> > >> working :(.
> > >>
> > >> 2) Just following the docs, i've replaced the main()
> > function with my
> > >> own
> > >> main():
> > >>
> > >> int main( void )
> > >> {
> > >> // Board has 2 leds tied to P3.25 & P3.26, and they are ON
> > when pin
> > >> is tied to GND
> > >> FIO3DIR=(1<<25) | (1<<26);
> > >> FIO3SET=(1<<26);
> > >> while (1);
> > >> }
> > >>
> > >> Everything builds OK (no errors, no warnings), and i get a
> > >> RTOSDemo.hex file wich i upload to the uC using serial ISP
> > using the
> > >> lpc21isp tool, but the program isn't running, i don't see the LED
> > >> (p3.26) ON.
> > >>
> > >> Pd: Same main() test function works fine with my usual
> > test makefile.
> > >>
> > >> Any ideas? Maybe i'm missing any configuration? What can i check?
> > >>
> > >> How can i identify if i have a REV A. version of the LPC2368?
> > >>
> > >> Thanks in advance.
> > >>
> > >> Regards,
> > >>
> > >> Jorge.
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
>






The 2024 Embedded Online Conference