File tree Expand file tree Collapse file tree 3 files changed +5
-13
lines changed
Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 2626 " SIM115" , # https://docs.astral.sh/ruff/rules/open-file-with-context-handler
2727 " UP031" , # https://docs.astral.sh/ruff/rules/printf-string-formatting
2828]
29- "./arch/xtensa/core/gen_vectors.py" = [
30- " F541" , # https://docs.astral.sh/ruff/rules/f-string-missing-placeholders
31- " I001" , # https://docs.astral.sh/ruff/rules/unsorted-imports
32- " UP031" , # https://docs.astral.sh/ruff/rules/printf-string-formatting
33- ]
34- "./arch/xtensa/core/gen_zsr.py" = [
35- " SIM401" , # https://docs.astral.sh/ruff/rules/if-else-block-instead-of-dict-get
36- ]
3729"./boards/microchip/mec172xevb_assy6906/support/mec172x_remote_flasher.py" = [
3830 " I001" , # https://docs.astral.sh/ruff/rules/unsorted-imports
3931]
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
22# Copyright 2023 The ChromiumOS Authors
33# SPDX-License-Identifier: Apache-2.0
4- import sys
54import re
5+ import sys
66
77# Xtensa Vector Table linker generator
88#
9999
100100if debug_level > 0 :
101101 old = f"Level{ debug_level } Interrupt"
102- offsets [f "DebugException" ] = offsets [old ]
102+ offsets ["DebugException" ] = offsets [old ]
103103 del offsets [old ]
104104
105105sects = list (offsets )
114114# bottom bits don't take...
115115print ( " .z_xtensa_vectors : ALIGN(1024) {" )
116116print ( " z_xtensa_vecbase = .;" )
117- print (f " KEEP(*(.WindowVectors.text));" )
117+ print ( " KEEP(*(.WindowVectors.text));" )
118118for s in sects :
119119 print (f" KEEP(*(.{ s } Vector.literal));" )
120- print ( " . = 0x%3.3x;" % ( offsets [s ]) )
120+ print (f " . = 0x{ offsets [s ]:x } ;" )
121121 print (f" KEEP(*(.{ s } Vector.text));" )
122122print (" }" )
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ def parse_args():
4141syms = {}
4242
4343def get (s ):
44- return syms [ s ] if s in syms else 0
44+ return syms . get ( s , 0 )
4545
4646with open (coreisa ) as infile :
4747 for line in infile .readlines ():
You can’t perform that action at this time.
0 commit comments