aboutsummaryrefslogtreecommitdiff
path: root/windows/msvc
AgeCommit message (Collapse)Author
2017-09-06ports: Make new ports/ sub-directory and move all ports there.Damien George
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-07-19all: Remove trailing spaces, per coding conventions.Damien George
2017-07-18all: Unify header guard usage.Alexander Steffen
The code conventions suggest using header guards, but do not define how those should look like and instead point to existing files. However, not all existing files follow the same scheme, sometimes omitting header guards altogether, sometimes using non-standard names, making it easy to accidentally pick a "wrong" example. This commit ensures that all header files of the MicroPython project (that were not simply copied from somewhere else) follow the same pattern, that was already present in the majority of files, especially in the py folder. The rules are as follows. Naming convention: * start with the words MICROPY_INCLUDED * contain the full path to the file * replace special characters with _ In addition, there are no empty lines before #ifndef, between #ifndef and one empty line before #endif. #endif is followed by a comment containing the name of the guard macro. py/grammar.h cannot use header guards by design, since it has to be included multiple times in a single C file. Several other files also do not need header guards as they are only used internally and guaranteed to be included only once: * MICROPY_MPHALPORT_H * mpconfigboard.h * mpconfigport.h * mpthreadport.h * pin_defs_*.h * qstrdefs*.h
2017-05-03msvc: Workaround parser bug in older MSBuild versionsstijn
Versions prior to v14.0 have a bug in parsing item functions when used within a condition: https://github.com/Microsoft/msbuild/issues/368. Since commit [db9c2e3] this results in an error when building MicroPython with for example VS2013. Fix this by creating an intermediate property.
2017-04-30msvc: Rebuild all qstrs when mpconfig headers are modifiedstijn
Make qstr generation depend on modifications in mpconfigport.h, mpconfig.h and makeqstrdata.py and if any of those change scan all source files for qstrs again since they might have changed (for example typcially when enabling new features in mpconfig.h). This fixes #2982 for msvc builds.
2017-04-30msvc: Do not define DEBUG for debug buildsstijn
It is not used anywhere and causes a warning about redefinition because it is used in modutimeq.c
2017-04-21windows: Bring mpconfigport.h up-to-date with unix portstijn
Add definitions/source files for features which work on the windows ports but weren't yet enabled. UTIME related lines are moved a couple of lines up to make comparision with unix/mpconfigport.h easier in the future.
2017-03-23msvc: Remove directory with generated files when cleaning.stijn
This assures after cleaning all build artefacts (qstr related files, generated version header) have been removed.
2017-03-02msvc: Add machine/pin-related sources to buildstijn
This fixes unresolved references after [f1ea3bc]
2016-11-03windows: Fix utime_mphal compilation for msvcstijn
2016-06-25windows/msvc: Include machine_pinbase.c in build and enable umachine modulestijn
Fixes linker errors since [ad229477] and adds the umachine module so tests pass.
2016-06-16py: Rename __QSTR_EXTRACT flag to NO_QSTR.Paul Sokolovsky
It has more usages than just qstr extraction, for example, embedding (where people don't care about efficient predefined qstrs).
2016-05-08windows: Enable multi-processor compilation for msvcstijn
This will launch about as many compiler instances as there are logical processors on a machine, and as such significantly speeds up compilation.
2016-04-25windows/msvc: Rewrite qstr auto-generation.stijn
Builds have been broken since reworking autogeneration in c618f91 and related, this gets fixed here by applying similar qstr generation logic for the msvc builds: c files are only preprocessed when changed (or not yet preprocessed) and the concatenated output is fed into makeqstrdefs.py. To speed up this process, the concatenated output is already filtered to contain only lines which makeqstrdefs really needs: this makes the qstr generation stage about twice as fast (checked on different machines).
2016-04-16windows/msvc: Implement automatic qstr generation using makeqstrdefs.stijn
Note this still needs some work: currently all source files are always preprocessed no matter which one actually changed, moreover that happens file by file without any parallellism so builds are painstakingly slow.
2016-01-26windows/msvc: Add modurandom.c to list of source files.Damien George
2015-12-18msvc: Add dirent.h/.c implementationstijn
This fixes the build after adding directory iteration in d874702
2015-12-15msvc: Use new modmachine infrastructure per changes in f925165stijn
2015-12-11msvc: Use different output directories depending on build typestijn
This allows multiple versions (e.g. Debug/Release, x86/x64) of micropython.exe to co-exist instead and also solves potential problems where msbuild does not completely rebuild the output and/or pdb files when switching between builds, which in turn can cause linker errors in dependent projects. By default exe/map/... files go in windows/build/$(Configuration)$(Platform) After each build micropython.exe is still copied from the above directory to the windows directory though, as that is consistent with the other ports and the test runner by default uses that location as well. Also rename env.props -> path.props which is a clearer name, and add ample documentation in the affected build files. (also see discussion in #1538)
2015-11-10windows: Allow specifying the python executable to use for msvc buildsstijn
This defaults to 'python' but can be now overridden if needed
2015-10-25windows: Do not use wildcards when looking for sources in directories ↵stijn
containing optional features Fixes issues like #1532
2015-09-22windows/msvc: Exclude modjni from build.stijn
2015-08-14windows: Make unistd.h more posix compatiblestijn
- add SEEK_XXX definitions, this fixes missing definition in py/stream.c - move R_OK from realpath.c and add W_OK/F_OK defintions - move STDXXX_FILENO definitions from mpconfigport for consistency
2015-06-04windows: Implement the mp_hal_xxx functions and enable mp-readlinestijn
2015-05-17py: Implement mp_format_float for doubles and use where appropriatestijn
This allows using (almost) the same code for printing floats everywhere, removes the dependency on sprintf and uses just snprintf and applies an msvc-specific fix for snprintf in a single place so nan/inf are now printed correctly.
2015-04-28py: Replace py-version.sh with makeversionhdr.py, written in Python.Damien George
Also rename py-version.h to mpversion.h for consistency with mpconfig.h.
2015-04-22msvc: Update genhdr script to emit MicroPython version numbersstijn
2015-04-16Add .gitattributes file to force text line endings to LF.Damien George
Some files are excluded, otherwise a whole lot of files need converting.
2015-01-02msvc: Use single build target for dealing with generated filesstijn
Remove some duplication in the code for generating qstrdefs.generated.h and py-version.h
2015-01-02msvc: Define main build/include directories in a single locationstijn
- Use a single file env.props for defining the main directories used when building. env.props resolves the base directory and defines overridable output directories, and is used by all other build files. - Fix the build currently failing, basically because the preprocessing command for generating qstrdefs uses different include directories than the build itself does. (specifically, qstrdefs.h uses #include "py/mpconfig.h" since the fixes for #1022 in 51dfcb4, so we need to use the base directory as include directory, not the py dir itself). So define a single variable containing the include directories instead and use it where needed.
2015-01-01windows: Prefix includes with py/; remove need for -I../py.Damien George
2015-01-01msvc: Support py/*.h includes per #1022stijn
2014-09-22windows: Enable input(), sys.maxsize(), ujson module, emergency exception ↵stijn
buf, os module
2014-09-02msvc: Exclude modtermios, include extmod and fix compilation errorstijn
2014-06-22windows: Enable GC and implement bss start and end symbolsstijn
The pointers to the bss section are acquired in init.c() by inspecting the PE header. Works for msvc and mingw.
2014-05-28msvc: Only update generated headers when there are changesstijn
This fixes generating the headers casuing complete rebuilds, even when the headere's content didn't really change.
2014-05-09windows: Add modtime implementationstijn
2014-05-08Windows MSVC portstijn
Extend the windows port so it compiles with the toolchain from Visual Studio 2013