- 20 Aug, 2019 1 commit
-
-
George Wort authored
-
- 16 Aug, 2019 7 commits
-
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
- 15 Aug, 2019 2 commits
-
-
George Wort authored
-
George Wort authored
-
- 14 Aug, 2019 1 commit
-
-
George Wort authored
-
- 13 Aug, 2019 1 commit
-
-
George Wort authored
-
- 12 Aug, 2019 3 commits
-
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
- 17 Jul, 2019 11 commits
-
-
George Wort authored
-
George Wort authored
Also reduce interrupt time to zero as browsers have a minimum delay anyway.
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
Use RETURN_ON_EXCEPTION macro to check for exception and return after all function calls that may return with an exception.
-
- 02 Jul, 2019 11 commits
-
-
George Wort authored
-
George Wort authored
-
George Wort authored
Asyncify seems to prevent ccalls such as the ticker during emscripten_sleep. To get around this issue, only briefly call emscripten_sleep in mp_hal_delay_ms, and check ticks passed to return at correct time.
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
-
George Wort authored
The nRF API is partially implemented in order to support the ticker, with most methods being stubbed out. The ticker is implemented using a javascript timeout function that calls the handler. Due to the unreliability of javascript's timing, the handler is called more frequently than is necessary for the slow ticker, and the time that has passed is checked. The nrf_gpio API calls directly into mbed's gpio API. Implementing the pin API allows the display to run, though the light sensor is not yet implemented.
-
- 30 May, 2019 2 commits
-
-
George Wort authored
The simulator uses emscripten to run in the browser, meaning that the nRF hardware API can no longer be used. Though the mbed API along with its HAL is reimplemented using emscripten and javascript. Instead of plugging into hardware, EM_ASM is used at points to call directly into javascript. Persistent memory is also removed and replaced with local javascript memory. Inline assembly is no longer supported. Due to javascript being single threaded, in order to yield to the browser and "hardware" threads, mp_hal_delay_ms is used to call emscripten_sleep in the VM and throughout. The initial stack usage is simulated by initialising the stack top using a dummy value at the start of main. Javascript is used in order to import any MicroPython script from the simulator web page that exists on soft reset. The stack may ascend on the machine running the browser and so the stack_usage now accounts for that. The yielding within the VM uses a counter to periodically check whether enough time has passed for it to yield yet, this time checking prevents fast CPUs yielding to the browser more frequently than necessary.
-
George Wort authored
Files are removed separately to the initial simulator commit in order to make it clearer what has been changed.
-
- 08 Apr, 2019 1 commit
-
-
Matthew Woodcraft authored
-