* [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292)
@ 2006-09-15 20:49 Miklos
2006-09-16 16:57 ` Sergei Gavrikov
0 siblings, 1 reply; 21+ messages in thread
From: Miklos @ 2006-09-15 20:49 UTC (permalink / raw)
To: ecos-discuss; +Cc: Miklos
Hi
I am trying to port Redboot to an Embest LPCEB2000. I am using the Olimex
H2294 port as the base. The main diferences between them are
Embest Olimex
Ext SRAM 256kx16 256kx32
Ext Flash 1Mx16 2Mx16
Ethernet none yes
LCD none yes
uP lpc2292 lpc2294
I changed the linker script to reflect the external ram diference (target.ld
and the rom.ldi file)
I have edited the hal_platform_setup.h, registers BCFG0,1 and PINSEL2 values
changed for my board
I removed ethernet drivers using the configtool
I have edited the mlt_arm_lpc2xxxxolpce2294_rom.h for my ram size
I have changed the clock and pll multiplier (10Mhz x 6) using the configtool
However Redboot does not work. I have checked with scope to see if the Uart
is transmitting at the wrong
baud rate, but there is no activity on bootup
Are there any other changes that I need to make?
Miklos Pflancer
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292)
2006-09-15 20:49 [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292) Miklos
@ 2006-09-16 16:57 ` Sergei Gavrikov
2006-09-18 10:56 ` Miklos.Pflancer
0 siblings, 1 reply; 21+ messages in thread
From: Sergei Gavrikov @ 2006-09-16 16:57 UTC (permalink / raw)
To: Miklos; +Cc: ecos-discuss, Miklos
On Fri, 15 Sep 2006, Miklos wrote:
> Hi
>
> I am trying to port Redboot to an Embest LPCEB2000. I am using the Olimex
> H2294 port as the base. The main diferences between them are
> Embest Olimex
> Ext SRAM 256kx16 256kx32
> Ext Flash 1Mx16 2Mx16
> Ethernet none yes
> LCD none yes
> uP lpc2292 lpc2294
Here you pointed on Olimex LPC-E2294 HW things. That board does have
Ethernet controller and LCD display. In reality, it's better to use eCos
HAL for the Olimex LPC-H2294 board as start point. It is a simple header
board which contains the external SRAM (1Mb) and external Intel flash
(4Mb) parts only. Use OLPH2294 eCos HAL as prototype to get eCos for
your board. There are the ecos packages for the some Olimex LPC2294
based boards there: http://sgs.gomel.by/sg/downloads/olimex/prebuilt.
Get olpch2294-1.0.epk from an olpch2294 folder.
> I changed the linker script to reflect the external ram diference (target.ld
> and the rom.ldi file)
>
> I have edited the hal_platform_setup.h, registers BCFG0,1 and PINSEL2 values
> changed for my board
I suggest to care about SRAM bus timing values, the Olimex LPC-H2294
board does have fast 12nS external SRAM, but possible you have more slow
memory, therefore, check WST1, WST2, RBLE values for your this one. Be
sure what you set bus wide properly too.
> I removed ethernet drivers using the configtool
>
> I have edited the mlt_arm_lpc2xxxxolpce2294_rom.h for my ram size
More code, more mistakes, re-engine your work. Use the olpch2294 HAL.
It has less of code lines than the olpce2294 HAL.
> I have changed the clock and pll multiplier (10Mhz x 6) using the configtool
To do new HAL port with the configtool isn't good idea ;). Setup own
entry in $ECOS_REPOSITORY/hal/arm/lpc2xxx/<your short target name>. Copy
there the olpch2294 HAL files, rename some of them properly and register
your own target in eCos database ($ECOS_REPOSITORY/ecos.db). Then you
will be able to use the configtool for your target as you do it as well.
> However Redboot does not work. I have checked with scope to see if the Uart
> is transmitting at the wrong
> baud rate, but there is no activity on bootup
You have to be able to run the less complex things than RedBoot before.
You have to know what your HAL code works as you expect. SRAM and UART
are only 2 HW parts which need to run the RedBoot.
> Are there any other changes that I need to make?
I don't know about your flash parts too. Possible, you will need in own
flash driver too, may be, there is not a needed thing in the
$ECOS_REPOSITOTY/devs/flash/* branches. Greep ecos.db to kwnow it.
There is the bestseller for every eCos newcomer:
http://ecos.sourceware.org/docs-latest/ref/hal-porting-guide.html on
eCos official web site.
Sergei
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292)
2006-09-16 16:57 ` Sergei Gavrikov
@ 2006-09-18 10:56 ` Miklos.Pflancer
2006-09-18 12:31 ` Sergei Gavrikov
0 siblings, 1 reply; 21+ messages in thread
From: Miklos.Pflancer @ 2006-09-18 10:56 UTC (permalink / raw)
To: Sergei Gavrikov; +Cc: ecos-discuss, Miklos
Hi Segei
Thanks for your help
I have taken your advice and used the olpch2294 as the base for my HAL port.
I have now got a Redboot prompt on my console. However I have the following error
+FLASH: driver init failed: Driver does not support device
Sorry, FLASH config exceeds available space in FIS directory
RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 11:37:54, Sep 18 2006
Platform: Embest LPCEB2000 development board (ARM7TDMI)
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
Copyright (C) 2003, 2004, 2005, 2006 eCosCentric Limited
RAM: 0x81000000-0x81080000, [0x81006f20-0x8107d000] available
FLASH: 0x00000000 - 0x1, 0 blocks of 0x00000000 bytes each.
RedBoot>
At the moment I only want to have driver support for the processors internal flash. How do I achieve this?
Best Regards
Miklos Pflancer
Electronics Engineer
--------------------------------------------------
email : miklos@dbresearch.co.uk
--------------------------------------------------
dB Research Ltd
Concept House
Merton Road
Bootle
Liverpool L20 3BG
UK
Tel (+44)(0)151 330 0800
Fax (+44)(0)151 330 0808
--------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292)
2006-09-18 10:56 ` Miklos.Pflancer
@ 2006-09-18 12:31 ` Sergei Gavrikov
2006-09-19 8:28 ` Miklos.Pflancer
0 siblings, 1 reply; 21+ messages in thread
From: Sergei Gavrikov @ 2006-09-18 12:31 UTC (permalink / raw)
To: Miklos.Pflancer; +Cc: ecos-discuss, Miklos
On Mon, 18 Sep 2006, Miklos.Pflancer@dBResearch.co.uk wrote:
> Hi Segei
>
> Thanks for your help
>
> I have taken your advice and used the olpch2294 as the base for my HAL port.
>
> I have now got a Redboot prompt on my console. However I have the following error
>
> +FLASH: driver init failed: Driver does not support device
> Sorry, FLASH config exceeds available space in FIS directory
>
> RedBoot(tm) bootstrap and debug environment [ROM]
> Non-certified release, version UNKNOWN - built 11:37:54, Sep 18 2006
>
> Platform: Embest LPCEB2000 development board (ARM7TDMI)
> Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
> Copyright (C) 2003, 2004, 2005, 2006 eCosCentric Limited
>
> RAM: 0x81000000-0x81080000, [0x81006f20-0x8107d000] available
> FLASH: 0x00000000 - 0x1, 0 blocks of 0x00000000 bytes each.
> RedBoot>
I think, it's normal. My redboot_ROM.ecm config for olpch2294 contains
support for an Intel 28F320C3 part:
package -hardware CYGPKG_DEVS_FLASH_INTEL_28FXXX v1_0 ;
cdl_option CYGHWR_DEVS_FLASH_INTEL_28F320C3 {
inferred_value 1
};
but, it looks like that's unneeded for your hardware. You have to write
own flash package instead my CYGPKG_DEVS_FLASH_ARM_OLPCH2294 and remove
the reference on these things from your own target:
CYGPKG_DEVS_FLASH_INTEL_28FXXX
CYGPKG_DEVS_FLASH_ARM_OLPCH2294
But just now, build own minimal RedBoot image and the redboot_ROM.ecm
file for own hardware (without Flash support):
ecosconfig new <your_target_name> redboot
cat >redboot_ROM.ecm<<__eof
cdl_component CYG_HAL_STARTUP {user_value ROM};
__eof
ecosconfig import redboot_ROM.ecm
ecosconfig resolve
ecosconfig export redboot_ROM.ecm
ecosconfig tree
make
With such a command set, you'll build minimal redboot.elf (without FIS
support). Burn and use it, and don't forget to copy that exported
`redboot_ROM.ecm' file in your `misc' directory to use it a long while.
> At the moment I only want to have driver support for the processors internal flash. How do I achieve this?
So far, it's better to hold the RedBoot there (i.e. in the on-chip flash
memory) and using the RedBoot, load your apps in RAM via x/y modem or
using a GDB. Next what you have to achive, it's to setup up the FIS for
your external flash memory parts. If you are sorry about rest of the
on-chip flash place now, in fact, when you'll finish a debugging your
application in RAM, you'll be able to place its code in the on-chip
flash memory then.
Sergei
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292)
2006-09-18 12:31 ` Sergei Gavrikov
@ 2006-09-19 8:28 ` Miklos.Pflancer
2006-09-19 8:46 ` Andrew Lunn
0 siblings, 1 reply; 21+ messages in thread
From: Miklos.Pflancer @ 2006-09-19 8:28 UTC (permalink / raw)
To: Sergei Gavrikov; +Cc: ecos-discuss, Miklos
Hi Segei
Once again thanks for your help, I now have Redboot working without flash support. However I would like to implement flash support for my board. My board contains Atmel AT49 flash memory. I have tried using the configtools to include this in my ecos project but I get the following message from configtool
'Add and remove hardware packages by selecting a new hardware template'
Any ideas on how I can do this?
Thanks
Miklos Pflancer
Electronics Engineer
--------------------------------------------------
email : miklos@dbresearch.co.uk
--------------------------------------------------
dB Research Ltd
Concept House
Merton Road
Bootle
Liverpool L20 3BG
UK
Tel (+44)(0)151 330 0800
Fax (+44)(0)151 330 0808
--------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292)
2006-09-19 8:28 ` Miklos.Pflancer
@ 2006-09-19 8:46 ` Andrew Lunn
2006-09-19 11:30 ` Miklos.Pflancer
0 siblings, 1 reply; 21+ messages in thread
From: Andrew Lunn @ 2006-09-19 8:46 UTC (permalink / raw)
To: Miklos.Pflancer; +Cc: ecos-discuss
On Tue, Sep 19, 2006 at 09:30:16AM +0100, Miklos.Pflancer@dBResearch.co.uk wrote:
> Hi Segei
>
> Once again thanks for your help, I now have Redboot working without flash support. However I would like to implement flash support for my board. My board contains Atmel AT49 flash memory. I have tried using the configtools to include this in my ecos project but I get the following message from configtool
>
> 'Add and remove hardware packages by selecting a new hardware template'
>
> Any ideas on how I can do this?
You need to add the flash package to your target in the ecos.db file. eg
The AT91 eb40 target is:
target eb40a {
alias { "Atmel evaluation board (EB40A)" at91_eb40a }
packages { CYGPKG_HAL_ARM
CYGPKG_HAL_ARM_AT91
CYGPKG_HAL_ARM_AT91_EB40A
CYGPKG_DEVS_FLASH_EB40A
CYGPKG_DEVS_FLASH_ATMEL_AT49XXXX
CYGPKG_IO_SERIAL_ARM_AT91
CYGPKG_DEVICES_WATCHDOG_ARM_AT91
}
description "
The eb40a target provides the packages needed to run eCos on an Atmel
evaluation board (EB40A)."
}
Here you see the generic AT49XXXX package and the board specific
CYGPKG_DEVS_FLASH_EB40A package. You will need to write the board
specific package for your particular board. You might want to use the
EB40A code as an template, /packages/devs/flash/arm/eb40a/current/
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292)
2006-09-19 8:46 ` Andrew Lunn
@ 2006-09-19 11:30 ` Miklos.Pflancer
2006-09-19 12:02 ` Andrew Lunn
0 siblings, 1 reply; 21+ messages in thread
From: Miklos.Pflancer @ 2006-09-19 11:30 UTC (permalink / raw)
To: Andrew Lunn; +Cc: ecos-discuss
Thanks Andrew
I think I have FIS support now, thanks for your advice.
I still have a problems executing code loaded using GDB when interrupts are enabled. GDB hangs and so does my code.when it hits the line of code which enables interrupts
Any idea why this might be the case?
Best Regards
Miklos Pflancer
Electronics Engineer
--------------------------------------------------
email : miklos@dbresearch.co.uk
--------------------------------------------------
dB Research Ltd
Concept House
Merton Road
Bootle
Liverpool L20 3BG
UK
Tel (+44)(0)151 330 0800
Fax (+44)(0)151 330 0808
--------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292)
2006-09-19 11:30 ` Miklos.Pflancer
@ 2006-09-19 12:02 ` Andrew Lunn
2006-09-19 14:29 ` Miklos.Pflancer
0 siblings, 1 reply; 21+ messages in thread
From: Andrew Lunn @ 2006-09-19 12:02 UTC (permalink / raw)
To: Miklos.Pflancer; +Cc: ecos-discuss
On Tue, Sep 19, 2006 at 12:30:56PM +0100, Miklos.Pflancer@dBResearch.co.uk wrote:
> Thanks Andrew
>
> I think I have FIS support now, thanks for your advice.
>
> I still have a problems executing code loaded using GDB when
> interrupts are enabled. GDB hangs and so does my code.when it hits
> the line of code which enables interrupts
>
> Any idea why this might be the case?
Presumably some device is generating an interrupt. Check the AIC and
see which device has an interrupt pending.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292)
2006-09-19 12:02 ` Andrew Lunn
@ 2006-09-19 14:29 ` Miklos.Pflancer
2006-09-19 14:59 ` Andrew Lunn
0 siblings, 1 reply; 21+ messages in thread
From: Miklos.Pflancer @ 2006-09-19 14:29 UTC (permalink / raw)
To: Andrew Lunn; +Cc: ecos-discuss
Hi Andrew
Ive been looking in the hal_platform_setup and it seems as though
Redboot copies the first 64 bytes of vectors to internal SRAM. An
then remaps the vectors to internal SRAM.
What then happens if an interrupt occurs in my code, How is it
handled by Redboot.
Should I copy by vectors to this location?
I am a bit confused
Hope you can help
Best regards
Miklos Pflancer
Electronics Engineer
--------------------------------------------------
email : miklos@dbresearch.co.uk
--------------------------------------------------
dB Research Ltd
Concept House
Merton Road
Bootle
Liverpool L20 3BG
UK
Tel (+44)(0)151 330 0800
Fax (+44)(0)151 330 0808
--------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292)
2006-09-19 14:29 ` Miklos.Pflancer
@ 2006-09-19 14:59 ` Andrew Lunn
2006-09-20 3:14 ` [ECOS] Is it possible to debug assembly code on source level? wang cui
2006-09-20 14:52 ` [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292) Miklos.Pflancer
0 siblings, 2 replies; 21+ messages in thread
From: Andrew Lunn @ 2006-09-19 14:59 UTC (permalink / raw)
To: Miklos.Pflancer; +Cc: eCos Disuss
On Tue, Sep 19, 2006 at 03:29:56PM +0100, Miklos.Pflancer@dBResearch.co.uk wrote:
> Hi Andrew
>
> Ive been looking in the hal_platform_setup and it seems as though
> Redboot copies the first 64 bytes of vectors to internal SRAM. An
> then remaps the vectors to internal SRAM.
>
> What then happens if an interrupt occurs in my code, How is it
> handled by Redboot.
>
> Should I copy by vectors to this location?
>
> I am a bit confused
Is you application an eCos application? If so eCos will do this
itself.
However if you are writing a standalone application which does not use
eCos, you have to look after interrupts yourself.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* [ECOS] Is it possible to debug assembly code on source level?
2006-09-19 14:59 ` Andrew Lunn
@ 2006-09-20 3:14 ` wang cui
2006-09-20 9:47 ` [ECOS] How to integrate two different 16x5x DUART hardware into a application? wang cui
2006-10-01 16:51 ` [ECOS] Is it possible to debug assembly code on source level? Bart Veer
2006-09-20 14:52 ` [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292) Miklos.Pflancer
1 sibling, 2 replies; 21+ messages in thread
From: wang cui @ 2006-09-20 3:14 UTC (permalink / raw)
To: ecos-discuss
As I debug code by GNU Insight debugger, it works good when debug C/C++
code. But if I steps into assembly code segment, it only shows assembly
without any cross information with original assembly source file(like
vectors.s, etc.).
Althouth I can look over the assembly source outside the debugger and find
out what is running. I think it is not convenience(since there are lots of
#ifdef in the assembly source).
Can't Insight debug on assembly source level?
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* [ECOS] How to integrate two different 16x5x DUART hardware into a application?
2006-09-20 3:14 ` [ECOS] Is it possible to debug assembly code on source level? wang cui
@ 2006-09-20 9:47 ` wang cui
2006-09-20 10:08 ` Andrew Lunn
2006-10-01 16:51 ` [ECOS] Is it possible to debug assembly code on source level? Bart Veer
1 sibling, 1 reply; 21+ messages in thread
From: wang cui @ 2006-09-20 9:47 UTC (permalink / raw)
To: ecos-discuss
On my target board, I use LPC2220 as processor, there is another Phlips
16C2550B DUART chip.
In my application, I should make use of 4 UART channels.
As I looked over the serial infrastructure of eCos, I think it is hard to
use the "16x5x generic serial device drivers" for both chip concurrently.
1. The "ser_16x5x.c" rely on a "CYGDAT_IO_SERIAL_GENERIC_16X5X_INL", and
this macro has been defined in "ARM LPC2XXX serial device drivers" package.
How to add 16C2550B's description info to "ser_16x5x.c"?
2. "ser_16x5x.c" use "CYGPRI_IO_SERIAL_GENERIC_16X5X_STEP" macro to reflect
delta of UART registers. In LPC2XXX, the UART's register step is 4 bytes,
while on my target board, 16C2550B has been designed with register step 2
bytes. How to solve this condition?
Thanks.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] How to integrate two different 16x5x DUART hardware into a application?
2006-09-20 9:47 ` [ECOS] How to integrate two different 16x5x DUART hardware into a application? wang cui
@ 2006-09-20 10:08 ` Andrew Lunn
2006-09-22 2:18 ` [ECOS] "RedBoot" configuration appears in "default" template? wang cui
0 siblings, 1 reply; 21+ messages in thread
From: Andrew Lunn @ 2006-09-20 10:08 UTC (permalink / raw)
To: wang cui; +Cc: ecos-discuss
On Wed, Sep 20, 2006 at 09:47:42AM +0000, wang cui wrote:
> On my target board, I use LPC2220 as processor, there is another Phlips
> 16C2550B DUART chip.
> In my application, I should make use of 4 UART channels.
>
> As I looked over the serial infrastructure of eCos, I think it is hard to
> use the "16x5x generic serial device drivers" for both chip concurrently.
> 1. The "ser_16x5x.c" rely on a "CYGDAT_IO_SERIAL_GENERIC_16X5X_INL", and
> this macro has been defined in "ARM LPC2XXX serial device drivers" package.
> How to add 16C2550B's description info to "ser_16x5x.c"?
> 2. "ser_16x5x.c" use "CYGPRI_IO_SERIAL_GENERIC_16X5X_STEP" macro to reflect
> delta of UART registers. In LPC2XXX, the UART's register step is 4 bytes,
> while on my target board, 16C2550B has been designed with register step 2
> bytes. How to solve this condition?
A quick and dirty solution would be to duplicate the
CYGPKG_IO_SERIAL_GENERIC_16X5X package. I.E. make a second copy with
the name CYGPKG_IO_SERIAL_GENERIC_16X5X_DUP and rename all the CDL
variables in the second copy in the same way.
Doing a clean solution so that one instance of the driver can drive
multiple 16x5 chips is going to take quiet a bit of work.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292)
2006-09-19 14:59 ` Andrew Lunn
2006-09-20 3:14 ` [ECOS] Is it possible to debug assembly code on source level? wang cui
@ 2006-09-20 14:52 ` Miklos.Pflancer
1 sibling, 0 replies; 21+ messages in thread
From: Miklos.Pflancer @ 2006-09-20 14:52 UTC (permalink / raw)
To: Andrew Lunn; +Cc: eCos Disuss
Hi Andrew
I still thinks there is a problem with the gdb stubs in redboot. I
can load and run a standalone application which uses interrupts into
external ram using gdb, however If I set breakpoints or try to
single step the application stops and gdb becomes unresponsive.
I can burn the same application into flash and load with Redboot and
this works fine.
I was wondering if there are options in the configtool which should
be selected but are'nt. I am not familiar with many of these
settings.
Best Regards
Miklos
> On Tue, Sep 19, 2006 at 03:29:56PM +0100,
Miklos.Pflancer@dBResearch.co.uk wrote:
> > Hi Andrew
> >
> > Ive been looking in the hal_platform_setup and it seems as though
> > Redboot copies the first 64 bytes of vectors to internal SRAM. An
> > then remaps the vectors to internal SRAM.
> >
> > What then happens if an interrupt occurs in my code, How is it
> > handled by Redboot.
> >
> > Should I copy by vectors to this location?
> >
> > I am a bit confused
>
> Is you application an eCos application? If so eCos will do this
> itself.
>
> However if you are writing a standalone application which does not
use
> eCos, you have to look after interrupts yourself.
>
> Andrew
>
Miklos Pflancer
Electronics Engineer
--------------------------------------------------
email : miklos@dbresearch.co.uk
--------------------------------------------------
dB Research Ltd
Concept House
Merton Road
Bootle
Liverpool L20 3BG
UK
Tel (+44)(0)151 330 0800
Fax (+44)(0)151 330 0808
--------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* [ECOS] "RedBoot" configuration appears in "default" template?
2006-09-20 10:08 ` Andrew Lunn
@ 2006-09-22 2:18 ` wang cui
2006-09-22 5:04 ` [ECOS] Can I also generate other outputs of gcc when build? wang cui
0 siblings, 1 reply; 21+ messages in thread
From: wang cui @ 2006-09-22 2:18 UTC (permalink / raw)
To: ecos-discuss
For example:
1.use "eCos Configuration Tool" to new a project
2.choose "Build->Templates..."
3."Hardware" = "Olimex evaluation board LPC-P2106 "; "Packages" =
"default", then OK
In the configuration tree, there appears "Redboot for ARM options" and
"Redboot HAL options". Of course, there are disabled.
Although it can be built successfuly, I think it is confused and
unreasonable. :(
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* [ECOS] Can I also generate other outputs of gcc when build?
2006-09-22 2:18 ` [ECOS] "RedBoot" configuration appears in "default" template? wang cui
@ 2006-09-22 5:04 ` wang cui
2006-09-22 9:47 ` Gary Thomas
0 siblings, 1 reply; 21+ messages in thread
From: wang cui @ 2006-09-22 5:04 UTC (permalink / raw)
To: ecos-discuss
As eCos Configuration Tool generate ".o" file for each source file
defaultly.
Manytimes I need to check the preprocessed output(sometimes compiled
assembly output) of source file.
By now, I have to manually call gcc, in a bash shell, with a additional "-E
-o xxx.i" option to generate the preprocessed output for check.
For example:
arm-elf-gcc -c
-I/ecos-c/cygwin/opt/development/project/cpu_4c_lib/lib_install/include
-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current
-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src
-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/tests
-I. -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/
-finline-limit=7000 -mcpu=arm7tdmi -mno-short-load-words -Wall
-Wpointer-arith -Wstrict-prototypes -Winline -Wundef -g -O0
-ffunction-sections -fdata-sections -fno-exceptions
-Wp,-MD,src/ser_16x5x.tmp -E -o src/devs_serial_generic_16x5x_ser_16x5x.i
/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c
So I am asking can I do something to let eCos Configuration Tool generate
NOT ONLY ".o", BUT ALSO other outputs(.i, .s, etc.)?
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Can I also generate other outputs of gcc when build?
2006-09-22 5:04 ` [ECOS] Can I also generate other outputs of gcc when build? wang cui
@ 2006-09-22 9:47 ` Gary Thomas
2006-09-25 4:03 ` wang cui
0 siblings, 1 reply; 21+ messages in thread
From: Gary Thomas @ 2006-09-22 9:47 UTC (permalink / raw)
To: wang cui; +Cc: ecos-discuss
wang cui wrote:
> As eCos Configuration Tool generate ".o" file for each source file
> defaultly. Manytimes I need to check the preprocessed output(sometimes
> compiled assembly output) of source file.
>
> By now, I have to manually call gcc, in a bash shell, with a additional
> "-E -o xxx.i" option to generate the preprocessed output for check.
>
> For example:
> arm-elf-gcc -c
> -I/ecos-c/cygwin/opt/development/project/cpu_4c_lib/lib_install/include
> -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current
> -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src
> -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/tests
> -I.
> -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/
> -finline-limit=7000 -mcpu=arm7tdmi -mno-short-load-words -Wall
> -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -g -O0
> -ffunction-sections -fdata-sections -fno-exceptions
> -Wp,-MD,src/ser_16x5x.tmp -E -o
> src/devs_serial_generic_16x5x_ser_16x5x.i
> /opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c
>
>
>
> So I am asking can I do something to let eCos Configuration Tool
> generate NOT ONLY ".o", BUT ALSO other outputs(.i, .s, etc.)?
Just add "-save-outputs" to your global GCC options.
Note: I normally do this by hand for the file(s) I'm interested in as
turning it on in a build tree will create tons of files, some of which
can be quite large...
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Can I also generate other outputs of gcc when build?
2006-09-22 9:47 ` Gary Thomas
@ 2006-09-25 4:03 ` wang cui
2006-09-26 1:51 ` wang cui
0 siblings, 1 reply; 21+ messages in thread
From: wang cui @ 2006-09-25 4:03 UTC (permalink / raw)
To: gary; +Cc: ecos-discuss
Thanks, but "-save-outputs" seems unrecognized when invoke arm-elf-gcc.
For example:
arm-elf-gcc -c
-I/ecos-c/cygwin/opt/development/project/cpu_4c_lib/lib_install/include
-I/opt/development/ecos/packages/language/c/libc/string/current
-I/opt/development/ecos/packages/language/c/libc/string/current/src
-I/opt/development/ecos/packages/language/c/libc/string/current/tests -I.
-I/opt/development/ecos/packages/language/c/libc/string/current/src/
-finline-limit=7000 -mcpu=arm7tdmi -mno-short-load-words -Wall
-Wpointer-arith -Winline -Wundef -Woverloaded-virtual -g -O0
-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions
-save-outputs -Wp,-MD,src/strcoll.tmp -o
src/language_c_libc_string_strcoll.o
/opt/development/ecos/packages/language/c/libc/string/current/src/strcoll.cxx
arm-elf-gcc: unrecognized option `-save-outputs'
I am using the prebuilt arm-elf-gcc from eCosCentric, the version is 3.2.1
>From: Gary Thomas <gary@mlbassoc.com>
>To: wang cui <iucgnaw@msn.com>
>CC: ecos-discuss@ecos.sourceware.org
>Subject: Re: [ECOS] Can I also generate other outputs of gcc when build?
>Date: Fri, 22 Sep 2006 03:47:42 -0600
>
>wang cui wrote:
> > As eCos Configuration Tool generate ".o" file for each source file
> > defaultly. Manytimes I need to check the preprocessed output(sometimes
> > compiled assembly output) of source file.
> >
> > By now, I have to manually call gcc, in a bash shell, with a additional
> > "-E -o xxx.i" option to generate the preprocessed output for check.
> >
> > For example:
> > arm-elf-gcc -c
> > -I/ecos-c/cygwin/opt/development/project/cpu_4c_lib/lib_install/include
> > -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current
> > -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src
> >
-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/tests
> > -I.
> > -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/
> > -finline-limit=7000 -mcpu=arm7tdmi -mno-short-load-words -Wall
> > -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -g -O0
> > -ffunction-sections -fdata-sections -fno-exceptions
> > -Wp,-MD,src/ser_16x5x.tmp -E -o
> > src/devs_serial_generic_16x5x_ser_16x5x.i
> >
/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c
> >
> >
> >
> > So I am asking can I do something to let eCos Configuration Tool
> > generate NOT ONLY ".o", BUT ALSO other outputs(.i, .s, etc.)?
>
>Just add "-save-outputs" to your global GCC options.
>
>Note: I normally do this by hand for the file(s) I'm interested in as
>turning it on in a build tree will create tons of files, some of which
>can be quite large...
>
>--
>------------------------------------------------------------
>Gary Thomas | Consulting for the
>MLB Associates | Embedded world
>------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Can I also generate other outputs of gcc when build?
2006-09-25 4:03 ` wang cui
@ 2006-09-26 1:51 ` wang cui
0 siblings, 0 replies; 21+ messages in thread
From: wang cui @ 2006-09-26 1:51 UTC (permalink / raw)
To: ecos-discuss
However, I have done it by add make steps to the
"\packages\pkgconf\rules.mak". Such as:
%.o.d : %.c
ifeq ($(HOST),CYGWIN)
@mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
else
@mkdir -p $(dir $@)
endif
$(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(ACTUAL_CFLAGS)
-Wp,-MD,$(@:.o.d=.tmp) -E -o $(dir $@)$(OBJECT_PREFIX)_$(notdir
$(@:.o.d=.i)) $<
$(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(ACTUAL_CFLAGS)
-Wp,-MD,$(@:.o.d=.tmp) -o $(dir $@)$(OBJECT_PREFIX)_$(notdir $(@:.o.d=.o))
$<
@sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.o.d=.tmp) > $@
@rm $(@:.o.d=.tmp)
So it can generate ".i" file for every ".c".
Thanks!
>From: "wang cui" <iucgnaw@msn.com>
>To: gary@mlbassoc.com
>CC: ecos-discuss@ecos.sourceware.org
>Subject: Re: [ECOS] Can I also generate other outputs of gcc when build?
>Date: Mon, 25 Sep 2006 04:02:55 +0000
>
>Thanks, but "-save-outputs" seems unrecognized when invoke
>arm-elf-gcc.
>For example:
>arm-elf-gcc -c
>-I/ecos-c/cygwin/opt/development/project/cpu_4c_lib/lib_install/include
>-I/opt/development/ecos/packages/language/c/libc/string/current
>-I/opt/development/ecos/packages/language/c/libc/string/current/src
>-I/opt/development/ecos/packages/language/c/libc/string/current/tests
>-I.
>-I/opt/development/ecos/packages/language/c/libc/string/current/src/
>-finline-limit=7000 -mcpu=arm7tdmi -mno-short-load-words -Wall
>-Wpointer-arith -Winline -Wundef -Woverloaded-virtual -g -O0
>-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions
>-save-outputs -Wp,-MD,src/strcoll.tmp -o
>src/language_c_libc_string_strcoll.o
>/opt/development/ecos/packages/language/c/libc/string/current/src/strcoll.cxx
>
>arm-elf-gcc: unrecognized option `-save-outputs'
>
>I am using the prebuilt arm-elf-gcc from eCosCentric, the version is
>3.2.1
>
>
>
>>From: Gary Thomas <gary@mlbassoc.com>
>>To: wang cui <iucgnaw@msn.com>
>>CC: ecos-discuss@ecos.sourceware.org
>>Subject: Re: [ECOS] Can I also generate other outputs of gcc when
>>build?
>>Date: Fri, 22 Sep 2006 03:47:42 -0600
>>
>>wang cui wrote:
>> > As eCos Configuration Tool generate ".o" file for each source
>>file
>> > defaultly. Manytimes I need to check the preprocessed
>>output(sometimes
>> > compiled assembly output) of source file.
>> >
>> > By now, I have to manually call gcc, in a bash shell, with a
>>additional
>> > "-E -o xxx.i" option to generate the preprocessed output for
>>check.
>> >
>> > For example:
>> > arm-elf-gcc -c
>> >
>>-I/ecos-c/cygwin/opt/development/project/cpu_4c_lib/lib_install/include
>> >
>>-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current
>> >
>>-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src
>> >
>-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/tests
>> > -I.
>> >
>>-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/
>> > -finline-limit=7000 -mcpu=arm7tdmi -mno-short-load-words -Wall
>> > -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -g -O0
>> > -ffunction-sections -fdata-sections -fno-exceptions
>> > -Wp,-MD,src/ser_16x5x.tmp -E -o
>> > src/devs_serial_generic_16x5x_ser_16x5x.i
>> >
>/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c
>
>> >
>> >
>> >
>> > So I am asking can I do something to let eCos Configuration Tool
>> > generate NOT ONLY ".o", BUT ALSO other outputs(.i, .s, etc.)?
>>
>>Just add "-save-outputs" to your global GCC options.
>>
>>Note: I normally do this by hand for the file(s) I'm interested in
>>as
>>turning it on in a build tree will create tons of files, some of
>>which
>>can be quite large...
>>
>>--
>>------------------------------------------------------------
>>Gary Thomas | Consulting for the
>>MLB Associates | Embedded world
>>------------------------------------------------------------
>
>
>
>--
>Before posting, please read the FAQ:
>http://ecos.sourceware.org/fom/ecos
>and search the list archive:
>http://ecos.sourceware.org/ml/ecos-discuss
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [ECOS] Is it possible to debug assembly code on source level?
2006-09-20 3:14 ` [ECOS] Is it possible to debug assembly code on source level? wang cui
2006-09-20 9:47 ` [ECOS] How to integrate two different 16x5x DUART hardware into a application? wang cui
@ 2006-10-01 16:51 ` Bart Veer
2006-10-20 9:02 ` [ECOS] CYG_ASSERTCLASS() fail when use wallclock->dallas->ds1307 device driver Wang Cui
1 sibling, 1 reply; 21+ messages in thread
From: Bart Veer @ 2006-10-01 16:51 UTC (permalink / raw)
To: iucgnaw; +Cc: ecos-discuss
>>>>> " " == wang cui <iucgnaw@msn.com> writes:
> As I debug code by GNU Insight debugger, it works good when
> debug C/C++ code. But if I steps into assembly code segment, it
> only shows assembly without any cross information with original
> assembly source file(like vectors.s, etc.). Althouth I can look
> over the assembly source outside the debugger and find out what
> is running. I think it is not convenience(since there are lots
> of #ifdef in the assembly source). Can't Insight debug on
> assembly source level?
The debugger can only show information such as the source file and
line number if the ELF executable contains the appropriate debug
information. If you compile some C code with -S -g and look at the
assembler code produced you will see lots of debug-related directives
like .type, .file and .loc. It is these which end up allowing the
debugger to do its work.
For hand-written assembly code the assembler does not generate such
directives automatically. Doing so would be quite hard. Assembler
source code can be an arbitrary mixture of code and data interleaved
in various ways, so the assembler has no easy way of knowing what
debug info it should generate.
Instead if you want source-level debugging of assembler code then you
will need to add the appropriate debug directives into that code. Just
specifying .type on a function entry point seems to be enough to get
the filename into the executable. To get line numbers into the debug
info you will probably need a .debug_line section and .file and .loc
directives, but I do not know the details.
Bart
--
Bart Veer eCos Configuration Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
* [ECOS] CYG_ASSERTCLASS() fail when use wallclock->dallas->ds1307 device driver
2006-10-01 16:51 ` [ECOS] Is it possible to debug assembly code on source level? Bart Veer
@ 2006-10-20 9:02 ` Wang Cui
0 siblings, 0 replies; 21+ messages in thread
From: Wang Cui @ 2006-10-20 9:02 UTC (permalink / raw)
To: ecos-discuss
Hi, all
As I use the ds1307 driver on my target, I configure to use the generic
I2C API to access the ds1307 chip.
the application failed in a assertion. I debugged it and find the cause, see
the call stack below:
-cyg_hal_invoke_constructors()
-Cyg_WallClock::Cyg_WallClock()
-init_hw_seconds()
-init_ds_hwclock()
-DS_GET()
-cyg_i2c_transaction_begin()
-cyg_mutex_lock()
-Cyg_Mutex::lock()
-CYG_ASSERTCLASS( this, "Bad this pointer");
- Cyg_Mutex::check_this()
-line198: if( locked && owner == NULL ) return false;
Here, 'owner' of the mutex is NULL, cause assertion failed.
Since the driver is initialized in class construction stage before scheduler
runs, there is no thread context yet, then the owner is a 'NULL' thread.
So how to handle it?
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2006-10-20 9:02 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-15 20:49 [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292) Miklos
2006-09-16 16:57 ` Sergei Gavrikov
2006-09-18 10:56 ` Miklos.Pflancer
2006-09-18 12:31 ` Sergei Gavrikov
2006-09-19 8:28 ` Miklos.Pflancer
2006-09-19 8:46 ` Andrew Lunn
2006-09-19 11:30 ` Miklos.Pflancer
2006-09-19 12:02 ` Andrew Lunn
2006-09-19 14:29 ` Miklos.Pflancer
2006-09-19 14:59 ` Andrew Lunn
2006-09-20 3:14 ` [ECOS] Is it possible to debug assembly code on source level? wang cui
2006-09-20 9:47 ` [ECOS] How to integrate two different 16x5x DUART hardware into a application? wang cui
2006-09-20 10:08 ` Andrew Lunn
2006-09-22 2:18 ` [ECOS] "RedBoot" configuration appears in "default" template? wang cui
2006-09-22 5:04 ` [ECOS] Can I also generate other outputs of gcc when build? wang cui
2006-09-22 9:47 ` Gary Thomas
2006-09-25 4:03 ` wang cui
2006-09-26 1:51 ` wang cui
2006-10-01 16:51 ` [ECOS] Is it possible to debug assembly code on source level? Bart Veer
2006-10-20 9:02 ` [ECOS] CYG_ASSERTCLASS() fail when use wallclock->dallas->ds1307 device driver Wang Cui
2006-09-20 14:52 ` [ECOS] Port eCos Redboot Olimex LPC2294 to Embest LPCEB2000 (lpc2292) Miklos.Pflancer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).