EmbeddedRelated.com
Forums

MCB2300 with LPC2387 - help: need freertos port

Started by nagik October 14, 2008
Thank you Mikkel.

--- In l..., "mikkel.kristiansen"
wrote:
>
> Hello Nagi,
>
> I have not tested your .ld file, but the bss declarations seems to
> be correct (it don't look like the FreeRTOS LPC2368 Eclipse port
> that I have).
>
> On you request, I have tried to elaborate my earlier comment,
> http://tech.groups.yahoo.com/group/lpc2000/message/36716
>
> I hope this clarifies what problem I had in the beginning :-)
>
> I can see that FreeRTOS have updated the *.ld file � that is also a
> good idea to check that out.
>
> BR, Mikkel
>
>
> --- In l..., "nagik" wrote:
> >
> > Dear Mr. Mikkel,
> >
> > thank you for your mail. Please can you elaborate? I
> > am not able to understand what you mean.
> >
> > the following is the LPC2368.ld file I am using:
> > --------------------start of file----------------
> >
> > /*
> > * Defines memory layout
> > */
> >
> > MEMORY
> > {
> > flash (rx) : ORIGIN = 0x00000000, LENGTH = 512K
> > ram (rw) : ORIGIN = 0x40000000, LENGTH = 61440
> > ramstack (rw) : ORIGIN = 0x40007800, LENGTH = 4096
> > usbram (rw) : ORIGIN = 0x7FD00000, LENGTH = 16K
> > ethram (rw) : ORIGIN = 0x7FE00000, LENGTH = 16K
> > }
> >
> > /*
> > * Define entry point, found in startarm.s
> > */
> > ENTRY(_reset_handler)
> >
> > /*
> > * Sections
> > */
> > SECTIONS
> > {
> > /* Place memory counter at address 0 */
> > . = 0;
> >
> > /* Place startup code at start of flash */
> > startup :
> > {
> > *(.startup)
> > } > flash =0
> >
> > . = ALIGN(4);
> >
> > /* Place program code */
> > prog :
> > {
> > *(.text)
> > *(.rodata)
> > *(.rodata*)
> > *(glue_7)
> > *(glue_7t)
> > } > flash =0
> >
> > . = ALIGN(4);
> >
> > __end_of_text__ = .;
> > __data_beg_src__ = .;
> > PROVIDE(etext = .);
> >
> > /* Place initialized data */
> > .data : AT(__data_beg_src__)
> > {
> > __data_beg__ = .;
> > *(.data)
> > } > ram
> >
> > . = ALIGN(4);
> > __data_end__ = .;
> > PROVIDE(edata = .);
> >
> > /* Place zero initialized data */
> > .bss :
> > {
> > __bss_beg__ = .;
> > *(.bss)
> > } >ram
> >
> >
> > /* Align here to ensure that the .bss section occupies space up
> to
> > _end. Align after .bss to ensure correct alignment even if the
> > .bss section disappears because there are no input sections.
> */
> > . = ALIGN(32 / 8);
> >
> > . = ALIGN(32 / 8);
> >
> > /* Provide end markers */
> > _end = .;
> > _bss_end__ = .;
> > __bss_end__ = .;
> > __end__ = .;
> > PROVIDE(end = .);
> >
> > stacklayout :
> > {
> > __stack_scv_bottom__ = .;
> > . = . + 0x0400;
> > __stack_scv_top__ = .;
> > __stack_irq_bottom__ = .;
> > . = . + 0x03BC;
> > __stack_irq_top__ = .;
> > __stack_fiq_bottom__ = .;
> > . = . + 0x0004;
> > __stack_fiq_top__ = .;
> > __stack_und_bottom__ = .;
> > . = . + 0x0004;
> > __stack_und_top__ = .;
> > __stack_iap_bottom__ = .;
> > } >ramstack
> >
> > usbramlayout :
> > {
> > __usbram_start__ = .;
> > __usbram_end__ = 0x4000;
> > } >usbram
> >
> > ethramlayout :
> > {
> > __ethram_start__ = .;
> > __ethram_end__ = 0x4000;
> > } > ethram
> > -------------------------------end of file--------------
> >
> >
> >
> > Please tell me the modifications I have to carry out.
> >
> > Thanks and with regards,
> > - Nagi
> >
> >
> > --- In l..., "mikkel.kristiansen"
> > wrote:
> > >
> > > I had success making a FreeRTOS LPC2387 port from the LPC2368
> > > Eclipse port.
> > > One thing that I needed to do was to make sure _bss_end was set
> > > correct in LPC2368.ld file.
> > >
> > > . = ALIGN(32 / 8); //line 44
> > > _bss_end__ = . ; __bss_end__ = . ; //this must be moved
> > > from the button part to line 45
> > >
> > > You can test the _bss_end__ in the *.map file � it must be
> within
> > > RAM area. If it's outside RAM area the boot ram initialisation
> loop
> > > will run forever.
> > >
> > > The correct configPINSEL2_VALUE value must be selected.
> > >
> > > Compile with make all and program the MCB2387 board through ISP,
> > > e.g. the "Flash Magic" tool.
> > >
> > > This got me a working port :-)
> > >
> > > Best regards
> > > Mikkel Kristiansen
> > >
> > > PS, note that I'm new to FreeRTOS so my input may not be
> > > the "correct" solution.
> > >
>

An Engineer's Guide to the LPC2100 Series