forked from avrdudes/avrdude
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: errors in worker get caught and stops uploader (#11)
* fix: errors in worker get caught and stops uploader * fix: remove test throw error * chore: bump version
- Loading branch information
Showing
5 changed files
with
93 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -s ASYNCIFY -O3 --bind -s STANDALONE_WASM=1 -s WASM=1") | ||
|
||
|
||
|
||
add_library(serial STATIC LibSerial.c) | ||
|
||
# copy avrdude-worker.js to build directory | ||
add_custom_command(TARGET serial POST_BUILD | ||
add_custom_target(worker | ||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} | ||
COMMAND yarn install | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
COMMAND npx rollup -c --format cjs -i ${CMAKE_CURRENT_SOURCE_DIR}/avrdude-worker.js -o ${CMAKE_CURRENT_BINARY_DIR}/avrdude-worker.js | ||
) | ||
|
||
add_library(serial STATIC LibSerial.c) | ||
|
||
add_dependencies(serial worker) | ||
|
||
# copy avrdude-worker.js to build directory | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters