Skip to content

Commit

Permalink
Adhere to styling conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
ameeuw committed Mar 30, 2024
1 parent 6b84e6b commit fe753d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions esp32_ulp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .link import make_binary
garbage_collect('after import')


def src_to_binary_ext(src, cpu):
assembler = Assembler(cpu)
src = preprocess(src)
Expand All @@ -21,12 +22,14 @@ def src_to_binary_ext(src, cpu):
text, data, bss_len = assembler.fetch()
return make_binary(text, data, bss_len), addrs_syms


def src_to_binary(src, cpu):
binary, addrs_syms = src_to_binary_ext(src, cpu)
for addr, sym in addrs_syms:
print('%04d %s' % (addr, sym))
return binary


def assemble_file(filename, cpu):
with open(filename) as f:
src = f.read()
Expand Down

0 comments on commit fe753d9

Please sign in to comment.