Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add licence headers to all source files #95

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

name: Publish Python Package

on:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

name: CI

on: [push, pull_request]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright 2018-2022 by the micropython-esp32-ulp authors, see AUTHORS file
Copyright 2018-2023 by the micropython-esp32-ulp authors, see AUTHORS file

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 7 additions & 0 deletions demo.S
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

# comment-only line

.text
Expand Down
7 changes: 7 additions & 0 deletions demo.sh
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

micropython -m esp32_ulp demo.S
7 changes: 7 additions & 0 deletions esp32_ulp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

from .util import garbage_collect

from .preprocess import preprocess
Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

import sys
from . import assemble_file

Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/assemble.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
ESP32 ULP Co-Processor Assembler
"""
Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/definesdb.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

import os
import btree
from .util import file_exists
Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/link.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

from uctypes import struct, addressof, LITTLE_ENDIAN, UINT16, UINT32


Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/nocomment.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

def remove_comments(s):
"""
Remove comments of these styles:
Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/opcodes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
ESP32 ULP Co-Processor Instructions
"""
Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/opcodes_s2.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
ESP32 ULP Co-Processor Instructions
"""
Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/parse_to_db.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

import sys

from .preprocess import Preprocessor
Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/preprocess.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

from . import nocomment
from .util import split_tokens
from .definesdb import DefinesDB
Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/soc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
Address / Register definitions for the ESP32 SoC
"""
Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/soc_s2.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
Address / Register definitions for the ESP32-S2 SoC
"""
Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/soc_s3.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
Address / Register definitions for the ESP32-S3 SoC
"""
Expand Down
7 changes: 7 additions & 0 deletions esp32_ulp/util.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

DEBUG = False

import gc
Expand Down
7 changes: 7 additions & 0 deletions examples/blink.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
Example for: ESP32

Expand Down
7 changes: 7 additions & 0 deletions examples/blink_s2.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
Example for: ESP32-S2 and ESP32-S3

Expand Down
7 changes: 7 additions & 0 deletions examples/counter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
Example for: ESP32

Expand Down
7 changes: 7 additions & 0 deletions examples/counter_s2.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
Example for: ESP32-S2 and ESP32-S3

Expand Down
7 changes: 7 additions & 0 deletions examples/readgpio.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
Example for: ESP32

Expand Down
7 changes: 7 additions & 0 deletions examples/readgpio_s2.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
Example for: ESP32-S2

Expand Down
7 changes: 7 additions & 0 deletions examples/readgpio_s3.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

"""
Example for: ESP32-S3

Expand Down
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

import re
from setuptools import setup
import sdist_upip
Expand Down
6 changes: 6 additions & 0 deletions tests/00_unit_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/bin/bash
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

# export PYTHONPATH=.:$PYTHONPATH

Expand Down
6 changes: 6 additions & 0 deletions tests/01_compat_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/bin/bash
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

# export PYTHONPATH=.:$PYTHONPATH

Expand Down
6 changes: 6 additions & 0 deletions tests/02_compat_rtc_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/bin/bash
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

# export PYTHONPATH=.:$PYTHONPATH

Expand Down
6 changes: 6 additions & 0 deletions tests/03_disassembler_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/bin/bash
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

set -e

Expand Down
7 changes: 7 additions & 0 deletions tests/assemble.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

from esp32_ulp.assemble import Assembler, TEXT, DATA, BSS, REL, ABS
from esp32_ulp.assemble import SymbolTable
from esp32_ulp.nocomment import remove_comments
Expand Down
7 changes: 7 additions & 0 deletions tests/compat/alu.S
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

.text

and r1, r2, r3
Expand Down
7 changes: 7 additions & 0 deletions tests/compat/expr.S
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

# common example of real world code using expressions
.set adc_channel, 6

Expand Down
7 changes: 7 additions & 0 deletions tests/compat/fixes.S
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

# This file tests various fixes to the assembler,
# to ensure the binary output matches that of binutils.
# a) support for left-aligned directives (e.g. .set without preceding whitespace)
Expand Down
7 changes: 7 additions & 0 deletions tests/compat/io.S
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#
# This file is part of the micropython-esp32-ulp project,
# https://github.com/micropython/micropython-esp32-ulp
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

.text

reg_rd 0x3ff48000, 7, 0
Expand Down
Loading