public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] EDB/EP7212 internal SRAM - only 4K of 37.5K seems usa
       [not found] <200008162329.QAA14549@cygnus.com>
@ 2000-08-17  3:56 ` Gary Thomas
  0 siblings, 0 replies; 6+ messages in thread
From: Gary Thomas @ 2000-08-17  3:56 UTC (permalink / raw)
  To: AshCan; +Cc: ecos-discuss

On 16-Aug-2000 AshCan@aol.com wrote:
> I have been able to add the parse changes into my hal_platform_setup.h, but the changes, in macro
> PLATFORM_SETUP1, are not being compiled possibly because my configuration does not have
> CYGSEM_HAL_STATIC_MMU_TABLES enabled, only mmu tables placed in DRAM.
> 
> To make on update of my build I do:
> 
> ecosconfig target edb7xxx
> ecosconfig tree
> make clean
> rm install/lib/target.ld
> rm install/lib/vectors.o
> rm install/lib/extras.o
> make
> 
> What am I missing?
> 

Indeed, these changes will only take affect if you install new stubs.
Sorry I didn't think about that yesterday.

If you want, I can send you [privately] new stubs to install on your
board that will fix the SRAM mapping problem.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] EDB/EP7212 internal SRAM - only 4K of 37.5K seems usa
  2000-08-17 11:23 AshCan
@ 2000-08-17 16:41 ` Gary Thomas
  0 siblings, 0 replies; 6+ messages in thread
From: Gary Thomas @ 2000-08-17 16:41 UTC (permalink / raw)
  To: AshCan; +Cc: ecos-discuss

On 17-Aug-2000 AshCan@aol.com wrote:
> I download the new stubs you sent to flash ROM today, but I am still 
> wondering if the patch changes I made were even compiled.  
> 
> I purposely added errored code and the errors were not detected by the make.  
> 
> 1) I errored the CS7111 and non CS7111 case of SRAM_END with no errors.  
> 
> 2) I errored the PLATFORM_SETUP1 macro and got no errors.  So I am still 
> worried these changes have not taken effect.
> 
> Is it because this code is part of the stub you sent me?
> 

If you are building RAM applications then none of this applies.  Look
carefully at the macro definitions and you'll see:
  // Define startup code [macros]
#if defined(CYGSEM_HAL_INSTALL_MMU_TABLES) && !defined(CYG_HAL_STARTUP_RAM)

In this case, the macros are left empty.

NB: this is because the way the memory is mapped (not 1-1) makes it very
difficult to reprogram the MMU on the fly and thus this operation is only
performed by ROM startup code.

> In a message dated 8/17/00 3:57:00 AM Pacific Daylight Time, 
> gthomas@redhat.com writes:
> 
>> 
>>  On 16-Aug-2000 AshCan@aol.com wrote:
>>  > I have been able to add the parse changes into my hal_platform_setup.h, 
>> but the changes, in macro
>>  > PLATFORM_SETUP1, are not being compiled possibly because my 
> configuration 
>> does not have
>>  > CYGSEM_HAL_STATIC_MMU_TABLES enabled, only mmu tables placed in DRAM.
>>  > 
>>  > To make on update of my build I do:
>>  > 
>>  > ecosconfig target edb7xxx
>>  > ecosconfig tree
>>  > make clean
>>  > rm install/lib/target.ld
>>  > rm install/lib/vectors.o
>>  > rm install/lib/extras.o
>>  > make
>>  > 
>>  > What am I missing?
>>  > 
>>  
>>  Indeed, these changes will only take affect if you install new stubs.
>>  Sorry I didn't think about that yesterday.
>>  
>>  If you want, I can send you [privately] new stubs to install on your
>>  board that will fix the SRAM mapping problem.
>>  
>>  
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] EDB/EP7212 internal SRAM - only 4K of 37.5K seems usa
@ 2000-08-17 11:23 AshCan
  2000-08-17 16:41 ` Gary Thomas
  0 siblings, 1 reply; 6+ messages in thread
From: AshCan @ 2000-08-17 11:23 UTC (permalink / raw)
  To: ecos-discuss

I download the new stubs you sent to flash ROM today, but I am still 
wondering if the patch changes I made were even compiled.  

I purposely added errored code and the errors were not detected by the make.  

1) I errored the CS7111 and non CS7111 case of SRAM_END with no errors.  

2) I errored the PLATFORM_SETUP1 macro and got no errors.  So I am still 
worried these changes have not taken effect.

Is it because this code is part of the stub you sent me?

In a message dated 8/17/00 3:57:00 AM Pacific Daylight Time, 
gthomas@redhat.com writes:

> 
>  On 16-Aug-2000 AshCan@aol.com wrote:
>  > I have been able to add the parse changes into my hal_platform_setup.h, 
> but the changes, in macro
>  > PLATFORM_SETUP1, are not being compiled possibly because my 
configuration 
> does not have
>  > CYGSEM_HAL_STATIC_MMU_TABLES enabled, only mmu tables placed in DRAM.
>  > 
>  > To make on update of my build I do:
>  > 
>  > ecosconfig target edb7xxx
>  > ecosconfig tree
>  > make clean
>  > rm install/lib/target.ld
>  > rm install/lib/vectors.o
>  > rm install/lib/extras.o
>  > make
>  > 
>  > What am I missing?
>  > 
>  
>  Indeed, these changes will only take affect if you install new stubs.
>  Sorry I didn't think about that yesterday.
>  
>  If you want, I can send you [privately] new stubs to install on your
>  board that will fix the SRAM mapping problem.
>  
>  

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [ECOS] EDB/EP7212 internal SRAM - only 4K of 37.5K seems usa
@ 2000-08-16 16:29 AshCan
  0 siblings, 0 replies; 6+ messages in thread
From: AshCan @ 2000-08-16 16:29 UTC (permalink / raw)
  To: ecos-discuss

I have been able to add the parse changes into my hal_platform_setup.h, but the changes, in macro PLATFORM_SETUP1, are not being compiled possibly because my configuration does not have CYGSEM_HAL_STATIC_MMU_TABLES enabled, only mmu tables placed in DRAM.

To make on update of my build I do:

ecosconfig target edb7xxx
ecosconfig tree
make clean
rm install/lib/target.ld
rm install/lib/vectors.o
rm install/lib/extras.o
make

What am I missing?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [ECOS] EDB/EP7212 internal SRAM - only 4K of 37.5K seems usa
@ 2000-08-16 12:40 AshCan
  0 siblings, 0 replies; 6+ messages in thread
From: AshCan @ 2000-08-16 12:40 UTC (permalink / raw)
  To: ecos-discuss

I tried to get this latest fix and it was not there yet so I tried using the patch command and the embedded patch file below.  

The patch failed probably because the version Gary was comparing against was also new and not yet posted.

This is where I was looking for the latest CVS:

http://sources.redhat.com/cgi-bin/cvsweb.cgi/ecos/packages/hal/arm/edb7xxx/current/include/?cvsroot=ecos&only_with_tag=

I also did a full CVS update, but only 1.7 of hal_platform_setup.h was loaded.

What next?

thank you

Dan Ash

In a message dated Wed, 16 Aug 2000  7:05:40 AM Eastern Daylight Time, Gary Thomas <gthomas@redhat.com> writes:

<< 
On 16-Aug-2000 AshCan@aol.com wrote:
> I am using an eCOS build for the Cirrus EP7212 development board.  I need to 
> use the internal SRAM for some time critical data and in my old environment, 
> which is non OS, all 37.5KBytes were available.  
> 
> With eCOS, I noticed my code did not work and so I wrote a program to write 
> sequentially and read back the internal SRAM (virtual and actual adr = 
> 0x60000000).  I am only able to read back the first 4KBytes back as if the 
> remaining 33.5KBytes were not there.  For now I am placing this data in DRAM, 
> but need to use internal SRAM eventually.
> 
> I started looking into possible MMU settings in the HAL include files and 
> memory map configuration files, but I was getting lost, being new to eCOS.  
> 
> 1) I was hoping someone here had an easy answer to what is going on and why.
> 
> 2) Also, how can I read the MMU registers to see what is in there.
> 

Oops, this is something I meant to fix a long time ago :-)  Here's a patch:

Index: hal/arm/edb7xxx/current/include/hal_platform_setup.h
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/hal/arm/edb7xxx/current/include/hal_platform_setup.h,v
retrieving revision 1.10.2.1
diff -u -5 -p -r1.10.2.1 hal_platform_setup.h
--- hal/arm/edb7xxx/current/include/hal_platform_setup.h        2000/08/15 15:45:02     1.10.2.1
+++ hal/arm/edb7xxx/current/include/hal_platform_setup.h        2000/08/16 10:54:57
@@ -102,11 +102,15 @@
 #define PCMCIA0_LA_START 0x40000000
 #define PCMCIA0_PA       0x40000000
 #define PCMCIA1_LA_START 0x50000000
 #define PCMCIA1_PA       0x50000000
 #define SRAM_LA_START    0x60000000
+#ifdef CYGHWR_HAL_ARM_EDB7XXX_VARIANT_CL_PS7111 // 4K SRAM
 #define SRAM_LA_END      0x60001000
+#else  // 72xx - 37.5K SRAM
+#define SRAM_LA_END      0x6000A000
+#endif
 #define SRAM_PA          0x60000000
 #define IO_LA_START      0x80000000
 #define IO_LA_END        0x80003000
 #define IO_PA            0x80000000
 
@@ -352,17 +356,20 @@
 /* SRAM */                                                                   ;\
        ldr     r3,=SRAM_LA_START                                            ;\
        ldr     r4,=MMU_L1_TYPE_Page|MMU_DOMAIN(0)                           ;\
        orr     r4,r4,r2                                                     ;\
        str     r4,[r1],#4                                                   ;\
-       ldr     r4,=MMU_L2_TYPE_Small|MMU_AP_Any|MMU_Bufferable|MMU_Cacheable;\
+       ldr     r7,=MMU_PAGE_SIZE                                            ;\
+        ldr     r5,=SRAM_LA_END                                              ;\
+05:    ldr     r4,=MMU_L2_TYPE_Small|MMU_AP_Any|MMU_Bufferable|MMU_Cacheable;\
        orr     r4,r3,r4                                                     ;\
        str     r4,[r2],#4                                                   ;\
-       ldr     r3,=SRAM_LA_START+MMU_PAGE_SIZE                              ;\
+        add     r3,r3,r7                                                     ;\
+        cmp     r3,r5                                                        ;\
+        bne     05b                                                          ;\
        ldr     r4,=SRAM_LA_START+MMU_SECTION_SIZE                           ;\
        ldr     r5,=MMU_L2_TYPE_Fault                                        ;\
-       ldr     r7,=MMU_PAGE_SIZE                                            ;\
 10:    str     r5,[r2],#4                                                   ;\
        add     r3,r3,r7                                                     ;\
        cmp     r3,r4                                                        ;\
        bne     10b                                                          ;\
        ldr     r4,=IO_LA_START                                              ;\


 >>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [ECOS] EDB/EP7212 internal SRAM - only 4K of 37.5K seems usa
  2000-08-15 23:41 [ECOS] EDB/EP7212 internal SRAM - only 4K of 37.5K seems usable AshCan
@ 2000-08-16  4:03 ` Gary Thomas
  0 siblings, 0 replies; 6+ messages in thread
From: Gary Thomas @ 2000-08-16  4:03 UTC (permalink / raw)
  To: AshCan; +Cc: ecos-discuss

On 16-Aug-2000 AshCan@aol.com wrote:
> I am using an eCOS build for the Cirrus EP7212 development board.  I need to 
> use the internal SRAM for some time critical data and in my old environment, 
> which is non OS, all 37.5KBytes were available.  
> 
> With eCOS, I noticed my code did not work and so I wrote a program to write 
> sequentially and read back the internal SRAM (virtual and actual adr = 
> 0x60000000).  I am only able to read back the first 4KBytes back as if the 
> remaining 33.5KBytes were not there.  For now I am placing this data in DRAM, 
> but need to use internal SRAM eventually.
> 
> I started looking into possible MMU settings in the HAL include files and 
> memory map configuration files, but I was getting lost, being new to eCOS.  
> 
> 1) I was hoping someone here had an easy answer to what is going on and why.
> 
> 2) Also, how can I read the MMU registers to see what is in there.
> 

Oops, this is something I meant to fix a long time ago :-)  Here's a patch:

Index: hal/arm/edb7xxx/current/include/hal_platform_setup.h
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/hal/arm/edb7xxx/current/include/hal_platform_setup.h,v
retrieving revision 1.10.2.1
diff -u -5 -p -r1.10.2.1 hal_platform_setup.h
--- hal/arm/edb7xxx/current/include/hal_platform_setup.h        2000/08/15 15:45:02     1.10.2.1
+++ hal/arm/edb7xxx/current/include/hal_platform_setup.h        2000/08/16 10:54:57
@@ -102,11 +102,15 @@
 #define PCMCIA0_LA_START 0x40000000
 #define PCMCIA0_PA       0x40000000
 #define PCMCIA1_LA_START 0x50000000
 #define PCMCIA1_PA       0x50000000
 #define SRAM_LA_START    0x60000000
+#ifdef CYGHWR_HAL_ARM_EDB7XXX_VARIANT_CL_PS7111 // 4K SRAM
 #define SRAM_LA_END      0x60001000
+#else  // 72xx - 37.5K SRAM
+#define SRAM_LA_END      0x6000A000
+#endif
 #define SRAM_PA          0x60000000
 #define IO_LA_START      0x80000000
 #define IO_LA_END        0x80003000
 #define IO_PA            0x80000000
 
@@ -352,17 +356,20 @@
 /* SRAM */                                                                   ;\
        ldr     r3,=SRAM_LA_START                                            ;\
        ldr     r4,=MMU_L1_TYPE_Page|MMU_DOMAIN(0)                           ;\
        orr     r4,r4,r2                                                     ;\
        str     r4,[r1],#4                                                   ;\
-       ldr     r4,=MMU_L2_TYPE_Small|MMU_AP_Any|MMU_Bufferable|MMU_Cacheable;\
+       ldr     r7,=MMU_PAGE_SIZE                                            ;\
+        ldr     r5,=SRAM_LA_END                                              ;\
+05:    ldr     r4,=MMU_L2_TYPE_Small|MMU_AP_Any|MMU_Bufferable|MMU_Cacheable;\
        orr     r4,r3,r4                                                     ;\
        str     r4,[r2],#4                                                   ;\
-       ldr     r3,=SRAM_LA_START+MMU_PAGE_SIZE                              ;\
+        add     r3,r3,r7                                                     ;\
+        cmp     r3,r5                                                        ;\
+        bne     05b                                                          ;\
        ldr     r4,=SRAM_LA_START+MMU_SECTION_SIZE                           ;\
        ldr     r5,=MMU_L2_TYPE_Fault                                        ;\
-       ldr     r7,=MMU_PAGE_SIZE                                            ;\
 10:    str     r5,[r2],#4                                                   ;\
        add     r3,r3,r7                                                     ;\
        cmp     r3,r4                                                        ;\
        bne     10b                                                          ;\
        ldr     r4,=IO_LA_START                                              ;\


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-08-17 16:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200008162329.QAA14549@cygnus.com>
2000-08-17  3:56 ` [ECOS] EDB/EP7212 internal SRAM - only 4K of 37.5K seems usa Gary Thomas
2000-08-17 11:23 AshCan
2000-08-17 16:41 ` Gary Thomas
  -- strict thread matches above, loose matches on Subject: below --
2000-08-16 16:29 AshCan
2000-08-16 12:40 AshCan
2000-08-15 23:41 [ECOS] EDB/EP7212 internal SRAM - only 4K of 37.5K seems usable AshCan
2000-08-16  4:03 ` [ECOS] EDB/EP7212 internal SRAM - only 4K of 37.5K seems usa Gary Thomas

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).