This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ecos+sample application in at91sam7x256


Hello,

This was solved.. Firstly, the main was not recognized beacause I was
using minimal configuration of ecos, which does not include c library.
Using default configuration, for instance, the main is found.

The main problem was, however, that the program was looping in
wait_pmc_sr_2 in hal_platform_setup.h. There, it was waiting the PLL
to become locked, which never happened. I changed the ecos default PLL
divider value (24) and PLL multiplier value (125) to values used in
Atmel's getting started example (divider=14, multiplier=73). Now it's
working fine.

Thanks

-mika

2008/12/19 Peter Niebert <peter@niebert.com>:
> It is not all easy to get the first hello world running :-/
>
> Don't know your precise setup, but still the symptom sounds like one
> concerning the compilation process rather than the communication with the
> board.
>
> Stupid questions : are you sure you set the "-g" flag in compilation?
>
>
> Le 19 déc. 08 à 18:37, Mika Viinikkala a écrit :
>
>> Hello,
>>
>> I'm trying to get started in running eCos in at91sam7x256-ek board. I
>> have configured and built ecos from current sources in anonymous-CVS.
>> I have linked and built the example hello world application,
>> also from cvs. I'm using the toolchain that came with ecos.  The
>> problem is that it seems that when running the application the
>> application newer reach the main. That is, the breakpoint in main is
>> newer hit and, of course, no text is printed in debug port.
>>
>> I'm using JTAG (J-Link from Segger) to download and debug in Eclipse
>> CDT. The GDB is from Yagarto, not the one that came with ecos. When
>> loading in flash and debugging, the output that is listed below is
>> given by gdb.
>>
>> I have also tried to convert the output into a binary by using the
>> objcopy. That binary I have programmed to the device (using both samba
>> and segger's J-Flash) and tried to run, with no result. The terminal
>> connection should be ok, with correct baud rate (38400).
>>
>> Also, I built tests for minimal version of ecos, converted those into
>> binary format, and tried to program and run. The tests give no debug
>> in debug port.
>>
>> Thanks,
>>
>> Mika
>>
>>
>> The output from gdb:
>>
>> source .gdbinit
>> target remote localhost:2331
>> 0x00000000 in ?? ()
>> monitor flash device = AT91SAM7X256
>> Select flash device: AT91SAM7X256
>> monitor flash download = 1
>> Flash download enabled
>> monitor flash breakpoints = 1
>> Flash breakpoints enabled
>> monitor endian little
>> Target endianess set to "little endian"
>> monitor speed 30
>> JTAG speed set to 30 kHz
>> monitor reset 8
>> Resetting target (SAM7 soft reset)
>> monitor sleep 10
>> Sleep 10ms
>> monitor long 0xFFFFFD00 = 0xA5000004
>> Writing 0xA5000004 @ address 0xFFFFFD00
>> monitor writeu32 0xFFFFFD44 = 0x00008000
>> Writing 0x00008000 @ address 0xFFFFFD44
>> monitor writeu32 0xFFFFFC20 = 0x00000601
>> Writing 0x00000601 @ address 0xFFFFFC20
>> monitor sleep 10
>> Sleep 10ms
>> monitor writeu32 0xFFFFFC2C = 0x00480a0e
>> Writing 0x00480A0E @ address 0xFFFFFC2C
>> monitor sleep 10
>> Sleep 10ms
>> monitor writeu32 0xFFFFFC30 = 0x00000007
>> Writing 0x00000007 @ address 0xFFFFFC30
>> monitor sleep 10
>> Sleep 10ms
>> monitor writeu32 0xFFFFFF60 = 0x00480100
>> Writing 0x00480100 @ address 0xFFFFFF60
>> monitor sleep 100
>> Sleep 100ms
>> monitor speed 12000
>> JTAG speed set to 12000 kHz
>> load
>> Loading section .rom_vectors, size 0x40 lma 0x100000
>> Loading section .text, size 0x1a24 lma 0x100040
>> Loading section .rodata, size 0x100 lma 0x101a64
>> Loading section .data, size 0x21c lma 0x101b64
>> Start address 0x100040, load size 7552
>> Transfer rate: 1843 KB/sec, 1510 bytes/write.
>> break main
>> Function "main" not defined.
>> continue
>>
>> --
>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]