This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problems with IRAM1 and IRAM2

Hy
I'm using LPC2368. The programm size is about 150kB. if i make a new array (200 Byte) and the memory assignement is default (placed in IRAM1) the programm isn't working correct. If the memory assignement is set to IRAM2 the programm works correct. In IRAM1 there is at least 10kB free. who can tell me why is not working if the array is placed in IRAM1?

Does anyone ave a solution?

I attached the memory map of IRAM1 an 2 from the list file.
Array placed in IRAM1, programm is not working correct:

    Execution Region RW_IRAM1 (Base: 0x40000100, Size: 0x00003ce0, Max: 0x00007eff, ABSOLUTE, COMPRESSED[0x0000014c])

    Base Addr    Size         Type   Attr      Idx    E Section Name        Object

    0x40000100   0x00000004   Data   RW            7    .data               utilities.o
    0x40000104   0x000000f8   Data   RW           18    .data               globals.o
    0x400001fc   0x00000008   Data   RW           24    .data               inputs.o
    0x40000204   0x00000038   Data   RW           30    .data               timer.o
    0x4000023c   0x00000008   Data   RW           32    .data               pca9554.o
    0x40000244   0x00000010   Data   RW           39    .data               uart.o
    0x40000254   0x00000004   Data   RW           43    .data               i2c.o
    0x40000258   0x0000000c   Data   RW           48    .data               fat16.o
    0x40000264   0x00000020   Data   RW           52    .data               sd.o
    0x40000284   0x00000004   Data   RW           54    .data               retarget.o
    0x40000288   0x00000008   Data   RW           60    .data               main.o
    0x40000290   0x00000008   Data   RW           64    .data               command.o
    0x40000298   0x00000021   Data   RW           67    .data               rs485.o
    0x400002b9   0x00000003   PAD
    0x400002bc   0x00000008   Data   RW           71    .data               ir.o
    0x400002c4   0x00000018   Data   RW           74    .data               motor.o
    0x400002dc   0x0000000c   Data   RW           83    .data               lcode.o
    0x400002e8   0x00000008   Data   RW           86    .data               log.o
    0x400002f0   0x00000010   Data   RW           91    .data               error.o
    0x40000300   0x00000234   Data   RW           96    .data               debug.o
    0x40000534   0x00000034   Data   RW           99    .data               intervall.o
    0x40000568   0x00000008   Data   RW          103    .data               testmode.o
    0x40000570   0x0000003d   Data   RW          105    .data               vevey.o
    0x400005ad   0x00000003   PAD
    0x400005b0   0x00000010   Zero   RW           11    .bss                auxout.o
    0x400005c0   0x000002e0   Zero   RW           20    .bss                globals.o
    0x400008a0   0x00000034   Zero   RW           22    .bss                gpio.o
..... deletet becaus too much charachters of message
    0x4000111c   0x00000018   Zero   RW           72    .bss                ir.o
    0x40001134   0x00000150   Zero   RW           76    .bss                motor.o
    0x40001284   0x00000018   Zero   RW           81    .bss                setup.o
    0x4000129c   0x00000010   Zero   RW           87    .bss                log.o
    0x400012ac   0x0000003c   Zero   RW           89    .bss                memo.o
    0x400012e8   0x000000d1   Zero   RW          107    .bss                vevey.o
    0x400013b9   0x00000003   PAD
    0x400013bc   0x00000060   Zero   RW          179    .bss                libspace.o(c_t.l)
    0x4000141c   0x00000004   PAD
    0x40001420   0x00001000   Zero   RW            2    HEAP                lpc2300.o
    0x40002420   0x000019c0   Zero   RW            1    STACK               lpc2300.o


    Execution Region RW_IRAM2 (Base: 0x7fe00000, Size: 0x00002470, Max: 0x00003fff, ABSOLUTE)

    Base Addr    Size         Type   Attr      Idx    E Section Name        Object

    0x7fe00000   0x00000010   Data   RW           56    .data               logger.o
    0x7fe00010   0x00002460   Zero   RW           57    .bss                logger.o

Array placed in IRAM2, programm is working correct:
    Execution Region RW_IRAM1 (Base: 0x40000100, Size: 0x00003bc8, Max: 0x00007eff, ABSOLUTE, COMPRESSED[0x00000138])

    Base Addr    Size         Type   Attr      Idx    E Section Name        Object

    0x40000100   0x00000004   Data   RW            7    .data               utilities.o
    0x40000104   0x000000f8   Data   RW           18    .data               globals.o
..... deletet becaus too much charachters of message
    0x40000290   0x00000008   Data   RW           64    .data               command.o
    0x40000298   0x00000021   Data   RW           67    .data               rs485.o
    0x400002b9   0x00000003   PAD
    0x400002bc   0x00000008   Data   RW           71    .data               ir.o
    0x400002c4   0x00000018   Data   RW           74    .data               motor.o
    0x400002dc   0x0000000c   Data   RW           83    .data               lcode.o
    0x400002e8   0x00000008   Data   RW           86    .data               log.o
    0x400002f0   0x00000010   Data   RW           91    .data               error.o
..... deletet becaus too much charachters of message
    0x40000be4   0x00000388   Zero   RW           50    .bss                fat16.o
    0x40000f6c   0x0000001c   Zero   RW           65    .bss                command.o
    0x40000f88   0x00000154   Zero   RW           69    .bss                rs485.o
    0x400010dc   0x00000018   Zero   RW           72    .bss                ir.o
    0x400010f4   0x00000150   Zero   RW           76    .bss                motor.o
    0x40001244   0x00000018   Zero   RW           81    .bss                setup.o
    0x4000125c   0x00000010   Zero   RW           87    .bss                log.o
    0x4000126c   0x0000003c   Zero   RW           89    .bss                memo.o
    0x400012a8   0x00000060   Zero   RW          179    .bss                libspace.o(c_t.l)
    0x40001308   0x00001000   Zero   RW            2    HEAP                lpc2300.o
    0x40002308   0x000019c0   Zero   RW            1    STACK               lpc2300.o


    Execution Region RW_IRAM2 (Base: 0x7fe00000, Size: 0x00002584, Max: 0x00003fff, ABSOLUTE)

    Base Addr    Size         Type   Attr      Idx    E Section Name        Object

    0x7fe00000   0x00000010   Data   RW           56    .data               logger.o
    0x7fe00010   0x0000003d   Data   RW          105    .data               vevey.o
    0x7fe0004d   0x00000003   PAD
    0x7fe00050   0x00002460   Zero   RW           57    .bss                logger.o
    0x7fe024b0   0x000000d1   Zero   RW          107    .bss                vevey.o


0