Lines Matching full:partitions
8 Script to generate a linker script organizing application memory partitions
10 Applications may declare build-time memory domain partitions with
12 or K_APP_BMEM macros. For each of these partitions, we need to
19 the set of memory partitions to generate by looking for variables which
27 - key/value pairs mapping static library files to what partitions their globals
50 # application shared memory partitions.
112 def find_obj_file_partitions(filename, partitions): argument
129 if partition_name not in partitions:
130 partitions[partition_name] = {SZ: section.header.sh_size}
133 partitions[partition_name][SRC] = filename
136 partitions[partition_name][SZ] += section.header.sh_size
139 return partitions
142 def parse_obj_files(partitions): argument
143 # Iterate over all object files to find partitions
150 find_obj_file_partitions(fullname, partitions)
153 def parse_compile_command_file(partitions): argument
155 # Thereafter process each object file to find partitions
170 find_obj_file_partitions(fullname, partitions)
173 def parse_elf_file(partitions): argument
194 if partition_name not in partitions:
195 partitions[partition_name] = {SZ: size}
198 partitions[partition_name][SRC] = args.elf
201 partitions[partition_name][SZ] += size
204 def generate_final_linker(linker_file, partitions, lnkr_sect=""): argument
207 if len(partitions) > 0:
210 for partition, item in partitions.items():
252 help="Comma separated names of partitions to be pinned in physical memory")
259 partitions = {}
262 parse_obj_files(partitions)
264 parse_compile_command_file(partitions)
266 parse_elf_file(partitions)
271 if ptn not in partitions:
272 partitions[ptn] = {}
274 if LIB not in partitions[ptn]:
275 partitions[ptn][LIB] = [lib]
277 partitions[ptn][LIB].append(lib)
282 generic_partitions = {key: value for key, value in partitions.items()
284 pinned_partitions = {key: value for key, value in partitions.items()
287 generic_partitions = partitions
289 # Sample partitions.items() list before sorting:
299 print("Partitions retrieved:")
313 print("Pinned partitions retrieved:")