Replies: 2 comments 1 reply
-
|
Hi again, Just fixed the issue by removing [288/288] Linking C executable zephyr/zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 255212 B 512 KB 48.68%
RAM: 54780 B 64 KB 83.59%
PSRAM1: 0 GB 64 KB 0.00%
DSRAM2: 8628 B 32 KB 26.33%
IDT_LIST: 0 GB 32 KB 0.00% |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Continuing on the topic, even though I can now use DSRAM2, network buffers are still being alocated in RAM. These are from Memory Configuration
Name Origin Length Attributes
FLASH 0x0000000008000000 0x0000000000080000 xr
RAM 0x0000000020000000 0x0000000000010000 xw
PSRAM1 0x0000000010000000 0x0000000000010000 rw
DSRAM2 0x0000000030000000 0x0000000000008000 rw
IDT_LIST 0x00000000ffff7fff 0x0000000000008000 xw
*default* 0x0000000000000000 0xffffffffffffffff
...
net_buf_pool_area
0x0000000020000448 0x58 load address 0x000000000803e088
0x0000000020000448 _net_buf_pool_list_start = .
*(SORT_BY_NAME(SORT_BY_ALIGNMENT(._net_buf_pool.static.*)))
._net_buf_pool.static.rx_bufs_
0x0000000020000448 0x2c zephyr/subsys/net/ip/libsubsys__net__ip.a(net_pkt.c.obj)
._net_buf_pool.static.tx_bufs_
0x0000000020000474 0x2c zephyr/subsys/net/ip/libsubsys__net__ip.a(net_pkt.c.obj)
0x00000000200004a0 _net_buf_pool_list_end = .
...
.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_pkt.c".k_mem_slab_buf_tx_pkts
0x000000002000c890 0x8b8 zephyr/subsys/net/ip/libsubsys__net__ip.a(net_pkt.c.obj)
0x000000002000c890 _k_mem_slab_buf_tx_pkts
.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_pkt.c".k_mem_slab_buf_rx_pkts
0x000000002000d148 0x1c20 zephyr/subsys/net/ip/libsubsys__net__ip.a(net_pkt.c.obj)
0x000000002000d148 _k_mem_slab_buf_rx_pktsAnd I found this in .dsram2_noinit_reloc (NOLOAD) :
{
. = ALIGN(4);
KEEP(*eth_xmc4xxx.c.obj(.noinit."WEST_TOPDIR/zephyr/drivers/ethernet/eth_xmc4xxx.c".k_mem_slab_buf_tx_frame_slab))
KEEP(*net_mgmt.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_mgmt.c".0))
KEEP(*net_mgmt.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_mgmt.c".0))
KEEP(*net_mgmt.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_mgmt.c".1))
KEEP(*net_mgmt.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_mgmt.c".1))
KEEP(*net_pkt.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_pkt.c".0))
KEEP(*net_pkt.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_pkt.c".1))
KEEP(*net_pkt.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_pkt.c".2))
KEEP(*net_pkt.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_pkt.c".3))
KEEP(*net_pkt.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_pkt.c".k_mem_slab_buf_rx_pkts))
KEEP(*net_pkt.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_pkt.c".k_mem_slab_buf_tx_pkts))
KEEP(*net_tc.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_tc.c".0))
KEEP(*net_tc.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/net_tc.c".1))
KEEP(*sockets_service.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/lib/sockets/sockets_service.c".0))
KEEP(*tcp.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/tcp.c".0))
KEEP(*tcp.c.obj(.noinit."WEST_TOPDIR/zephyr/subsys/net/ip/tcp.c".k_mem_slab_buf_tcp_conns_slab))
. = ALIGN(4);
} > DSRAM2 AT > DSRAM2
__dsram2_noinit_reloc_end = .;
__dsram2_noinit_reloc_start = ADDR(.dsram2_noinit_reloc);
__dsram2_noinit_reloc_size = __dsram2_noinit_reloc_end - __dsram2_noinit_reloc_start;Which suggests that this behavior is on purpose. My questions:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am working with an infineon
xmc45_relax_kitin an application with network enabled, and I would like to have the network buffers relocated to DSRAM2 because I am running out of RAM, as can be seen in the linker output:[288/288] Linking C executable zephyr/zephyr.elf Memory region Used Size Region Size %age Used FLASH: 259152 B 512 KB 49.43% RAM: 64020 B 64 KB 97.69% PSRAM1: 0 GB 64 KB 0.00% DSRAM2: 0 GB 32 KB 0.00% IDT_LIST: 0 GB 32 KB 0.00%I added the following to prj.conf:
And tried adding the following to CMakeLists.txt:
also tried:
zephyr_code_relocate(LIBRARY subsys__net__ip LOCATION DSRAM2_DATA_BSS_NOINIT)But I always get:
Any ideas on what I am missing? If I am doing it wrong, what would be the right way to do it?
Best regards,
Marcelo.
Beta Was this translation helpful? Give feedback.
All reactions