Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6b84e6b

Browse files
committed
Add src_to_binary_ext that returns addrs_syms
1 parent222425d commit6b84e6b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

‎esp32_ulp/__init__.py‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@
1212
from .linkimportmake_binary
1313
garbage_collect('after import')
1414

15-
16-
defsrc_to_binary(src,cpu):
15+
defsrc_to_binary_ext(src,cpu):
1716
assembler=Assembler(cpu)
1817
src=preprocess(src)
1918
assembler.assemble(src,remove_comments=False)# comments already removed by preprocessor
2019
garbage_collect('before symbols export')
2120
addrs_syms=assembler.symbols.export()
22-
foraddr,syminaddrs_syms:
23-
print('%04d %s'% (addr,sym))
24-
2521
text,data,bss_len=assembler.fetch()
26-
returnmake_binary(text,data,bss_len)
22+
returnmake_binary(text,data,bss_len),addrs_syms
2723

24+
defsrc_to_binary(src,cpu):
25+
binary,addrs_syms=src_to_binary_ext(src,cpu)
26+
foraddr,syminaddrs_syms:
27+
print('%04d %s'% (addr,sym))
28+
returnbinary
2829

2930
defassemble_file(filename,cpu):
3031
withopen(filename)asf:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp