forked from TOPLLab/WARDuino
-
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.
* 👷 Bump actions/checkout from v3 to v4 Bump actions/setup-python from v2 to v4 * Fix/pause (TOPLLab#147) * 🔨 Refactor `pthreads` to `std::thread` * Sleep during pause Uses std::condition_variable to wait for new messages. Fixes TOPLLab#145 * Feat/update globals (TOPLLab#151) Add the `UPDATEGlobal` debug message. --------- Co-authored-by: tolauwae <[email protected]> * 👷 Add unit tests to CI (TOPLLab#153) * add yml unit test file * add unit test github workflow * bug fix: cmake . -> cmake .. * remove redundant tests * 🔨 Refactor action title for GitHub --------- Co-authored-by: tolauwae <[email protected]> * Improve Arduino staging (TOPLLab#159) * Use templates and config in Arduino staging The new staging disables the paused start by default. * Remove `dump.txt` * Add update stackvalue message (TOPLLab#155) * use new deserialiseStackValue * add updateStackValue interrupt handler * add fixture + tests for deserialization U32 * add tests for deserialization I32 * add tests for deserialization F32 * add tests for deserialization F64 * bug fix: add missing white space * add missing default case * add test for invalid wasm type * format doc * deactivate type update for handleUpdateStackValue * Fix util.h --------- Co-authored-by: Carlos Rojas <[email protected]> Co-authored-by: tolauwae <[email protected]> * 🐛 Fix unopened channel in ProxySupervisor (TOPLLab#165) Co-authored-by: Carlos Rojas <[email protected]> * 🐛 Fix deserialisation of float results in proxy call (TOPLLab#166) Co-authored-by: Carlos Rojas <[email protected]> * 🐛 Add newline to event notification (TOPLLab#171) * Fix issue TOPLLab#168 (TOPLLab#169) * Fix memory leaks of guard blocks (TOPLLab#167) * alloc in the same way as callback guard allocate both a callback guard block and proxy block in the similar manner so to free both blocks in a similar manner * bug fix: free dynamically allocated guard blocks blocks of type event or proxy guard are allocated at runtime at the occurrence of a proxyCall or event. These blocks need to be freed when freeing the module state * buf fix: free callback or proxy block before popping next frame * set block to nullptr after free & free only non null blocks * refactor: rename class * refactor: renamed file name * add freeing module skeleton fixture code * moved unit tests to freeingmodule_test.cpp * bug fix proxy call: setup call back should occur prior to push guard * bug fix proxy call: block type should be 0xfe and not 0xff * bug fix pushing event: exclude the interruptnumber from the json parse * 🔨 Rename WOODDUMP to snapshot Remove references to WOOD. * 🚨 Latch test suites (TOPLLab#176) * 🚨 Add Latch suites * Add core spectest folder * Remove deprecated built-in spectests * 🐛 Fix latch test suites * 🔖 Bump version number to 0.3.0 --------- Co-authored-by: Carlos Rojas <[email protected]> Co-authored-by: Carlos Rojas <[email protected]>
- Loading branch information
1 parent
6cd2bf6
commit 62aa3b5
Showing
428 changed files
with
17,506 additions
and
1,461 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 |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
if: github.event.pull_request.draft == false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Run clang-format style check for C/C++ programs. | ||
uses: jidicula/[email protected] | ||
with: | ||
|
@@ -29,7 +29,7 @@ jobs: | |
os: [ubuntu-20.04, ubuntu-22.04, macos-latest] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
|
@@ -68,10 +68,10 @@ jobs: | |
- name: esp32:esp32 | ||
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json | ||
sketches: | | ||
- platforms/Arduino | ||
- tests/compilation/esp32/esp32.ino | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
|
@@ -105,7 +105,7 @@ jobs: | |
platform-name: esp32:esp32 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
|
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,42 +1,32 @@ | ||
name: WASM Spectests | ||
on: [push, pull_request] | ||
name: Tests | ||
on: [ push, pull_request ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true # Cancel in-flight jobs for the same branch or PR | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true # Cancel in-flight jobs for the same branch or PR | ||
|
||
jobs: | ||
test: | ||
name: Run official testsuite | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.draft == false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Build warduino cli | ||
run: cmake . -D BUILD_EMULATOR=ON ; cmake --build . | ||
|
||
- name: Build WABT # Build latest version | ||
run: | | ||
git clone --recursive https://github.com/WebAssembly/wabt | ||
cd wabt | ||
git submodule update --init | ||
mkdir build; cd build | ||
cmake .. | ||
cmake --build . | ||
- name: Verify wat2wasm | ||
run: ./wabt/build/wat2wasm --version | ||
|
||
- name: Install Python dependencies | ||
run: pip install -r requirements.txt | ||
|
||
- name: Clone and run tests | ||
run: ./tests/integration/run_spec_tests.py --compiler "./wabt/build/wat2wasm" --interpreter "./wdcli" --ignore "./tests/integration/ignore.txt" | ||
unit: | ||
name: Run VM unit tests | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest ] | ||
if: github.event.pull_request.draft == false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Create build folder | ||
run: mkdir build-unit-tests | ||
|
||
- name: Build unit tests | ||
run: cmake .. -D BUILD_UNITTEST=ON ; cmake --build . | ||
working-directory: build-unit-tests | ||
|
||
- name: Run unit tests | ||
run: ctest -VV | ||
working-directory: build-unit-tests | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name=WARDuino | ||
version=0.2.3 | ||
version=0.3.0 | ||
author=Robbert Gurdeep Singh <[email protected]>, Christophe Scholliers <[email protected]>, Tom Lauwaerts <[email protected]>, Carlos Rojas Castillo <[email protected]>, Joel Martin <[email protected]> | ||
maintainer=Robbert Gurdeep Singh <[email protected]>, Christophe Scholliers <[email protected]>, Tom Lauwaerts <[email protected]> | ||
sentence=A library that enables the use of WebAssembly on Arduino boards with debugging support | ||
|
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
bin/ | ||
.config | ||
Arduino.ino | ||
*.wasm |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,51 @@ | ||
# Arduino Platform | ||
|
||
PORT = /dev/ttyUSB0 | ||
FQBN = esp32:esp32:esp32wrover | ||
CONFIG = .config | ||
-include ${CONFIG} | ||
|
||
flash: | ||
arduino-cli upload -p $(PORT) --fqbn $(FQBN) Arduino.ino | ||
ifdef PAUSED | ||
COMMAND := uint8_t command[] = {'0', '3', '\\\n'}; wac->handleInterrupt(3, command); | ||
else | ||
COMMAND := | ||
endif | ||
|
||
compile: | ||
clean: | ||
rm Arduino.ino -f | ||
rm bin -rf | ||
|
||
bin: | ||
mkdir bin | ||
|
||
bin/upload.h: bin | ||
ifndef BINARY | ||
$(error BINARY is not set. Use a .config file) | ||
endif | ||
cp $(BINARY) bin/upload.wasm | ||
cd bin; xxd -i upload.wasm > upload.h | ||
|
||
Arduino.ino: bin/upload.h Arduino.ino.template | ||
cat Arduino.ino.template > $@ | ||
sed -i "s/{{PAUSED}}/$(COMMAND)/" $@ | ||
|
||
|
||
flash: Arduino.ino | ||
ifndef PORT | ||
$(error PORT is not set. Use a .config file) | ||
endif | ||
ifndef FQBN | ||
$(error FQBN is not set. Use a .config file) | ||
endif | ||
arduino-cli upload -p $(PORT) --fqbn $(FQBN) Arduino.ino | ||
|
||
compile: Arduino.ino | ||
ifndef FQBN | ||
$(error FQBN is not set. Use a .config file) | ||
endif | ||
arduino-cli compile --fqbn $(FQBN) Arduino.ino | ||
|
||
monitor: | ||
ifndef PORT | ||
$(error PORT is not set. Use a .config file) | ||
endif | ||
arduino-cli monitor -p $(PORT) -c baudrate=115200 | ||
|
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Arduino platform for WARDuino | ||
|
||
This folder contains the code for staging and flashing WARDuino with the `arduino-cli`. | ||
|
||
To upload a program take the following steps: | ||
|
||
1. compile your program to a `.wasm` WebAssembly binary | ||
2. compile Arduino hexfile with: | ||
```bash | ||
make compile BINARY={{Path to .wasm file}} FQBN={{fqbn of target device}} | ||
``` | ||
3. flash to device | ||
```bash | ||
make flash PORT={{serial port}} FQBN={{fqbn of target device}} | ||
``` | ||
|
||
Alternatively you can pass the make arguments via a `.config` file that looks like this: | ||
|
||
```make | ||
PORT = /dev/ttyUSB0 | ||
FQBN = esp32:esp32:esp32wrover | ||
PAUSED = true | ||
BINARY = test.wasm | ||
``` | ||
|
||
Place this file in the same directory as the `Makefile`, you can now just run `make compile`. | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.