Skip to content

Commit 6105971

Browse files
committed
update - see revision.md
1 parent 5239b5a commit 6105971

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ulptool v2.1.0
1+
ulptool v2.2.0
22
==================
33
This guide explains how to setup Arduino to use ULP coprocessor assembly files for your esp32 projects. This guide assumes you installed the esp32 core with the preferred method of the board manager.
44

platform.local.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=1.0.1
1+
version=2.1.0
22

33
## paths
44
compiler.ulp.path={runtime.tools.ulptool.path}/esp32ulp-elf-binutils/bin/
@@ -14,4 +14,4 @@ compiler.s.cmd=python "{tools.ulptool.path}{tools.ulptool.cmd}"
1414
compiler.c.elf.extra_flags="-L{build.path}/sketch/" -T ulp_main.ld "{build.path}/sketch/ulp_main.bin.bin.o"
1515

1616
## Compile s (ulp) files
17-
recipe.hooks.core.postbuild.01.pattern={compiler.s.cmd} {compiler.cpreprocessor.flags} -b {build.path} -p {runtime.platform.path} -u {compiler.ulp.path} -x {compiler.path} -t {tools.ulptool.path} --DF_CPU={build.f_cpu} --DARDUINO={runtime.ide.version} --DARDUINO_={build.board} --DARDUINO_ARCH_={build.arch} --DARDUINO_BOARD="{build.board}" --DARDUINO_VARIANT="{build.variant}"
17+
recipe.hooks.core.postbuild.01.pattern={compiler.s.cmd} {compiler.cpreprocessor.flags} -b {build.path} -p {runtime.platform.path} -u {compiler.ulp.path} -x {compiler.path} -t {tools.ulptool.path} --DF_CPU={build.f_cpu} --DARDUINO={runtime.ide.version} --DARDUINO_={build.board} --DARDUINO_ARCH_={build.arch} --DARDUINO_BOARD="{build.board}" --DARDUINO_VARIANT="{build.variant}"

revisions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
><b>Updated (2/8/19 v2.2.0)</b><br>
2+
* Fixed compiling of non ulp projects.<br>
3+
* Changed example file name from README.ino to ulp_README.ino.<br>
4+
* All files versions numbers match the global version now.<br>
5+
16
><b>Updated (2/5/19 v2.1.0)</b><br>
27
* Now compiles for archived cores. i.e esp32 cores v1.0.0 and v1.0.1<br>
38
* Changed install procedure, hopefully easier.<br>

src/esp32ulp_build_recipe.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1717
# DEALINGS IN THE SOFTWARE.
1818

19-
# version 2.1.2
19+
# version 2.2.0
2020
import os
2121
import sys
2222
import glob
@@ -89,14 +89,19 @@ def main(argv):
8989

9090
if not ulp_files:
9191
sys.stdout.write('No ULP Assembly File(s) Detected...\r')
92-
with open('ulp_main.ld',"w") as fld:
93-
fld.close()
92+
try:
93+
with open('tmp.s',"w") as ulp: pass
94+
ulp_files.append('tmp.s')
95+
build_ulp(bpath, ppath, xpath, upath, tpath, ulp_files, board_options, False)
96+
os.remove('tmp.s')
97+
except Exception as e:
98+
print e
9499
else:
95-
build_ulp(bpath, ppath, xpath, upath, tpath, ulp_files, board_options)
100+
build_ulp(bpath, ppath, xpath, upath, tpath, ulp_files, board_options, True)
96101
sys.exit(0)
97102

98103

99-
def build_ulp(build_path, platform_path, xtensa_path, ulp_path, tool_path, ulp_sfiles, board_options):
104+
def build_ulp(build_path, platform_path, xtensa_path, ulp_path, tool_path, ulp_sfiles, board_options, has_s_file):
100105
console_string = 'ULP Assembly File(s) Detected: ' + ', '.join(ulp_sfiles) + '\r'
101106

102107
cmds = gen_cmds(os.path.join(platform_path, 'tools'))
@@ -189,7 +194,8 @@ def build_ulp(build_path, platform_path, xtensa_path, ulp_path, tool_path, ulp_s
189194
console_string += cmd[0] + '\r'
190195

191196
## print outputs or errors to the console
192-
print console_string
197+
if has_s_file:
198+
print console_string
193199

194200
return 0
195201

File renamed without changes.

0 commit comments

Comments
 (0)