David Lechner
ecd7826316
tools/codeformat.py: Remove sizeof fixup.
...
Formatting for `* sizeof` was fixed in uncrustify v0.71, so we no longer
need the fixups for it. Also, there was one file where the updated
uncrustify caught a problem that the regex didn't pick up, which is updated
in this commit.
Signed-off-by: David Lechner <david@pybricks.com>
2020-06-14 20:24:18 +10:00
David Lechner
bd7c92e17d
tools/uncrustify.cfg: Remove deprecated sp_word_brace option.
...
This option was removed in uncrustify v0.71.
Signed-off-by: David Lechner <david@pybricks.com>
2020-06-14 20:24:03 +10:00
sommersoft
1e7ff52bb7
tools/cpboard.py: fix backwards logic of 'wait_for_response' in #3005
2020-06-03 21:51:33 -05:00
Jeff Epler
fffe171d5f
Merge pull request #3005 from sommersoft/update_cpboard_py
...
Update cpboard.py
2020-06-03 21:17:56 -05:00
sommersoft
074697a89f
tools/cpboard.py: run black formatter
2020-06-03 18:01:12 -05:00
sommersoft
cf9da59829
tools/cpboard.py: update pyserial usage to match 3.x version
2020-06-03 17:39:31 -05:00
sommersoft
660081ece2
tools/cpboard.py: change 'async' variable usage; 'async' became a keyword in CPython 3.7
2020-06-03 17:28:08 -05:00
Diego Elio Pettenò
dd5d7c86d2
Fix up end of file and trailing whitespace.
...
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-06-03 10:56:35 +01:00
Yihui Xiong
e0ca70119c
include uf2 firmware for nrf52840 mdk usb dongle which has a uf2 bootloader now
2020-06-01 07:13:45 +00:00
David Lechner
8f642677f7
tools/codeformat.py: Add verbose option to pass to uncrustify and black.
...
This adds a new command line option `-v` to `tools/codeformat.py` to enable
verbose printing of all files that are scanned.
Normally `uncrustify` and `black` are called with the `-q` option so
setting verbose suppresses the `-q` option and on `black` also enables the
`-v` option which makes it print out all file names matching the filter
similar to how `uncrustify` does by default.
2020-05-29 22:59:56 +10:00
sommersoft
c7b6d35fd4
ci_check_duplicate_usb_vid_pid.py: update docstring; moved to sys.exit from raising RuntimeError
2020-05-27 19:08:56 -05:00
David Lechner
2d1fef7096
tools/codeformat.py: Use -q option on uncrustify to make output quiet.
...
This suppresses the Parsing: <file> as language C lines. This makes
parsing run a bit faster and on CI it makes for less scrolling through logs
(and black already uses the -q option).
2020-05-28 10:08:38 +10:00
sommersoft
de0afcdf2d
add ci_check_duplicate_usb_vid_pid.py; checks that a new board doesn't use duplicate USB VID/PID values unless explicitly whitelisted to do so
2020-05-27 16:51:57 -05:00
Scott Shawcroft
7cd92dd94c
Merge pull request #2899 from dherrada/extract-types
...
Added extract_types.py script
2020-05-27 10:35:53 -07:00
dherrada
4e22b9a346
Better keyerror handling
2020-05-27 11:30:51 -04:00
dherrada
67cb48acbf
Added another except
2020-05-21 18:21:32 -04:00
dherrada
58b07ecb43
Removed a
2020-05-19 14:50:47 -04:00
dherrada
0fa5f6a0dd
Merge branch 'extract-types' of https://github.com/dherrada/circuitpython into extract-types
2020-05-18 19:01:50 -04:00
dherrada
cf524cb6b1
extract_pyi no longer raises a TypeError for missing types
2020-05-18 18:59:14 -04:00
Scott Shawcroft
6aaab005c5
Initial ESP32S2 port.
...
Basic blinky works but doesn't check pins.
2020-05-15 15:36:16 -07:00
dherrada
e67d6756d1
Merge branch 'master' into extract-types
2020-05-15 18:17:23 -04:00
dherrada
acf88d7c00
Removed extract_types.py
2020-05-15 13:57:13 -04:00
dherrada
0e39d4398c
Merged extract_types into extract_pyi
2020-05-15 13:55:46 -04:00
dherrada
416da442c0
Now outputs class name
2020-05-15 13:33:20 -04:00
dherrada
49cd9ac36e
Made extract_types return a more useful output
2020-05-15 13:29:41 -04:00
Scott Shawcroft
8ac3e7977f
Remove debug prints
2020-05-14 18:48:07 -07:00
Scott Shawcroft
afc84c2fd1
Fix ulab, math and template.
2020-05-14 15:58:36 -07:00
dherrada
9613cdd184
First fully working version
2020-05-14 18:58:28 -04:00
dherrada
a16edbc45c
First semi-functional version of extract_types.py
2020-05-14 18:22:07 -04:00
Scott Shawcroft
4e8de3c554
Swap sphinx to autoapi and the inline stubs
2020-05-12 17:28:24 -07:00
dherrada
c534a872a2
Merge branch 'master' into master
2020-05-12 12:26:02 -04:00
Scott Shawcroft
8c77252adf
Better handle //| and do __init__.c first.
2020-04-29 10:29:12 -07:00
Scott Shawcroft
46713482f4
Add verification script
2020-04-27 14:36:14 -07:00
Jeff Epler
1efa7076b0
build_memory_info: Report used, free, and total memory
...
.. intead of just free and total as before.
2020-04-27 15:43:13 -05:00
Jeff Epler
85a4dd939f
build_memory_info: Drop support for old FLASH region name
...
This led to incorrect results about free memory in the stm and i.mx ports
2020-04-27 09:12:45 -05:00
Mike Weiblen
8afa9878fd
tools: upload .bin and .uf2 for Itaca uChip boards
...
uChip boards are shipped with an Arduino bootloader. The .bin files
can be installed without first installing a .uf2 bootloader.
See https://github.com/adafruit/circuitpython/issues/2798
2020-04-22 23:50:14 -06:00
stijn
84fa3312cf
all: Format code to add space after C++-style comment start.
...
Note: the uncrustify configuration is explicitly set to 'add' instead of
'force' in order not to alter the comments which use extra spaces after //
as a means of indenting text for clarity.
2020-04-23 11:24:25 +10:00
Damien George
6e2871df59
tools/check_code_size.sh: Remove unused script.
...
It's now replaced by tools/metrics.py.
2020-04-22 14:07:56 +10:00
Damien George
17dc86369f
tools/metrics.py: Use OrderedDict when reading build log.
...
So that the output (eg of the diff command) always has the lines in the
same order.
2020-04-22 14:03:26 +10:00
Damien George
1cc24cd39a
tools/metrics.py: Don't build mpy-cross if not needed by any ports.
...
To save build time.
2020-04-22 14:03:07 +10:00
Damien George
a4423570e2
tools/metrics.py: Add option to diff to error if delta above threshold.
...
Useful for things like CI where the size check is automated.
2020-04-22 14:02:14 +10:00
stijn
bcf01d1686
all: Fix implicit conversion from double to float.
...
These are found when building with -Wfloat-conversion.
2020-04-18 22:42:24 +10:00
Jeff Epler
09dc46a984
Add Protomatter and FramebufferDisplay
2020-04-14 18:24:54 -05:00
Lars Kellogg-Stedman
8797e3347f
Fix maximum keycode in keyboard HID descriptor
...
The HID descriptor reported by circuitpython erroneously limited the
maximum keycode to 101, which prevented circuitpython from sending a
number of otherwise valid keycodes.
Closes #274
2020-04-11 10:02:18 -04:00
Jim Mussared
85858e72df
py/objexcept: Allow compression of exception message text.
...
The decompression of error-strings is only done if the string is accessed
via printing or via er.args. Tests are added for this feature to ensure
the decompression works.
2020-04-05 15:02:06 +10:00
Sean Cross
7959544322
tools: add dfu extension and mark litex as dfu
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-31 14:08:14 +08:00
Sean Cross
e8db880e7f
tools: rename dfu-suffix.py to dfu.py
...
dfu.py is unused in circuitpython, so rename dfu-suffix.py to replace it.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-31 13:03:53 +08:00
Sean Cross
c91d364a58
tools: add dfu-suffix.py
...
This reproduces `dfu-suffix` from the `dfu-tools` package.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-31 11:36:57 +08:00
Sean Cross
56ef51d392
workflow: add litex_fomu to ci
...
This adds fomu and litex and fomu to build on ci. It requires downloading
a riscv toolchain.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-31 10:21:00 +08:00
David Lechner
3dc324d3f1
tests: Format all Python code with black, except tests in basics subdir.
...
This adds the Python files in the tests/ directory to be formatted with
./tools/codeformat.py. The basics/ subdirectory is excluded for now so we
aren't changing too much at once.
In a few places `# fmt: off`/`# fmt: on` was used where the code had
special formatting for readability or where the test was actually testing
the specific formatting.
2020-03-30 13:21:58 +11:00