Skip to content

Commit c41fe70

Browse files
committed
windows/README: Add a note about stack usage for msvc
Add information as discussed in adafruit#2927 to the readme to make the easier to discover.
1 parent fa823ea commit c41fe70

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

windows/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ To build from the command line:
4545

4646
msbuild micropython.vcxproj
4747

48+
__Stack usage__
49+
50+
The msvc compiler is quite stack-hungry which might result in a "maximum recursion depth exceeded"
51+
RuntimeError for code with lots of nested function calls.
52+
There are several ways to deal with this:
53+
- increase the threshold used for detection by altering the argument to `mp_stack_set_limit` in `unix/main.c`
54+
- disable detection all together by setting `MICROPY_STACK_CHECK` to "0" in `windows/mpconfigport.h`
55+
- disable the /GL compiler flag by setting `WholeProgramOptimization` to "false"
56+
57+
See [issue 2927](https://github.com/micropython/micropython/issues/2927) for more information.
58+
4859

4960
Running on Linux using Wine
5061
---------------------------

0 commit comments

Comments
 (0)