Skip to content

Commit

Permalink
💥 melhorando o código
Browse files Browse the repository at this point in the history
  • Loading branch information
estevam5s committed Jun 1, 2024
1 parent d6ec92a commit 10af7a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .vscode/arduino.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"port": "COM6"
}
10 changes: 7 additions & 3 deletions fix_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@
}
"""
FRAMEWORK_DIR = env.PioPlatform().get_package_dir("framework-arduino-mbed")
target_file = join(FRAMEWORK_DIR, "libraries", "rpclib" , "library.json")

if FRAMEWORK_DIR is None:
raise ValueError("O pacote 'framework-arduino-mbed' não foi encontrado. Certifique-se de que ele está instalado corretamente.")

target_file = join(FRAMEWORK_DIR, "libraries", "rpclib", "library.json")
if not isfile(target_file):
# put it in there
with open(target_file, "w") as fp:
fp.write(lib_json)
print("[+] Saved library.json for RPCLib fix.")

# Fix linking by declaring start and end properly
for e in env, DefaultEnvironment():
for e in (env, DefaultEnvironment()):
# This env-variables are set for 50_50 flash-layout
# defines = [("CM4_BINARY_START", "0x08100000"), ("CM4_BINARY_END", "0x08200000")]
# This env-variables are set for 75_25 flash-layout
Expand All @@ -30,4 +34,4 @@
e.Append(
LINKFLAGS=["-D%s=%s" % (name, value) for name, value in defines],
CPPDEFINES=defines
)
)

0 comments on commit 10af7a8

Please sign in to comment.