Re: Memory Problem on PacSatSW

The MRAMmap that you sent has nothing to do with the linker complaining. MRAM is totally external and the linker knows nothing about it.
I did not know about View/Memory that Jim pointed out. To me the most useful thing, and what I mean by the Link Map or Memory Map is under the Debug folder (or Release folder depending on which way you are building) and is called programname.map, for example PacSat.map. It shows how much each module is using in both code (flash memory) and RAM. Here is a section showing how much code (.text in Unix terms) is being used.
SECTION ALLOCATION MAP
output attributes/ section page origin length input sections -------- ---- ---------- ---------- ---------------- .intvecs 0 00000000 00000020 00000000 00000020 sys_intvecs.obj (.intvecs)
.text 0 00000020 00048338 00000020 000046f4 Ax25Task.obj (.text) 00004714 00003d54 UplinkTask.obj (.text) 00008468 00003b14 PbTask.obj (.text) 0000bf7c 000033f0 ConsoleTask.obj (.text) 0000f36c 0000314c pacsat_header.obj (.text) 000124b8 00002b7c sys_selftest.obj (.text) 00015034 00002860 os_tasks.obj (.text) 00017894 000026b8 inodedata.obj (.text) 00019f4c 000020d0 nonvolManagement.obj (.text) 0001c01c 00002008 posix.obj (.text)
========================= And here is how much RAM is getting used.
.bss 0 08001500 00024752 UNINITIALIZED 08001500 00020000 os_heap.obj (.bss:ucHeap) 08021500 00000acc Ax25Task.obj (.bss:data_link_state_machine) 08021fcc 00000a00 PbTask.obj (.bss:pb_list) 080229cc 0000067c buffer.obj (.bss:gBufCtx) 08023048 00000360 CommandTask.obj (.bss:UplinkCommandBuffer) 080233a8 00000320 posix.obj (.bss:gaHandle) 080236c8 00000200 UplinkTask.obj (.bss:ftl0_pfh_byte_buffer$2) 080238c8 00000200 pacsat_dir.obj (.bss:pfh_byte_buffer) 08023ac8 000001d4 UplinkTask.obj (.bss:ftl0_pfh_buffer$1) 08023c9c 000001d4 pacsat_dir.obj (.bss:pfh_buffer) 08023e70 00000128 (.common:gaRedCoreVol) 08023f98 00000120 rtsv7R4_T_be_v3D16_eabi.lib : trgmsg.c.obj (.bss:_CIOBUF_) 080240b8 00000118 UplinkTask.obj (.bss:ax25_event) 080241d0 00000118 Ax25Task.obj (.bss:ax25_received_event) 080242e8 00000118 Ax25Task.obj (.bss:lm_event) 08024400 00000118 Ax25Task.obj (.bss:send_event_buffer) 08024518 00000118 UplinkTask.obj (.bss:send_event_buffer) 08024630 00000118 Ax25Task.obj (.bss:timer_event)
=========================
Notice that you can tell which is in flash and which is in memory by the address (080xxxxx is ram, 0004xxxx is flash).
This is totally an output file. What you changed was the link command file sys_lnk.cmd which is input to the linker. You essentially "lied" to the linker so it would not complain, I think. Clever way to find out how much it really wanted! But if you can send the PacSat.map (or whatever it is called), that will tell exactly who is using the memory.
73,
Burns Fisher, WB1FJ *AMSAT(R) Engineering -- Flight Software*
On Tue, Jan 16, 2024 at 12:30 PM Bob Stricklin via pacsat-dev < pacsat-dev@amsat.org> wrote:
participants (1)
-
Burns Fisher (AMSAT)