add gcc-arm-none-eabi package (#1)
This commit is contained in:
21
gcc-arm-none-eabi/gcc_arm_none_eabi/__init__.py
Normal file
21
gcc-arm-none-eabi/gcc_arm_none_eabi/__init__.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
TOOLCHAIN_DIR = os.path.join(os.path.dirname(__file__), "toolchain")
|
||||
|
||||
|
||||
def _run(name):
|
||||
binary = os.path.join(TOOLCHAIN_DIR, "bin", name)
|
||||
os.execvp(binary, [binary] + sys.argv[1:])
|
||||
|
||||
|
||||
def _run_gcc():
|
||||
_run("arm-none-eabi-gcc")
|
||||
|
||||
|
||||
def _run_objcopy():
|
||||
_run("arm-none-eabi-objcopy")
|
||||
|
||||
|
||||
def _run_size():
|
||||
_run("arm-none-eabi-size")
|
||||
Reference in New Issue
Block a user