ts-7000
[Top] [All Lists]

[ts-7000] eCos App - RTC problem

To:
Subject: [ts-7000] eCos App - RTC problem
From: "dbpalan" <>
Date: Fri, 05 Aug 2005 03:15:02 -0000
After modifying the ROMRAM pkgconf to RAM pkgconf, and tracing of
"Hello eCos World!" eCos App, I found that the RTC driver was not
implemented in eCos in TS72xx / EP93xx branch.  So that it will be
dead loop in the RTC functions, before visiting the real lines of
"Hello eCos World!"

Does anyone have different results to build a eCos App without
disabling RTC implementation in eCos configuration?

The following are the code I found will cause dead loop if enabled RTC
support in eCos:

=========================================
ts7200_misc.h
=========================================
...
void hal_clock_initialize(cyg_uint32 period)
{
    while(1);
}
...
externC void hal_clock_reset(cyg_uint32 vector, cyg_uint32 period)
{
    while(1);
}
...
void hal_clock_read(cyg_uint32 *pvalue)
{
    while(1);
}
...
=========================================





The following are details of steps to do to build a RAM pkgconf eCos
App:

1. Modify a set of RAM pkgconf from ROMRAM pkgconf, main idea is to
remove all ROM region and set the RAM starting address to some higher
location (0x80000 here), since the original RAM address was occupied
by Redboot already.  The files is found / placed in the path
ecos/packages/hal/arm/arm9/ts7200/v_2.0/include/pkgconf:

=========================================
mlt_arm_arm9_ts7200_ram.h
=========================================

#include <cyg/infra/cyg_type.h>
#include <pkgconf/hal_arm_arm9_ts7200.h>
#include <stddef.h>

#define CYGMEM_REGION_ram (0)
#define CYGMEM_REGION_ram_SIZE (0x2000000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R |
CYGMEM_REGION_ATTR_W)



extern char CYG_LABEL_NAME (_heap1) [];
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (_heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x2000000 - (size_t) CYG_LABEL_NAME
(_heap1))

=========================================
mlt_arm_arm9_ts7200_ram.ldi
=========================================

#include <pkgconf/hal_arm_arm9_ts7200.h>
#include <cyg/infra/cyg_type.inc>

MEMORY
{
    ram : ORIGIN = 0, LENGTH = 0x2000000
}

SECTIONS
{
    SECTIONS_BEGIN
    SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
    SECTION_rom_vectors (ram, 0x80000, LMA_EQ_VMA)
    SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
    CYG_LABEL_DEFN(_heap1) = ALIGN (0x8);
    SECTIONS_END
}

=========================================
mlt_arm_arm9_ts7200_ram.mlt
=========================================

version 0
region ram 0 2000000 0 !
section fixed_vectors 0 1 0 1 1 0 1 0 20 20 !
section rom_vectors 0 1 0 1 1 1 1 1 80000 80000 text text !
section text 0 4 0 1 0 1 0 1 fini fini !
section fini 0 4 0 1 0 1 0 1 rodata rodata !
section rodata 0 4 0 1 0 1 0 1 rodata1 rodata1 !
section rodata1 0 4 0 1 0 1 0 1 fixup fixup !
section fixup 0 4 0 1 0 1 0 1 gcc_except_table gcc_except_table !
section gcc_except_table 0 4 0 1 0 1 0 1 data data !
section data 0 4 0 1 0 1 0 1 bss bss !
section bss 0 4 0 1 0 1 0 1 heap1 heap1 !
section heap1 0 8 0 0 0 0 0 0 !

=========================================

2. Download, replace and run ecoscentric latest configtool in cygwin,
since the configtool bundled with TS72xx got error in cygwin
environment.

The configtool is downloadable from:
http://www.ecoscentric.com/snapshots/configtool-040623.exe.bz2

3a. In menu, Choose Build -> Template
3b. Choose Hardware -> Technologic Systems TS-7200 boards
3c. Choose Packages -> default
3d. Click OK, choose "Continue" to resolve the conflicts found

4. In the main configuration window, choose eCos HAL -> ARM
architecture -> ARM ARM9 architecture -> Technologic Systems TS-7200
-> Startup type ->"RAM"

5. In the main configuration window, choose eCos kernel -> Counters
and clocks -> Uncheck "Provide real-time clock"

6. In the main configuration window, choose Wallclock device ->
Wallclock implementation -> No wallclock

7. In menu, choose Build -> Library

When finished building the library, we can use it to make the "Hello
eCos World!" eCos App in generic way, and can test the result in GDB
and use redboot to load to board:

RedBoot> load a.out -h 192.168.0.137
Using default protocol (TFTP)
Entry point: 0x00080040, address range: 0x00080000-0x0009b53c
RedBoot> go
Hello World!!






------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hllgvj7/M=362131.6882499.7825260.1510227/D=groups/S=1705005378:TM/Y=YAHOO/EXP=1123218971/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->


Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/



<Prev in Thread] Current Thread [Next in Thread>
  • [ts-7000] eCos App - RTC problem, dbpalan <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU