Sony's Developer World forum

    • Home
    • Forum guidelines

    Can I shrink the DSP/SRC's heap memory?

    Spresense
    2
    4
    96
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jens6151 0 1 1 last edited by

      At DSP Install it says that SRC is 21 kB binary size.

      Image     Used memory       Binary size
      SRC       128 kbyte         21 kbyte
      

      I am using only Mono input experimenting with small memory tiles configuration.
      Unfortunately the required size is 73kB (75208 bytes), slightly above one small tile of 64kB

      printf("loadinfo: size is %d\n", loadinfo->textsize + loadinfo->datasize);
      

      Can I somehow shrink the SRC program? Like to reduce the heap a little bit?

      readelf.py -S SRC
      There are 13 section headers, starting at offset 0x50c4
      
      Section Headers:
        [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
        [ 0]                   NULL            00000000 000000 000000 00      0   0  0
        [ 1] VECTOR            PROGBITS        00000000 000034 00023c 00   A  0   0  4
        [ 2] WARMBOOT          PROGBITS        0000023c 000270 000004 00   A  0   0  4
        [ 3] ROM               PROGBITS        00000240 000274 0030a8 00  AX  0   0  4
        [ 4] RW_RAM            PROGBITS        000032f0 003324 000108 00  WA  0   0 16
        [ 5] RAM               NOBITS          00003400 003434 0050b4 00  WA  0   0 64
        [ 6] BACKUP            NOBITS          000084c0 003434 000108 00  WA  0   0 16
        [ 7] ARM_LIB_HEAP      NOBITS          000085c8 003434 008000 00  WA  0   0  4
        [ 8] ARM_LIB_STACK     NOBITS          000105c8 003434 002000 00  WA  0   0  4
        [ 9] .symtab           SYMTAB          00000000 003434 000bb0 10     10   1  4
        [10] .strtab           STRTAB          00000000 003fe4 001060 00      0   0  1
        [11] .shstrtab         STRTAB          00000000 005044 00005e 00      0   0  1
        [12] .note             NOTE            00000000 0052cc 000030 00      0   0  1
      Key to Flags:
        W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
        L (link order), O (extra OS processing required), G (group), T (TLS),
        C (compressed), x (unknown), o (OS specific), E (exclude),
        y (purecode), p (processor specific)
      
      
      C 1 Reply Last reply Reply Quote
      • C
        CamilaSouza DeveloperWorld @jens6151 0 1 1 last edited by

        Hi, @jens6151-0-1-1

        I don't think you can shrink the SRC program.
        But let me do some investigation and get back to you.

        J 1 Reply Last reply Reply Quote
        • J
          jens6151 0 1 1 @CamilaSouza last edited by

          @CamilaSouza Thank you for checking. In the meantime, I will try 48 kHz which does not need the SRC.
          The reason is that I am out of memory. So I need to save memory where possible. 128 kB for sampling rate conversion is too large for my case.

          J 1 Reply Last reply Reply Quote
          • J
            jens6151 0 1 1 @jens6151 0 1 1 last edited by

            @jens6151-0-1-1 Using 48 KHz without doing any sampling conversion works fine for me. I do not need to load any DSP and do not need ASMP.

            1 Reply Last reply Reply Quote
            • Referenced by  J jens6151 0 1 1 
            • First post
              Last post
            Developer World
            Copyright © 2021 Sony Group Corporation. All rights reserved.
            • Contact us
            • Legal